SUM
AVG
MIN
Returns the average.
AVG(expr)
Enter values below to update the example in real time.
department_id
salary
avg_salary
employees
SELECT department_id, AVG(salary) AS avg_salary FROM employees GROUP BY department_id;