Group rows, then filter the groups

Follow WHERE, GROUP BY, aggregates and HAVING as a query turns rows into one result per key. Querying · Databases.

A report needs one line per segment, but a row filter and a group filter answer different questions. Trace the boundary before a count quietly changes.

What you will learn

  • Trace rows into groups and aggregate values
  • Separate COUNT(*) from COUNT(column)
  • Choose WHERE, HAVING and ORDER BY for a report

Lesson outline

  1. From rows to groups
  2. Two meanings of count
  3. Filtering completed groups
  4. Sorting a grouped result

16 minutes · 2 scenes · 0 predict checks · 12 quiz questions

The full lesson is available with Premium.