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.
Exemple de sortie attendue
Voici à quoi ressemble une réponse correcte — son nombre de lignes lui est propre, il n'a pas à correspondre aux tables du schéma.
| id | reports |
|---|---|
| 1 | 6 |
| 2 | 3 |
| 3 | 1 |
Connectez-vous pour voir l'historique des soumissions
Se connecterConnectez-vous pour utiliser le Mentor IA
Se connecter