Only Keep Interesting Groups

Filter grouped results using HAVING.

You’ve grouped your data—now filter those results using HAVING. It works like WHERE, but for groups.

Goal

You’ll aim to:

  • Use HAVING to filter grouped results.

  • Keep only the summaries you care about.

Tables

Here is the people and pets table that we will use in this lesson:

The people table

Get hands-on with 1400+ tech skills courses.