题解
查找所有员工的last_name和first_name以及对应的dept_name
https://www.nowcoder.com/practice/5a7975fabe1146329cee4f670c27ad55
SELECT e.last_name,e.first_name,a.dept_name FROM employees AS e LEFT JOIN ( SELECT dp.emp_no,d.dept_name FROM departments AS d INNER JOIN dept_emp AS dp ON d.dept_no = dp.dept_no ) AS a ON e.emp_no = a.emp_no;