hard · ~12 min
Product wants an ordered three-step conversion funnel computed from events: signup → activate → purchase.
events
signup
activate
purchase
Write a query that returns the funnel user counts:
signup_users
activated_users
purchased_users
Input contract: event_id is unique and non-null in events; user_id, event_type, and event_time are non-null. A user may emit zero, one, or many events of each event_type, in any chronological order.
event_id
user_id
event_type
event_time