Return the average value for the "Price" column in the "Products" table:
SELECT Avg(Price) AS AveragePrice FROM Products;
Try it Yourself »
The Avg() function returns the average value of an expression.
Note: NULL values are ignored.
Avg(
expression)
Parameter | Description |
---|---|
expression | Required. A numeric value (can be a field or a formula) |
Works in: | From Access 2000 |
---|
Select all the products that have a price above the average price:
SELECT * FROM Products
WHERE Price > (SELECT Avg(Price) FROM Products);
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!