题解 | 查找所有员工的last_name和first_name以及对应的dept_name
with tmp as ( select t1.*,t2.dept_no from employees as t1 left join dept_emp as t2 on t1.emp_no = t2.emp_no) select t.last_name,t.first_name,d.dept_name from tmp as t left join departments as d on t.dept_no = d.dept_no;