Roll up
Definition
Returns a GroupBy clause and extra rows that represent the subtotals for all combinations of grouping columns. Roll up does not create all possible grouping sets.
Options
-
Roll up columns (+add):
-
Agg function (+add):
Parameters
-
Column input:
- Def: Specify the name of the column.
-
Column output:
- Def: Specify the name of the column.
-
Function:
- Def: Specify the function to use.
Additional Comment
The ROLLUP assumes a hierarchy among the input columns. See example
Functions:
-
count:
- Def: Count the element in the Column input for each group.
Link to the Count page.
- Def: Count the element in the Column input for each group.
-
sum:
- Def: Sum all the element of the Column input for each group.
Link to the Sum page.
- Def: Sum all the element of the Column input for each group.
-
avg:
- Def: Returns the average of the Column input for each group.
Link to the Average page.
- Def: Returns the average of the Column input for each group.
-
mean:
- Def: Returns the mean of the Column input for each group.
-
var:
- Def: Returns the variance of the Column input for each group.
Link to the Var page.
- Def: Returns the variance of the Column input for each group.
-
std:
- Def: Returns the standart deviation of the Column input for each group.
-
max:
- Def: Returns the maximum value of the Column input for each group.
Link to the Max page.
- Def: Returns the maximum value of the Column input for each group.
-
min:
- Def: Returns the maximum value of the Column input for each group.
Link to the Min page.
- Def: Returns the maximum value of the Column input for each group.
Example
ROLLUP(YEAR,MONTH,DAY)
->
YEAR,MONTH,DAY
YEAR,MONTH
YEAR