Search
⌘K
Get Premium
Leetcode 1731. The Number of Employees Which Report to Each Employee
Given an Employees table, identify employees who are managers (have at least one direct report) and return each manager's id, name, the count of direct reports, and the reports' average age rounded to the nearest integer, ordered by employee_id. This is solved by aggregating (count and avg+round) over rows grouped by the manager id—typically via a GROUP BY on reports_to or a self-join.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.