Up to this point, most of your queries have returned individual rows. GROUP BY changes that perspective: instead of looking at each row on its own, you collapse rows that share a common value into a single summary row. Combined with aggregate functions such as COUNT, SUM, AVG, MIN, and MAX, GROUP BY lets you answer questions like "how many orders did each customer place?" or "what is the average salary in each department?" — the kind of statistical summaries that turn raw stored data into useful information.
HAVING is the companion clause that filters those summary groups. A common source of confusion is why you cannot simply put an aggregate condition in WHERE, and the answer lies in query execution order: WHERE filters individual rows before grouping happens, while HAVING filters the groups after the aggregates have been calculated. Keeping that sequence straight (FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY) is the single most helpful mental model for this topic, and it is also exactly what the module outcomes ask you to be able to explain.
As you watch the videos below, pay attention to three things: which columns appear in the SELECT list versus the GROUP BY list, where each example places a filtering condition and why, and how the final query reads from top to bottom once GROUP BY and HAVING are combined. Try pausing and predicting the result set before the presenter runs the query — that habit will prepare you well for the module assignments.
A concise introduction from Database Star explaining what the GROUP BY clause does and how to write it, likely using short worked examples that pair GROUP BY with aggregate functions. At roughly five minutes, it focuses on the core mechanics rather than edge cases, making it a good first exposure to the clause.
It directly addresses the "Purpose of GROUP BY" and "Common Aggregate Functions" subtopics in a compact, beginner-friendly format, and Database Star is a well-established channel dedicated specifically to SQL and database instruction.
Part 6 of Microsoft's Transact-SQL beginner series, this video covers using functions in T-SQL and then grouping aggregated results. Expect demonstrations in a real SQL Server environment showing how aggregate functions are applied and how GROUP BY organizes their output.
It comes directly from Microsoft Developer, so the syntax and terminology are authoritative, and its emphasis on aggregated results supports the subtopics on aggregate functions and writing combined grouping queries in a practical, hands-on setting.
Part of Rishabh Mishra's SQL tutorial series, this lesson treats GROUP BY and HAVING together, which is how they are most often used in practice. Based on its title and placement in a full course playlist, it should walk through grouping examples and then demonstrate filtering those groups with HAVING. Note that the narration is in Hindi with English SQL terminology and on-screen code.
It is the only video of the three that explicitly pairs HAVING with GROUP BY, making it the best match for the subtopics on filtering groups, distinguishing WHERE from HAVING, and writing combined queries.
Together these videos target MO3 and MO4 most directly. The Database Star and Microsoft Developer videos build the foundation for MO4 by showing how GROUP BY organizes rows and how aggregate functions summarize them, with Microsoft's lesson adding practical demonstration in a live database environment. The Rishabh Mishra tutorial extends this to HAVING, giving you the side-by-side treatment of grouping and group-level filtering needed to compose complete GROUP BY/HAVING queries and to articulate, as MO3 requires, that WHERE filters rows before aggregation while HAVING filters groups after it. The grouped result sets you build here also set up the subquery work in MO5, since aggregate summaries are frequently used as inputs to nested queries.
These videos were chosen from YouTube on October 2, 2026. Each has captions; the player turns them on. Videos on YouTube can be changed or removed — if one no longer plays, tell your instructor. If a player does not appear, use its Watch on YouTube link.