How to: Use Aggregate Functions to Work with Values in Access SQL
Access Developer Reference |
Aggregate functions are used to calculate statistical and summary information from data in tables. These functions are used in SELECT statements, and all of them take fields or expressions as arguments.
To count the number of records in a result set, use the Count function. Using an asterisk with the Count function causes Null values to be counted as well.
|
To count only non-Null values, use the Count function with a field name:
|
To find the average value for a column or expression of numeric data, use the Avg function:
|
To find the total of the values in a column or expression of numeric data, use the Sum function:
|
To find the minimum value for a column or expression, use the Min function:
|
To find the maximum value for a column or expression, use the Max function:
|
To find the first value in a column or expression, use the First function:
|
To find the last value in a column or expression, use the Last function:
|