Bring Mysql users?

How to display all users which I do not linkul in the table of likes and match the condition

have thrown, but nothing appears

SELECT * FROM `users`
 LEFT join `user_attributes` on user_attributes.user_id = users.id
 left join likes on likes.like_user != users.id and likes.user_id = 1
 where user_attributes.gender = 2 and user_attributes.city = "Vitebsk" and user_attributes.age BETWEEN 18 and 25 LIMIT 4
April 4th 20 at 13:29
1 answer
April 4th 20 at 13:31
Solution
?
SELECT * FROM `users`
LEFT join `user_attributes` on user_attributes.user_id = users.id
where 
user_attributes.gender = 2 
and user_attributes.city = "Vitebsk" 
and user_attributes.age BETWEEN 18 and 25 
and not exists (select * from likes where likes.like_user = users.id)
LIMIT 4

Find more questions by tags MySQL