1. 程式人生 > >leetcode 超過經理收入的員工

leetcode 超過經理收入的員工

problem

Select e1.Name as Employee from Employee e1 , Employee e2  where e1.ManagerId = e2.Id and e1.Salary > e2.Salary

或者使用join

# Write your MySQL query statement below
Select e1.Name as Employee from Employee e1 join Employee e2  on e1.ManagerId = e2.Id and e1.Salary > e2.Salary