Overview
In this part, we move from row-level queries to summary-level questions. Earlier SQL chapters focused on questions such as which rows match, how tables connect, and how a schema should be designed. Here, the question is again different: how can the database summarize what is happening across many rows?
As in earlier parts, the course uses two recurring contexts. The course-platform example continues as the worked concept context. The study tracker project continues as the long-running project track. Between them, this part also brings back the recipe app and library cases, so that summary querying gets practiced on more than one domain.
The structure of this part is as follows:
- From Design Questions to Summary Questions connects the design question lists from earlier parts to the new techniques and reads the existing project schema as the starting point for richer summary work.
- Aggregate Functions introduces the most common SQL tools for counts, totals, averages, and extremes, and pays careful attention to how they treat
NULL. - Grouping and Filtering Groups explains how one result row can represent a whole group rather than one original row, and how grouped results can be filtered with
HAVING. - Summaries Across Related Tables, and Verifying Them connects grouping back to the multi-table schemas and join paths from the earlier parts, including the silent-wrong-answer case where a join inflates counts, and introduces the verification habit that catches these mistakes.
- Practicing Summary Queries works through summary queries for the recipe app and library cases.
- Readable Summary Queries uses expressions, aliases,
CASE,COALESCE, and time bucketing to make summaries easier to interpret. - Complex Summary Queries with CTEs introduces common table expressions as a readable way to structure larger summary queries, and as a fix for the inflated-count problem from earlier in the part.
- Summary Queries in Applications discusses the stored-versus-derived design choice, then shows where grouped SQL belongs in a working application and how to keep the route, the SQL, and the template each focused on its own job.
- Project Checkpoint: Building a Dashboard walks one concrete dashboard for the study tracker through queries, template, and end-to-end verification, ending with the project zip as the part’s deliverable.
The last chapter is the part’s project checkpoint. The chapter before it sets up the conceptual ground; the project checkpoint then applies the toolkit to one specific worked dashboard.
Recommended Order of Work
A useful rhythm for this part is:
- read the regular chapters in order,
- complete the chapter-level exercises as you go,
- complete the project checkpoint,
- and finish with the recap quiz and feedback form.
Finally, at the end of the part, there is a recap and feedback chapter that briefly summarizes the part and asks for feedback.