14Filtering Grouped Data

“Let schoolmasters puzzle their brain, With grammar, and nonsense, and learning; Good liquor, I stoutly maintain, Gives genius a better discerning.”

—OLIVER GOLDSMITH

In Chapter 12, “Simple Totals,” I gave you the details about all the aggregate functions defined in the SQL Standard. I followed that up in Chapter 13, “Grouping Data,” with a discussion of how to ask your database system to group sets of rows and then calculate aggregate values in each group. One of the advantages to grouping is that you can also display value expressions based on the grouping ...

Get SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.