You are viewing a single comment's thread. Return to all comments →
select name from (select s1.name, p2.id, p2.salary from students s1 join packages p2 on s1.id= p2.id order by p2.salary asc) as jo1n join (select f1.id, f1.friend_id, p1.salary from friends f1 join packages p1 on f1.friend_id= p1.id order by p1.salary asc) as jo2n on jo1n.id=jo2n.id where jo2n.salary > jo1n.salary order by jo2n.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 →