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.
FROM Students as std
INNER JONI Friends as friend ON std.ID = friend.ID
INNER JOIN Packages ON std.ID = Packages.ID
INNER JOIN Packages as pck ON friend.Friend_ID = pck.ID
WHERE pck.Salary > Packages.Salary ORDER BY pck.Salary ASC
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 std.Name as Friend
FROM Students as std INNER JONI Friends as friend ON std.ID = friend.ID INNER JOIN Packages ON std.ID = Packages.ID INNER JOIN Packages as pck ON friend.Friend_ID = pck.ID WHERE pck.Salary > Packages.Salary ORDER BY pck.Salary ASC