In Chapter 4, you learned how to use aggregate functions to produce summary data. Queries using aggregate functions show only summary information by grouping data.
The Transact-SQL COMPUTE clause provides the capability to create reports that show detailed and summary information.
COMPUTE is not an ANSI standard feature.
To add summary information to any standard query, just add the COMPUTE clause at the end of the query, specifying which aggregate function to compute, as in Listing 11.18.
-- This is a normal query to retrieve ...