• + 0 comments

    select s.name from friends f join students s on f.id = s.id join students t on f.friend_ID = t.id join packages p on f.id = p.id join packages k on f.friend_ID = k.id where p.salary < k.salary order by k.salary;