Solved programming problem

Show the department wise total no of employees, maximum and minimum salary in that department, average and total salary paid for that department from the employees table

Source code

SELECT COUNT(EMPLOYEE_ID) AS "TOTAL Employee",

    MAX(SALARY) AS "MAX SAL",

    MIN(SALARY) AS "MIN SAL",

    AVG(SALARY) AS "AVG SAL",

    SUM(SALARY) AS "Total SAL"

FROM employees

GROUP BY DEPARTMENT_ID;
Join the discussion

Add your comment