Created
June 6, 2025 13:22
-
-
Save haseeb-heaven/f54ea6d2b6bcf75be734a1302c3889e7 to your computer and use it in GitHub Desktop.
Employees max salary from each department
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 employee_name, department, salary | |
FROM employees e | |
WHERE salary = ( | |
SELECT MAX(salary) | |
FROM employees | |
WHERE department = e.department | |
) | |
ORDER BY department; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment