Write a query that returns every employee's full path from the top of
the org chart down to them, as a single string joined with > .
Table: `employees`
| id | name | manager_id |
|---|---|---|
| 1 | CEO | NULL |
| 2 | VP Eng | 1 |
| 3 | VP Sales | 1 |
| 4 | Eng Manager | 2 |
| 5 | Engineer A | 4 |
| 6 | Engineer B | 4 |
| 7 | Sales Rep | 3 |
Expected output (columns: id, path), ordered by id:
1|CEO
2|CEO > VP Eng
3|CEO > VP Sales
4|CEO > VP Eng > Eng Manager
5|CEO > VP Eng > Eng Manager > Engineer A
6|CEO > VP Eng > Eng Manager > Engineer B
7|CEO > VP Sales > Sales RepHint — build the path by string-concatenating (
||) the parent'salready-built path with
>and the current employee's name.
Sample tests