Without LEFT JOIN
See demo SQL Fiddle
SELECT
u.id,
(SELECT
w.wink_flag
FROM winks w
WHERE w.to_id = u.id
GROUP BY w.to_id) AS WINK_FLAG,
(SELECT
f.fav_flag
FROM favourite f
WHERE f.to_id = u.id
GROUP BY f.to_id) AS FAV_FLAG
FROM users u
WHERE u.id != 56
0
solved There are 3 tables users,winks and favourite [closed]