Creating a Summary Query

Restriction: This topic applies to Windows environments only.

There may be times when you want to generate rows of data that summarize data in your tables. For example, you may want to find a sum or an average for the values in a column. To do this, you create a computed column that includes aggregate (column) functions.

If a computed column involving an aggregate function is added to a query, the system automatically defines a GROUP BY clause for you. If you want to modify this system-defined GROUP BY clause, or if you want to add a GROUP BY clause for a query that does not require one, use the Group command from the Query menu or the Group button on the toolbar.

To add a column to the GROUP BY clause, move it from the left list box to the right list box using the arrow buttons. To change the relative order of columns within the GROUP BY clause, use the Up and Down buttons.

Note:

When including aggregate functions in queries, SQLWizard requires that non-aggregate columns be grouped. SQLWizard automatically performs this grouping for you, and will not allow you to make illegal moves between boxes. You can, however, change the order of the columns in the GROUP BY list.

Uses for summary queries include: