Count no. of employees in each department
SELECT DEPT_NAME,COUNT(EMP_ID)
FROM DEPARTMENT D LEFT JOIN EMPLOYEE E ON D.DEPT_ID=E.DEPARTMENT_ID
GROUP BY DEPT_NAME
SELECT DEPT_NAME,COUNT(EMP_ID)
FROM DEPARTMENT D LEFT JOIN EMPLOYEE E ON D.DEPT_ID=E.DEPARTMENT_ID
GROUP BY DEPT_NAME
No comments:
Post a Comment