SELECT de.emp_no, dm.emp_no AS manager
FROM dept_emp de
JOIN dept_manager dm
    USING(dept_no)
WHERE de.emp_no != dm.emp_no