Subscription Commerce Analytics Path · Mission 11 of 25Hard

First event per subscription

First window function. Practice ROW_NUMBER() OVER (PARTITION BY subscription_id ORDER BY event_ts) — the foundational pattern for picking one row per entity from an event stream. Confirms a sanity invariant: every subscription's first event should be 'created'.

The Brief

You'll practice

ROW_NUMBERPARTITION BYWindow