You are viewing a single comment's thread. Return to all comments →
Nice Oracle solution:
SELECT std.name FROM students std , ( SELECT frd.id, (SELECT salary FROM packages WHERE id = frd.id) AS my_salary , frd.friend_id, (SELECT salary FROM packages WHERE id = frd.friend_id) AS friend_salary FROM friends frd) X WHERE X.friend_salary > X.my_salary AND X.id = std.id ORDER BY X.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 →
Nice Oracle solution: