Solved programming problem

For each manager, show the manager_name and total no of employees under his supervision

Source code

SELECT mng.EMPLOYEE_ID,COUNT(e.EMPLOYEE_ID)

FROM employees AS e 

    JOIN  

    employees AS mng

    ON e.MANAGER_ID = mng.EMPLOYEE_ID

GROUP BY mng.EMPLOYEE_ID;
Join the discussion

Add your comment