Advertisement

Summarizing and Grouping Data

  • Cristian Darie
  • Karli Watson
  • Chris Hart
  • Kevin Hoffman
  • Julian Skinner

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).

Keywords

Count Function Average Mark Aggregate Function Previous Query Select ColumnA 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Cristian Darie, Karli Watson with Chris Hart, Kevin Hoffman, Julian Skinner 2003

Authors and Affiliations

  • Cristian Darie
  • Karli Watson
  • Chris Hart
  • Kevin Hoffman
  • Julian Skinner

There are no affiliations available

Personalised recommendations