select em.last_name last_name,em.first_name first_name,dd.dept_name
from(
select dm.dept_name,emp.emp_no
from departments dm inner join dept_emp emp on dm.dept_no = emp.dept_no
) dd right join employees em on em.emp_no=dd.emp_no