leetcode 181. Employees Earning More Than Their Managers

select a.Name as Employee from Employee a join Employee b On a.ManagerId = b.Id where a.Salary > b.Salary;

直接写也行

SELECT e1.Name FROM Employee e1, Employee e2 WHERE e1.ManagerId = e2.Id AND e1.Salary > e2.Salary;

 

posted on 2018-01-29 23:01  willaty  阅读(107)  评论(0编辑  收藏  举报

导航