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.
Ukážka očakávaného výstupu
Takto vyzerá správna odpoveď — počet riadkov je jej vlastný, nemusí sa zhodovať s tabuľkami schémy.
| id |
|---|
| 4 |
| 5 |
| 6 |
Prihláste sa, aby ste videli históriu odoslaní
Prihlásiť saPrihláste sa, aby ste mohli používať AI mentora
Prihlásiť sa