Using Queries to Make Data Meaningful - Part 2

In Access queries let you retrieve information from one or more tables on a set of defined search conditions. Learn how to use queries in Access here.

Using Count and Group By functions in a query

When you use the Totals command in a query, Access will automatically group every field by the values in each field. This means it will look for repeating values and group like values together so they appear as one record rather than as many records. This is called the Group By function.

Let's use our bookstore database as an example. If we run a query to see the information for every book that has been ordered, we'd get a list that looks like this:

Ordered BooksQuery for Ordered Books

Notice that we get a record back for every order of each book that has been ordered.

In our bookstore example query, we want to see these titles grouped together so we see each ordered title only one time. To do this, we use the Count and Group By options.

To use the Count and Group By options in a query: