SQL AVG Function

Example

Return the average value for the “Price” column in the “Products” table:

SELECT AVG(Price) AS AveragePrice FROM Products;

Definition and Usage

The AVG() function returns the average value of an expression.

Note: NULL values are ignored.

Syntax

AVG(expression)

Continue reading SQL AVG Function

SQL AVG() Function

The SQL AVG() Function

The AVG() function returns the average value of a numeric column.

Example

Find the average price of all products:

SELECT AVG(Price)
FROM Products;

Note: NULL values are ignored.


Continue reading SQL AVG() Function