← SQL Analyst Starter

Lesson 2 of 4

Group without losing rows

Aggregate revenue by a declared grouping key.

Do the work

  1. WHERE applies before GROUP BY.
  2. SUM(amount) totals whole-dollar amounts.
  3. COUNT(*) counts rows, including repeated values.

See the method

Filter paid orders.

Practice independently

Take it further

Compare COUNT(*) with COUNT(customer_id) when IDs can be NULL.