文章目录
题目
代码(7.24 首刷看解析)
on后面跟的是连接条件,这取决于什么样的数据会连接在一起;而where后面才是筛选条件。
# Write your MySQL query statement below
select e1.employee_id from employees e1 left join employees e2 on e1.manager_id = e2.employee_id
where e1.salary < 30000 and
e1.manager_id is not null and
e2.employee_id is null
order by e1.employee_id;