Subscription Commerce Analytics Path · Mission 5 of 25Easy

Q1 2026 cancelled subscriptions

First foray into fact_subscription_events. Practice filtering by event_type and a date range, and using COUNT(DISTINCT) to count distinct entities even though events may have multiple rows per subscription.

The Brief

Naya BrennanRetention Managersubscription-ops

Quarterly retention review tomorrow. From fact_subscription_events, count the distinct subscriptions that voluntarily cancelled in Q1 2026 (event_ts between 2026-01-01 and 2026-03-31, event_type = 'cancelled'). One column: cancelled_subs. Don't count churn here — voluntary only. We'll do voluntary-vs-involuntary breakdowns in a future review.

You'll practice

State filterDate rangeCOUNT

Tables & columns available

fact_subscription_eventsfact12 columns
ColumnTypeKey
event_idINTPK
subscription_idINTFK → fact_subscriptions
customer_idINTFK → dim_customers
event_typeTEXT
event_tsTEXT
posted_atTEXT
plan_idINTFK → dim_plans
from_plan_idINTFK → dim_plans
to_plan_idINTFK → dim_plans
mrr_deltaREAL
reason_codeTEXT
paused_untilTEXT

Hints (3)

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

Hint 1

fact_subscription_events is the canonical event store. Filter event_type = 'cancelled' (voluntary) — 'churned' is involuntary and is a separate cohort.

Hint 2

Date filter on event_ts BETWEEN '2026-01-01' AND '2026-03-31'. event_ts is TEXT formatted YYYY-MM-DD, so string comparison works.

Hint 3

COUNT(DISTINCT subscription_id) is the right counter — a subscription technically can only cancel once (terminal state) but counting distinct guards against any seed anomaly.