Repository: trafodion Updated Branches: refs/heads/master 4ca0b606a -> 1f55c285b
Add ROLLUP Function in Aggregate (Set) Function Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/e36a94da Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/e36a94da Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/e36a94da Branch: refs/heads/master Commit: e36a94da5357abc7692d62e46eb756e3f0ea2650 Parents: 47713b9 Author: liu.yu <[email protected]> Authored: Mon Jan 29 13:35:40 2018 +0800 Committer: liu.yu <[email protected]> Committed: Mon Jan 29 13:35:40 2018 +0800 ---------------------------------------------------------------------- .../src/asciidoc/_chapters/sql_functions_and_expressions.adoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/e36a94da/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---------------------------------------------------------------------- diff --git a/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc b/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc index 0d5c3c7..c72feeb 100644 --- a/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc +++ b/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc @@ -59,6 +59,8 @@ values from a group. evaluation of the expression argument. | <<min_function,MIN Function>> | Determines a minimum value from the group of values derived from the evaluation of the expression argument. +| <<rollup_function,ROLLUP Function>> | Calculates multiple levels of subtotals aggregating from right to left through the +comma-separated list of columns, and provides a grand total. | <<stddev_function,STDDEV Function>> | Computes the statistical standard deviation of a group of numbers derived from the evaluation of the expression argument of the function. The numbers can be weighted. @@ -6343,7 +6345,7 @@ SET jobdesc = RIGHT (jobdesc, 12); The ROLLUP function calculates multiple levels of subtotals aggregating from right to left through the comma-separated list of columns, and provides a grand total. -ROLLUP is an extension to the 'GROUP BY' clause. Related features such as the GROUPING function can be used with 'ORDER BY' to control the placement of summary results. +ROLLUP is an extension to the `GROUP BY` clause. Related features such as the GROUPING function can be used with `ORDER BY` to control the placement of summary results. ``` SELECTâ¦GROUP BY ROLLUP (column 1, [column 2,]â¦[column n]) @@ -6456,7 +6458,6 @@ DELIVERY_YEAR REGION TOTAL_REVENUE --- 7 row(s) selected. ``` + - * This is an example of grouping by three rollup columns. + ``` @@ -6488,7 +6489,7 @@ These rows have the _region_ and _product_ columns set to NULL. This row has the _delivery_year_, _region_ and _product_ columns set to NULL. [[examples_of_null]] -=== Examples of NULL +==== Examples of NULL The example below demonstrates how ROLLUP treats NULLs in the selected columns and generates NULLs for super-aggregate rows.
