Created
March 23, 2018 13:58
-
-
Save iurev/08fd2dc553b8dfc1e4d17466b42fd8f2 to your computer and use it in GitHub Desktop.
SQL
This file contains 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 e.* | |
from ( | |
select department, max(salary) as max_salary | |
from employee | |
group by department | |
) d | |
join employee e | |
on e.salary = d.max_salary; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment