Abstract
GROUP BY queries give you a lot of power when you want to summarize your data. The problem is that sometimes you want to see different levels of aggregation in the same output. T-SQL has a few extensions, such as CUBE, ROLLUP, and COMPUTE, which enable you to get such views of your data. The extensions discussed in this chapter are not ANSI compliant, but the ANSI committee is considering adding the CUBE and ROLLUP extensions to the standard. This chapter requires previous knowledge of GROUP BY queries. If you are not familiar with those, take a look at Appendix A, “DML Basics” before you continue.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2000 Itzik Ben-Gan and Tom Moreau
About this chapter
Cite this chapter
Ben-Gan, I., Moreau, T. (2000). Summarizing Data. In: Advanced Transact-SQL for SQL Server 2000. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-0859-4_5
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0859-4_5
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-893115-82-8
Online ISBN: 978-1-4302-0859-4
eBook Packages: Springer Book Archive