I want to select employees who earns more than their managers. I have these SQL statements I wrote below, but how exactly would I combine these to make one statement?
SELECT E.Salary
FROM Employee E
WHERE E.ManagerId = E.Id
SELECT *
FROM Employee M
WHERE M.Salary > E.Salary AND M.ManagerId != M.Id