O'Reilly logo

2007 Microsoft® Office System Step by Step, Second Edition by Joan Lambert, John Pierce, Steve Lambert, M. Dow Lambert III, Curtis D. Frye, Joyce Cox

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Performing Calculations by Using a Query

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 them 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 get this information is by creating a query that groups the necessary fields and does the math for you. To do this, you use aggregate functions in the query.

Access queries support the aggregate functions shown in the following table:

Function

Calculates

Sum

Total of the values in a field

Avg

Average of the values in a field

Count

Number of values in a field, not counting Null ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required