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.
the easiest one in all of discussion for mysql-
SELECT S.Name
FROM Students S
JOIN Friends F ON S.ID = F.ID
JOIN Packages P1 ON S.ID = P1.ID
JOIN Packages P2 ON F.Friend_ID = P2.ID
WHERE P2.Salary > P1.Salary
ORDER BY P2.Salary;
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 →
the easiest one in all of discussion for mysql- SELECT S.Name FROM Students S JOIN Friends F ON S.ID = F.ID JOIN Packages P1 ON S.ID = P1.ID JOIN Packages P2 ON F.Friend_ID = P2.ID WHERE P2.Salary > P1.Salary ORDER BY P2.Salary;