Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This function returns a bitvector corresponding to whether each column is present or not. For each column, a value of "1" is produced for a row in
the result set if that column has been aggregated in that row, otherwise the value is "0". This can be used to differentiate when there are nulls
in the data.

Consider the following example:

Column1 (key)

Column2 (value)

1

NULL

1

1

1

2

1

3

3

NULL

4

5

Cubes and Rollups

The general syntax is CUBE ( ). It is used with the GROUP BY only. CUBE creates a subtotal of all possible combinations of the set of column in its argument. Once we compute a CUBE on a set of dimension, we can get answer to all possible aggregation questions on those dimensions.

...