CTE || FIRST_VAL
\nwith temporary_table(name,salary,departmentId,top_salary) as\n(select e.name,e.salary,e.departmentId,FIRST_VALUE(e.salary) over(partition by departmentId orde
```\nwith temporary_table(name,salary,departmentId,top_salary) as\n(select e.name,e.salary,e.departmentId,FIRST_VALUE(e.salary) over(partition by departmentId order by salary desc) as      top_salary from Employee e)\n\n\nselect d.name as Department, t.name as Employee, t.salary as Salary \nfrom temporary_table t inner join Department d\non t.departmentId=d.id\nwhere t.salary=t.top_salary;\n```
[]