How many people report to a manager
For each manager in emp, count how many people are under them across all levels — direct and indirect reports. Return the manager id and the count reports, only for those with at least one report, 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 | reports |
|---|---|
| 1 | 6 |
| 2 | 3 |
| 3 | 1 |
Conectează-te pentru a vedea istoricul soluțiilor trimise
Conectează-teConectează-te pentru a folosi Mentorul AI
Conectează-te