题目链接:
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;
网友评论