diff --git a/jOOQ-website/src/main/resources/html-util.xsl b/jOOQ-website/src/main/resources/html-util.xsl index 46fdc41ca5..b3dc7b8e5b 100644 --- a/jOOQ-website/src/main/resources/html-util.xsl +++ b/jOOQ-website/src/main/resources/html-util.xsl @@ -162,10 +162,10 @@
|
- |
- |
+ The SQL standard defines special functions that can be used in the
+ In English, the ROLLUP() grouping function provides N+1 groupings, when N is the number of arguments to the ROLLUP() function. Each grouping has an additional group field from the ROLLUP() argument field list. The results of the second query might look something like this:
+
+ CUBE() is different from ROLLUP() in the way that it doesn't just create N+1 groupings, it creates all 2^N possible combinations between all group fields in the CUBE() function argument list. Let's re-consider our second query from before:
+
+ The results would then hold: +
+ +
+ GROUPING SETS() are the generalised way to create multiple groupings. From our previous examples
+
ROLLUP(AUTHOR_ID, PUBLISHED_IN) corresponds to GROUPING SETS((AUTHOR_ID, PUBLISHED_IN), (AUTHOR_ID), ())CUBE(AUTHOR_ID, PUBLISHED_IN) corresponds to GROUPING SETS((AUTHOR_ID, PUBLISHED_IN), (AUTHOR_ID), (PUBLISHED_IN), ())
+ This is nicely explained in the SQL Server manual pages about GROUPING SETS() and other grouping functions:
+ http://msdn.microsoft.com/en-us/library/bb510427(v=sql.105)
+
+ jOOQ fully supports all of these functions, as well as the utility functions GROUPING() and GROUPING_ID(), used for identifying the grouping set ID of a record. The
+ MySQL and CUBRID don't know any grouping functions, but they support a WITH ROLLUP clause, that is equivalent to simple ROLLUP() grouping functions. jOOQ simulates ROLLUP() in MySQL and CUBRID, by rendering this WITH ROLLUP clause. The following two statements mean the same:
+