select a.emp_no,e.emp_no manager_no,b.salary emp_salary,e.salary manager_salary from dept_emp a inner join salaries b on a.emp_no=b.emp_no inner join ( select c.dept_no,d.salary,c.emp_no from dept_manager c inner join salaries d on c.emp_no=d.emp_no ) ...