select department ,employee_name ,salary from 
(select department ,employee_name ,salary
,rank () over(partition by department  order by salary desc) ranking
from employees)rk
where rk.ranking <=2