Aggregates and Functions for Multilevel Grouping

Vertica provides several aggregates and functions that group the results of a GROUP BY query at multiple levels.

Aggregates for Multilevel Grouping

Use the following aggregates for multilevel grouping:

You can use CUBE or ROLLUP expressions inside GROUPING SETS expressions. Otherwise, you cannot nest multilevel aggregate expressions.

Grouping Functions

You use one of the following three grouping functions with ROLLUP, CUBE, and GROUPING SETS:

These functions are typically used with multilevel aggregates.