#1138

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.

Δείγμα αναμενόμενης εξόδου

Έτσι μοιάζει μια σωστή απάντηση — το πλήθος γραμμών της είναι δικό της, δεν χρειάζεται να ταιριάζει με τους πίνακες του σχήματος.

idreports
16
23
31

Το αποτέλεσμα του ερωτήματός σας θα εμφανιστεί εδώ