Easy | Sub Query
\n# Code\n\n# Write your MySQL query statement below\n\nwith cte as(\nselect e.name as Employee, e.salary, d.name as Department \nfrom Employee e join Departmen
\n# Code\n```\n# Write your MySQL query statement below\n\nwith cte as(\nselect e.name as Employee, e.salary, d.name as Department \nfrom Employee e join Department d\non e.departmentId = d.id \n)\nselect Employee, salary,Department from cte having (Department,salary) in \n(select Department,max(salary) as salary from cte group by Department)\n```
['MySQL']