BiruLyu
6/2/2017 - 6:59 AM

181. Employees Earning More Than Their Managers(1st).sql

# Write your MySQL query statement below

SELECT A.Name AS Employee
FROM Employee AS A INNER JOIN Employee AS B ON A.ManagerId = B.Id
WHERE A.Salary > B.Salary
# Write your MySQL query statement below
select E2.name as Employee
from Employee E1, Employee E2
where E1.Id = E2.ManagerId and E1.Salary < E2.Salary