AVG is an aggregate function that calculates the arithmetic mean of non-NULL numeric values.
Average values help analysts understand typical salaries, transaction amounts, sales values, scores, and other business measures.
Calculate the average employee salary.
SELECT
AVG(Salary) AS AverageSalary
FROM Employees;
AVG is used for salary analysis, average order value, average transaction size, performance analysis, and KPI reporting.
- AVG calculates an arithmetic mean.
- NULL values are generally ignored.
- It works with numeric values.
- AVG can be used with GROUP BY.
- The result may depend on the data type and database.
What does AVG calculate?
AVG calculates the arithmetic mean of non-NULL numeric values.
Does AVG include NULL values?
No. AVG normally ignores NULL values.