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.

This story continues at
http://www.dbasupport.com/oracle/news/grouping.shtml