Loading the editor…
Keep campaigns that captured two or more lead rows.
A channel review skips campaigns that never repeated. One lead is not enough evidence to discuss the creative.
Return campaign and leads. Count lead rows. Keep campaigns with at least two. Sort by leads descending, then campaign name.
| id | name | channel | spend | started_on |
|---|---|---|---|---|
| 1 | Spring Search | paid_search | 4200 | 2025-03-01 |
| 2 | Lifecycle Email | 800 | 2025-03-01 | |
| 3 | Podcast Tour | podcast | 2500 | 2025-04-01 |
| id | campaign_id | status | created_at | |
|---|---|---|---|---|
| 1 | 1 | ada@example.com | new | 2025-03-05 |
| 2 | 1 | ada@example.com | qualified | 2025-03-08 |
| 3 | 2 | lin@example.com | new | 2025-03-11 |
Ctrl or Cmd + Enter runs the query. The database resets on every run.
Run the query to see rows from the sample database.
Next exercise: Orders by month
Related: Leads per campaign, Duplicate lead emails