in the desolation they rolled themselves upon me."
-- Job 30:14
We are now onto WITH CUBE and WITH ROLLUP in our trip down the SELECT clause.
- FROM
- ON
- JOIN
- WHERE
- GROUP BY
- WITH CUBE or WITH ROLLUP
- HAVING
- SELECT
- DISTINCT
- ORDER BY
- TOP
Pinal Dave is one of the first people I look to when I need to know something about SQL Server here is a link to his blog on WITH ROLLUP: http://blog.sqlauthority.com/2010/02/24/sql-server-introduction-to-rollup-clause/
Craig Freedman has a blog entry on WITH ROLLUP: http://blogs.msdn.com/b/craigfr/archive/2007/09/21/aggregation-with-rollup.aspx and another on WITH CUBE: http://blogs.msdn.com/b/craigfr/archive/2007/09/27/aggregation-with-cube.aspx