Skip to main content
SQL • LESSON 64

AVG

How can we calculate the average employee salary?

Intermediate3 Minutes770 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