Created
May 27, 2018 04:16
-
-
Save manas5110/8cda8bc262f75cbd697c20cf8ea2dbba to your computer and use it in GitHub Desktop.
Employee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select manager_id, employee_id, salary from (select manager_id, employee_id, salary, rank() over(partition by manager_id order by salary desc) as r from employees) where r=1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment