When you add or edit an ad-hoc query and select a field under Result fields to display on the Select filter and output fields tab, the Summarize button enables you to view a calculation of the field results rather than the actual contents of the field.User-added image
Query is a way to group records; it is not a reporting tool. As such, the output fields identify records included in the query. If a field with a one-to-many relationship is selected under Include records where or Result fields to display, the record may appear multiple times in the query: once for each time the record satisfies the selected criteria. This allows you to check your query to ensure you get the expected results.

The Summarize button's functions - Count, Sum, Average, Min, Max – allow you to see summarized information for one-to-many fields, rather than each value on a separate row in your query results.
Summary FunctionDescriptionExample
 COUNTFor number or amount fields: the total number of records included.
 
Using the summarize function COUNT on Revenue\Amount in a constituent query will produce results that display the total quantity of revenue transactions per constituent.
SUMFor number or amount fields: the combined total of the numbers.
 
Using the summarize function SUM on Revenue\Amount in a constituent query will produce results that display the total value of revenue transactions per constituent.
AVGFor number or amount fields: the average of the numbers included.
 
Using the summarize function AVG on Revenue\Amount in a constituent query will produce results that display the average value of all of the revenue transactions per constituent.
MAXFor number or amount fields: the largest number is displayed.
 
For date fields: the maximum or most recent date is displayed.
 
 Using the summarize function MAX on Revenue\Amount in a constituent query will produce results that display the largest revenue transaction amount per constituent.
 
Using the summarize function MAX on Revenue\Date in a constituent query will produce results that display the most recent revenue transaction date per constituent.
MINFor number or amount fields: the
lowest number is displayed.

For date fields: to minimum or oldest date is displayed.
Using the summarize function MIN on Revenue\Amount in a
constituent query will produce results that display the smallest
revenue transaction amount per constituent.

Using the summarize function MIN on Revenue\Date in a
constituent query will produce results that display the oldest
revenue transaction date per constituent.


This five-minute Altru video will introduce you to the ad-hoc query summarization tool and how to use it in a query.