Use COUNT to aggregate rows in a fact table
Quick one — total number of email sends on record? I need one number for the exec summary, ideally before the 12 standup. Just COUNT(*) on fact_sends is fine, don't overthink it.
| Column | Type | Key |
|---|---|---|
| send_id | INT | PK |
| campaign_id | INT | FK → dim_campaigns |
| customer_id | INT | FK → dim_customers |
| sent_at | TEXT | |
| opened | INT | |
| clicked | INT |
Each hint you reveal reduces the XP you can earn. Try the query first.
Each row in `fact_sends` represents one email sent. Use `COUNT(*)` to count all rows
Alias your result: `COUNT(*) AS total_sends` so the output column has a clear name
You should get a single row with one number. If you're getting multiple rows, you might have an accidental GROUP BY