RevOps & Sales Analytics Path · Mission 6 of 30Easy

Pipeline value by stage

GROUP BY + SUM — the canonical pipeline roll-up query

The Brief

Teddy OseiDirector of Revenue Operationsrevops

Roll up the current book of business by stage. Sum the `amount` column, grouped by `stage`. Return all 7 stages with their total pipeline value. Order by total descending so the largest bucket is on top. Include Closed-Won and Closed-Lost too — I want to show the CRO the historical size of each bucket, not just open pipe.

You'll practice

GROUP BYSUM

Tables & columns available

revops_opportunitiesfact10 columns
ColumnTypeKey
opportunity_idINTPK
account_idINTFK → revops_accounts
owner_user_idINTFK → revops_users
nameTEXT
stageTEXT
amountREAL
close_dateTEXT
created_dateTEXT
is_closedINT
is_wonINT

Hints (3)

Each hint you reveal reduces the XP you can earn. Try the query first.

Hint 1

Group by `stage`. SUM the amount. The ORDER BY references the alias or the SUM expression — either works.

Hint 2

You should see 7 rows — the same 7 distinct stages from mission 2, now with dollar totals next to them.

Hint 3

Don't filter anything out. The CRO asked for the full picture including Closed-Won and Closed-Lost — sometimes the biggest bucket of all is the lost one, and that's a signal.