Every employee record stores a manager_id that points to another row in the same table. Using the employees table, return each employee's name alongside their manager's name. Employees with no manager should still appear in the result with NULL for the manager name.
Return employee_name and manager_name, sorted by employee_name.
employees
| column | type |
|---|---|
| id | INTEGER |
| name | TEXT |
| manager_id | INTEGER |
manager_id is NULL for employees at the top of the org chart.
| id | name | manager_id |
|---|---|---|
| 1 | Alice | NULL |
| 2 | Bob | 1 |
| 3 | Carol | 1 |
| 4 | Dave | 2 |
| employee_name | manager_name |
|---|---|
| Alice | NULL |
| Bob | Alice |
| Carol | Alice |
| Dave | Bob |
Alice reports to nobody, so her manager is NULL. Bob and Carol both report to Alice. Dave reports to Bob.