select t.* from ( select d.dept_no,e.emp_no,s.salary from employees e join dept_emp d on e.emp_no=d.emp_no join salaries s on e.emp_no=s.emp_no ) t where not exists( select * from dept_manager de where de.emp_no=t.emp_no and de.dept_no=t.dept_no )