select Department.name as Department , t2.name as Employee , t2.salary
from (select *
from(select id ,name ,salary ,departmentId ,dense_rank() over(partition by departmentId order by Salary desc) as ranke
from Employee)as t1
where ranke<=3) as t2
left join Department on Department.id = t2.departmentId