Skip to content

Instantly share code, notes, and snippets.

@isitavi
Created December 6, 2018 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isitavi/c3f4f8484c37a661f0ad89ba1c029448 to your computer and use it in GitHub Desktop.
Save isitavi/c3f4f8484c37a661f0ad89ba1c029448 to your computer and use it in GitHub Desktop.
SQL-Problem4
Select Stdt.name
FROM Students Stdt,
Friends Frnd,Packages Pkg1,Packages Pkg2
Where Pkg2.Salary > Pkg1.Salary
and Pkg2.ID = Frnd.Friend_ID and Pkg1.ID = Stdt.ID and Stdt.ID = Frnd.ID
Order by Pkg2.Salary;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment