Database Reference
In-Depth Information
Summarizing data by using queries
You typically use a query to locate all the records that meet some criteria. But sometimes
you are not as interested in the details of all the records as you are in summarizing the
query results in some way. For example, you might want to know how many orders have
been placed this year or the total dollar value of all orders placed.
The easiest way to extract summary information is by creating a query that groups the nec-
essary fields and does the math for you. The calculations are performed by using one of the
following aggregate functions:
Sum Calculates the total of the values in a field
Avg Calculates the average of the values in a field
Min Extracts the lowest value in a field
Max Extracts the highest value in a field
Count Counts the number of values in a field, not counting Null (blank) values
StDev Calculates the standard deviation of the values in a field
Var Calculates the variance of the values in a field
When you use the Simple Query wizard to create a query based on a table that has fields
containing numeric data, the wizard gives you the option of creating a summary query. If
you select Summary on the wizard's second page and then click Summary Options, the wiz-
ard displays a dialog box in which you can specify the aggregate function you want to use.
Search WWH ::




Custom Search