Microsoft's compensation team is auditing pay structures and wants to find employees who earn strictly more than their direct manager. Employees without a manager (`manager_id` is NULL) cannot be compared and should not appear. Write an SQL query that returns `employee_name`, `employee_salary`, `manager_name` and `manager_salary` for every such employee. Order the results by the employee's `employee_id` ascending.
Loading…
Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.
Ask questions, share alternate queries, and explore solutions
Your recent query executions and answer checks
This will insert the verified MySQL solution into your editor so you can study how each clause transforms the table.