题解 | #查找所有员工的last_name和first_name以及对应的dept_name#
查找所有员工的last_name和first_name以及对应的dept_name
http://www.nowcoder.com/practice/5a7975fabe1146329cee4f670c27ad55
select
t.last_name,t.first_name,d.dept_name
from
(select
e.last_name,e.first_name,de.dept_no
from
employees as e
left join
dept_emp as de
on
de.emp_no = e.emp_no) as t
left join
departments as d
on
d.dept_no = t.dept_no;