Use aggregate functions in queries:
SUM () returns all the sum of the values in the expression, and the null value is omitted for the column of the numeric type.
AVG () returns the average of all the values in the expression, and the null value is omitted for the column of the numeric type.
Max () returns the maximum value in an expression.
MIN () returns the minimum value in an expression.
--Query Number 6 sales total select SUM (Amount) from OrderInfo WHERE commid=6
--Purchase price of book audio select AVG (inprice) from Commid WHERE id=2
--ask for the highest and lowest price in the purchase price: SELECT MAX (Inprice) as High, Min (inprice) as lowest price from Commid WHERE id=1
--count with the number of records in the statistics Recordset, use COUNT () to count the number of users select COUNT (*) from UserInfo
7-07 Aggregation functions