The name path from the top to an employee
For each employee in emp, build the chain of names from the topmost manager down to them, joined by > (e.g. CEO > VP-Eng > EngMgr). Return id and path, ordered by id.
Exemplu de ieșire așteptată
Așa arată un răspuns corect — numărul său de rânduri îi este propriu, nu trebuie să se potrivească cu tabelele din schemă.
| id | path |
|---|---|
| 1 | CEO |
| 2 | CEO > VP-Eng |
| 3 | CEO > VP-Sales |
Conectează-te pentru a vedea istoricul soluțiilor trimise
Conectează-teConectează-te pentru a folosi Mentorul AI
Conectează-te