openvk/Web/Models/sql/get-followers.tsql

6 lines
378 B
Text
Raw Permalink Normal View History

(SELECT DISTINCT(follower) AS __id FROM
2024-09-16 02:11:00 +03:00
(SELECT follower, flags FROM subscriptions WHERE target=? AND model="openvk\\Web\\Models\\Entities\\User") u0
2020-06-07 19:04:43 +03:00
LEFT JOIN
(SELECT target FROM subscriptions WHERE follower=? AND model="openvk\\Web\\Models\\Entities\\User") u1
ON u0.follower = u1.target WHERE u1.target IS NULL) u2
INNER JOIN profiles ON profiles.id = u2.__id