select t.emp_no, t.manager_no, t.emp_salary, t.manager_salary from (select dp.dept_no, dp.emp_no, dr.emp_no manager_no, ss.salary emp_salary, ss2.salary manager_salary, dp.to_date from dept_emp dp left join dept_manager dr on dp.dept_no = dr.dept_no left join salaries ss on ss.emp_no ...