Level 3QUERYPractice, 3 min
QUERY: revenue by channel
The task
In G1, total Revenue (column E) for each Channel (column B):
=QUERY(A1:E13, "select B, sum(E) group by B")The data
The starting sheet. Cells outlined in green are where your formulas go.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Campaign | Channel | Spend | Leads | Revenue | ||
| 2 | Brand terms | Paid Search | $2,400 | 96 | $14,400 | ||
| 3 | Competitor terms | Paid Search | $3,100 | 41 | $2,950 | ||
| 4 | Product terms | Paid Search | $5,200 | 88 | $17,600 | ||
| 5 | Prospecting video | Paid Social | $4,600 | 52 | $3,980 | ||
| 6 | Lookalike 1% | Paid Social | $3,800 | 61 | $9,120 | ||
| 7 | Retargeting | Paid Social | $1,900 | 47 | $8,550 | ||
| 8 | Webinar promo | $600 | 73 | $4,380 | |||
| 9 | Newsletter | $250 | 22 | $1,750 | |||
| 10 | Win-back | $400 | 18 | $3,240 | |||
| 11 | Display remarketing | Display | $1,700 | 23 | $2,890 | ||
| 12 | Contextual | Display | $2,200 | 14 | $1,430 | ||
| 13 | YouTube | Display | $3,300 | 19 | $2,310 |