SQL19 查找所有员工的last_name和first_name以及对应的dept_name

https://www.nowcoder.com/practice/5a7975fabe1146329cee4f670c27ad55?tpId=82&tags=&title=&difficulty=0&judgeStatus=0&rp=1

SELECT last_name, first_name, dept_name
FROM employees AS e LEFT JOIN (
    SELECT emp_no, dept_name
    FROM dept_emp de LEFT JOIN departments d
    ON de.dept_no = d.dept_no)k
ON e.emp_no = k.emp_no;
上一篇:解决ModuleNotFoundError: No module named ‘自定义模块‘错误的方法


下一篇:SQL17 获取当前薪水第二多的员工的emp_no以及其对应的薪水salary