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 s.name
from students s, friends f, packages p, packages p2
where s.id = f.id
and f.friend_id = p2.id
and s.id = p.id
and p.salary < p2.salary
order by p2.salary;
Placements
You are viewing a single comment's thread. Return to all comments →
Oracle solution:
select s.name from students s, friends f, packages p, packages p2 where s.id = f.id and f.friend_id = p2.id and s.id = p.id and p.salary < p2.salary order by p2.salary;