Skip to content

Commit

Permalink
Create Department-Highest-Salary.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
gabedonnan authored Mar 5, 2023
1 parent c6fcada commit 90b3808
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SQL/Department-Highest-Salary.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Write your MySQL query statement below
SELECT Department.name AS Department, Employee.name AS Employee, Employee.salary AS Salary
FROM Employee, Department
WHERE Employee.departmentId = Department.id AND (departmentId, salary) IN
(select departmentId, MAX(Salary) AS max FROM Employee GROUP BY departmentId)

0 comments on commit 90b3808

Please sign in to comment.