You are viewing a single comment's thread. Return to all comments →
My simple solution using SQL Server:
SELECT S.Name FROM Students S WITH (NOLOCK) INNER JOIN Friends F WITH (NOLOCK) ON S.ID = F.ID INNER JOIN Packages P WITH (NOLOCK) ON P.ID = S.ID INNER JOIN Packages PF WITH (NOLOCK) ON PF.ID = F.Friend_ID AND P.Salary < PF.Salary ORDER BY PF.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 →
My simple solution using SQL Server: