We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d56fca commit 0a34f9eCopy full SHA for 0a34f9e
Medium/Placements.sql
@@ -0,0 +1,9 @@
1
+SELECT NAME FROM(
2
+ SELECT S.Id SID, S.NAME, f.friend_id FID, p1.Salary S1, p2.Salary S2
3
+ FROM Students S
4
+ INNER JOIN friends f ON (S.Id = f.id )
5
+ inner join packages p1 ON(S.Id = p1.Id)
6
+ inner join packages p2 ON(f.friend_id = p2.Id)
7
+
8
+ ) A WHERE S2>S1
9
+ ORDER BY S2;
0 commit comments