In this exercise we are going to write a SQL to find employees who have the highest salary in their departments
select * from Employee where salary in ( select max(e.Salary) from Employee e group by DepartmentId )
select * from Employee where salary in
(
select max(e.Salary)
from Employee e
group by DepartmentId
)