Abstract
The previous two chapters introduced the basics of SQL usage, and in fact this is all you’ll need for some applications. However, there’s a lot more that becomes possible when you delve into the wealth of additional facilities contained in SQL. In this chapter, you’ll look at ways of summarizing and grouping data. This enables you to perform many versatile data manipulation techniques. For example, you can find out the maximum value or the average value in a column (say, the highest mark scored by a student in any exam). Or, perhaps more usefully, you can look at maximum or average values for columns based on groupings defined by other columns (so you could group the rows in a table according to the exam taken and then find out the minimum/maximum/average scores for each exam).
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
© 2003 Cristian Darie, Karli Watson with Chris Hart, Kevin Hoffman, Julian Skinner
About this chapter
Cite this chapter
Darie, C., Watson, K., Hart, C., Hoffman, K., Skinner, J. (2003). Summarizing and Grouping Data. In: The Programmer’s Guide to SQL. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-0800-6_4
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0800-6_4
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-59059-218-2
Online ISBN: 978-1-4302-0800-6
eBook Packages: Springer Book Archive