You are viewing a single comment's thread. Return to all comments →
I found other solutions here too complicated without any specific reason. This is my simple solution for MySQL:
SELECT s.name FROM students s JOIN friends f ON s.id = f.id JOIN packages p ON f.id = p.id JOIN packages p2 ON f.friend_id = p2.id WHERE p.salary < p2.salary ORDER BY p2.salary;
Seems like cookies are disabled on this browser, please enable them to open this website
Placements
You are viewing a single comment's thread. Return to all comments →
I found other solutions here too complicated without any specific reason. This is my simple solution for MySQL: