Summaries
A summary adds a count, a sum, an average, a minimum or a maximum under a column of the results, and in the header of every group when the rows are grouped. It is the quickest way to answer "how much is this together" without writing sum() into the statement and running it again. The examples use the result of the statement described in Results. Summaries in the form described here are available from release 28.0.
A summary counts what has already arrived, and it follows the filter. A sum or count in the statement decides what is fetched, and the summary decides what is looked at.
Choosing a Summary
The sigma in the heading of a column opens a choice of summaries for that column, and "Summary..." in the menu behind the button with three dots does the same. The choices are the captions "None", "Count", "Sum", "Average", "Minimum" and "Maximum", of which one can be chosen. A choice applies at once.
A column offers the summaries which suit its type:
- A number: "Count", "Sum", "Average", "Minimum" and "Maximum".
- A date, a time and a text: "Count", "Minimum" and "Maximum".
- A yes or no value and a binary value: "Count".
A column shows one summary. Choosing another one replaces the first. Every column can have its own summary, so one column can show a sum and another one a maximum.
Where a Summary Is Shown
A summary appears in a cell of its own in the total row under the grid, as the caption and the outcome, such as Sum = 67,50. It stands under the column which it summarises. When the rows are grouped, the same summary stands in the header of every group, over the rows of that group. A column which is too narrow for its summary is made wider.
The outcome has the type of the column and its format, so the sum of a column of amounts with two decimals has two decimals, and the maximum of a column of dates is a date in the format of the column. A count is a whole number, and the average of whole numbers is written with two decimals.
The result which the statement of Results gives, grouped on CATEGORY, has the following summaries when "Sum" is chosen for AMOUNT and "Maximum" for DAY_VALUE:
- the header of the group
Alpha:Sum = 22,50andMaximum = 05/10/2026 00:00:00; - the total row:
Sum = 67,50andMaximum = 05/10/2026 00:00:00.
How a Summary Counts
The summaries count as follows:
- "Count" is the number of values which are not empty, as
count(column)is. A column with empty cells counts fewer than the rows: the columnAMOUNTof the example counts 9 of its 12 rows. - "Average" is the sum divided by that count, so the empty values do not count along: the average of the column
AMOUNTis7,50. - A column of floating point numbers is summed as floating point numbers.
- A text in a number column is counted but not added up.
The summaries are saved with the layout of the grid; see Display Layout. An export to Microsoft Excel carries them into the workbook; see Exporting Results.
Differences With Windows
Invantive Query Tool for Microsoft Windows lets a column show several summaries, one under the other. This product shows one per column; see Limitations.