181. Employees Earning More Than
2018-07-16 本文已影响48人
wenmingxing
题目链接:
181. Employees Earning More Than Their Managers
解析:
这是一道常见的类型题目,我们需要两次使用Employee表。
题解:
# 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;