Hello everyone, in general there is such a problem, very interesting.
I have a user entity that is connected to many-to-one with itself (likes are like that). The question is how do I select a table of users by sorting by likes?
Here, for example, if I like the other in the user_likes table, the id , from_user_id , to_user_id is to_user_id - in general, if there is such a string, then you need to sort it and put it up. And yes when issuing costs LIMIT 10 .