Skip to main content
SQL โ€ข LESSON 64

AVG

How can we calculate the average employee salary?

Intermediateโฑ 3 Minutesโญ 770 XP
๐Ÿค” THE QUESTION

How can we calculate the average employee salary?

๐Ÿ’ก WHAT IS IT?

AVG() calculates the arithmetic mean of all non-NULL values in the given column.

๐ŸŽฏ WHAT IS IT USED FOR?

Average order value (AOV), mean compensation, performance benchmarks.

๐Ÿ’ป EXAMPLE
SELECT AVG(salary) AS average_salary
FROM employees;

๐ŸŽฏ Mission Objectives

Practice typing production-grade SQL code for AVG.

  • โœ“ AVG() function
  • โœ“ Arithmetic mean
  • โœ“ Benchmark metrics
  • โœ“ Column aggregation