It happens more than you'd think — individual contributors earning more than the person they report to. Using the employees table, find every employee whose salary is strictly greater than their direct manager's.
Return employee_name, employee_salary, manager_name, and manager_salary, ordered by employee_name.
employees
| column | type |
|---|---|
| id | INTEGER |
| name | TEXT |
| salary | INTEGER |
| manager_id | INTEGER |
Employees with no manager (the CEO) have manager_id = NULL.
| id | name | salary | manager_id |
|---|---|---|---|
| 1 | Alice | 100000 | NULL |
| 2 | Bob | 90000 | 1 |
| 3 | Carol | 110000 | 1 |
| 4 | Dave | 95000 | 2 |
Alice is CEO (no manager). Carol earns 110,000 which is more than Alice's 100,000. Dave earns 95,000 which is more than Bob's 90,000.
| employee_name | employee_salary | manager_name | manager_salary |
|---|---|---|---|
| Carol | 110000 | Alice | 100000 |
| Dave | 95000 | Bob | 90000 |