GROUP BY produces a single result set. There is one row for each group containing only the grouping columns and aggregate functions that show the subaggregate for that group.
The select list can contain only the grouping columns and aggregate functions.
COMPUTE produces multiple result sets. One kind of result set contains the detail rows for each group containing the expressions from the select list.
The other type of result set contains the subaggregate for a group, or the total aggregate for the SELECT statement.
The select list can contain expressions other than the grouping columns or aggregate functions.
The aggregate functions are specified in the COMPUTE clause, not in the select list.
No comments:
Post a Comment