Loading the editor…
Rank marketing campaigns from the largest budget to the smallest.
Growth reviews channel mix by the dollars already committed, before they look at lead volume.
Return name, channel, and spend. Sort by spend descending, then 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: Distinct job titles
Related: Leads per campaign, Leads still marked new