Don Schlichting examines several SQL Server 2008 grouping functions including GROUP BY, GROUPING SETS, CUBE, and ROLLUP. In addition, he demonstrates how to use SUM and COUNT in a WHERE clause after rows have been grouped.

This story continues at http://www.databasejournal.com/featu...erver-2008.htm