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.
Exempel på förväntad utdata
Så här ser ett korrekt svar ut — radantalet är dess eget, det behöver inte matcha schematabellerna.
| id | reports |
|---|---|
| 1 | 6 |
| 2 | 3 |
| 3 | 1 |
Logga in för att se historik över inskick
Logga inLogga in för att använda AI-mentorn
Logga in