AVG

noun

say it: “AV-rij” /ˈævrɪdʒ/

A SQL aggregate function that returns the average of a column's values.

What is AVG in a relational database?

AVG — An aggregate function returning the average of non-NULL numeric values.

SELECT customer_id, AVG(total_amount) AS average_total
FROM purchase_order
GROUP BY customer_id;

In a sentence

  • “AVG(UnitPrice) gave the average price of each category.”

Level: Apprentice · More SQL terms at this level

Updated