with t1 as( select de.emp_no, dept_no, salary from dept_emp de left join salaries sa on de.emp_no = sa.emp_no ), t2 as ( select *, row_number() over (partition by dept_no order by salary desc) as rk from t1 ) select dept_no, emp_no, salary from t2 where rk = 1 order by de...