Filtering Groups with HAVING

WHERE filters rows before grouping; HAVING filters the grouped results — learn when to use each. ## Lesson objectives In this lesson, we will learn how to filter grouped results in SQL. In the previous lesson, we learned and aggregate functions. This means we already know how to group rows and calculate values such as count, total, average, minimum, and maximum for each group. But in real analysis, we often do not want to see all groups. We only want groups that match a specific condition.