ROLLUP « Analytical Functions « SQL Server / T-SQL Tutorial

14.8.1.Using the ROLLUP Operator
14.8.2.A summary query that includes a final summary row with 'WITH ROLLUP'
14.8.3.Group hierarchy using the ROLLUP operator is determined by the order in which the grouping columns are specified.
14.8.4.A summary query that includes a summary row for each grouping level
14.8.5.WITH ROLLUP for calculating subtotals and totals on the first column in the GROUP BY column list
14.8.6.Summarizing Data with ROLLUP
14.8.7.ROLLUP Returns Super Aggregation Only in One Direction
14.8.8.Using ROLLUP to Get the Order Count by Year and Month