To use aggregate functions in queries:
To add an aggregate function to a query, begin with a query open in Design view. Click the Totals button to add the totals row to the query grid. Click the total cell for the field that includes the values you want to total. Click the arrow and select the aggregate function you want. Click the Run button to see the results of your query. Each row shows the calculated total for that group of records.