All reports under a manager
In the org chart emp, each employee names a manager in manager_id. Find everyone who reports — directly or through a chain of managers — to the employee with id = 2. Return id ascending.
Expected output sample
This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.
| id |
|---|
| 4 |
| 5 |
| 6 |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in