You are viewing a single comment's thread. Return to all comments →
For Sql Server:-
WITH CTE AS( select s.id, s.name, f.friend_id, p.salary as salary, q.salary as friendssalary from students s INNER JOIN Friends f ON s.id = f.id INNER JOIN packages p ON s.id = p.id INNER JOIN packages q ON f.friend_id = q.id ) select name from CTE where friendssalary > salary order by friendssalary
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 →
For Sql Server:-