Loading lesson path
Concept visual
Start at both ends
Return the average value for the "Price" column in the "Products" table:
AveragePrice FROM Products;The AVG() function returns the average value of an expression.
NULL values are ignored.
expression )
Required. A numeric value (can be a field or a formula)
SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse
Select all the products that have a price above the average price:
SELECT * FROM Products
WHERE Price > (SELECT AVG(Price) FROM Products);❮ SQL Server Functions