

This operator was proposed in Gray et al. (1997), and, subsequently in Gyssens & Lakshamanan (1997) and in Nguyen, Tjoa, & Wagner (2000).
The traditional groupby can generate the core of the ndimensional data cube. The n1 lowerdimensional aggregates appear as points (0D), lines (1D), planes (2D), cubes (3D), or hypercubes hanging off the data cube core.
The data cube operator builds a table containing all these aggregate values. The total aggregate using function f( ) is represented as the tuple: ALL, ALL, ALL, …, ALL, f(∗). Points in higher dimensional planes or cubes have fewer ALL values. Then, the cube operator is the ndimensional generalization of simple aggregate functions. These concepts were represented in the Figure 2.
As discussed in Gray et al. (1997), creating a data cube requires generating the power set of the aggregation columns. Since the cube is an aggregation operation, it makes sense to externalize it by overloading the SQL groupby operator. Figure 21 (taken from Gray et al., 1997) includes an example of the cube syntax.

