You are viewing a single comment's thread. Return to all comments →
with temp as ( select students.id as student_id , name , friend_id , p1.salary as student_salary , p2.salary as friend_salary from students left join friends on students.id = friends.id left join packages as p1 on students.id = p1.id left join packages as p2 on friends.friend_id = p2.id) select name from temp where friend_salary > student_salary order by friend_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 →