Group by GROUPING SETS for custom rollups in Oracle

Tuesday Nov 14th 2006 by DatabaseJournal.com Staff
Share:

The GROUPING SETS option of GROUP BY lets you generate custom sets of subtotals, without seeing as many rows of output as GROUP BY CUBE. In this tip, Bob Watkins offers code samples of how to use GROUPING SETS.

[From Builder.com]

When you use GROUP BY with the summary functions like COUNT and SUM, you normally don't get multi-level totals. Each unique combination of the columns in the GROUP BY generates a total, but these totals aren't "rolled up" into higher level totals.

The article continues at http://builder.com.com/5100-6388_14-6134424.html?tag=sc

Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved