Back to Blog

Beginning SQL

SQL Average

Calculate averages using the SQL AVG function. Learn how to compute mean values, handle NULL values, and group averages by category in SQL Server queries.

1 min read

Last updated on

The SQL Average function is an easy function to use.

Let-s take a look at the Employee table:

select * from employee;


Results:

![SQL Average Results](../../assets/blog/2012/06/image_thumb19.png)

If I want to find the average of the **salary** column, I would write the following query:

select avg(salary) as average_salary from employee;

With the following results:

SQL Avg Results

Notice how we only get one column returned because that is all we asked for.

You can use the SQL Average on any numeric column using this technique.

When we get to the Group By clause, you will see how we can average across different groups of columns.

About Joey Blue

Joey Blue teaches practical data skills that companies actually use. With 25+ years of experience solving real data problems for Fortune 500 companies, he's helped 152,000+ students learn SQL, Power BI, reporting, and modern analytics—cutting straight to what works.