Workday's HR team is generating an org chart report and needs every employee paired with their manager's name. Using the employees table, return each employee's name alongside their manager's name - employees with no manager should still appear 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.