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;
【本文章出自博客园willaty,转载请注明作者出处,误差欢迎指出~】