Solved programming problem

Show the total no of employees, their total salary, their average salary, their max salary, their min salary from employees table.

Source code

SELECT COUNT(*) AS "TOTAL",

    SUM(SALARY) AS "TOTAL SALARY",

    AVG(SALARY) AS "AVG SALARY",

    MAX(SALARY) AS "MAX SALARY",

    MIN(SALARY) AS "MIN SALARY"

FROM employees;
Join the discussion

Add your comment