We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Select name from
(SELECT l.id,l.name as name,f.friend_id,p.salary
from Students l
Join Friends f
on l.id = f.id
JOIN Packages p
on f.id = p.id
where p.salary < (Select salary from Packages where id = f.friend_id)
order by (Select salary from Packages where id = f.friend_id)) t;
Cookie support is required to access HackerRank
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 →
Select name from (SELECT l.id,l.name as name,f.friend_id,p.salary from Students l Join Friends f on l.id = f.id JOIN Packages p on f.id = p.id where p.salary < (Select salary from Packages where id = f.friend_id) order by (Select salary from Packages where id = f.friend_id)) t;