If you have created a summarized column, you can choose to classify your data into
groups based on the values in a column. This is equivalent to using the GROUP BY clause
in an SQL query. For example, if you are calculating the average height of a group
of students, you
might want to group the results by age so that you can see the average height for
each age group.
By default, the Automatically
select groups option is selected on the Group tab. When this option is selected and you have performed a summary function on a
column, your query is automatically grouped by all columns without summary functions.
You can choose
to edit the list of columns that the query is grouped by.
To group your output:
-
In the query window, click the
Group tab.
-
You can add one or more
columns to the
Group tab by dragging them
from the columns list to the
Group tab.
You can also click
on the
Group tab toolbar and select one or more columns from the
Choose Column window.
Note: To remove all of the automatically
selected columns from the Group tab, clear
the Automatically select groups option.
-
To change the order
in which the columns are used to group the data, select the column
that you want to move and click
and
.
The following example
shows you how to find the average weight of students in each age group.
First, add the Age and Weight columns to the Select tab, and then
select the AVG summary function for the Weight column:
To see the average weight of students by age, the query is grouped by the Age column.
The results show the average weight for each age group:
Note: By default, the query generates
a table of the result. To generate a report of the results (which
is displayed in
Results tab), you must specify
report as the output type for the query.
For more information,
see Saving Your Results.