Intermediate
Open
Pro
Sessions from an Event Log, Then a Funnel
Using the events table:
- Write a query that assigns a
session_idto every event, where a new session starts when the gap from the user's previous event exceeds 30 minutes. Explain the two-window pattern. - Extend it to return, per session, its start time, duration, and
whether it contained a
purchase. - Write a per-session funnel: number of sessions with a
view, with aviewfollowed later byadd_to_cart, and withview→add_to_cart→purchasein that order. Explain why comparing timestamps matters.
Share this question