Grouping and Summarizing Data
In this chapter:
How do we group and sort with the GROUP BY clause?
What are group functions?
What are aggregate and analytic functions?
What does the HAVING clause do?
What do the ROLLUP, CUBE, and GROUPING SETS clauses do?
What is the SPREADSHEET1 clause?
This chapter shows you how to aggregate and summarize rows in queries based on specific columns and expressions, using the GROUP BY clause in conjunction with various types of functions. Functions can be placed into various sections of a SELECT statement, including the WHERE clause (see Chapter 5), the ORDER BY clause (see Chapter 6), the GROUP BY clause (plus extensions), the HAVING clause, and finally the SPREADSHEET clause. In this chapter, we start by ...