fn_events (event_id, user_id, event_type, event_at) is a store's clickstream; event_type is 'view', 'add_to_cart', 'purchase' or something else. Build the funnel view → add_to_cart → purchase:
1. view — the user has at least one view. Their first view starts the clock. 2. add_to_cart — an add_to_cart later than that first view. 3. purchase — a purchase later than one of the add_to_cart events that qualified for step 2.
Every step must happen within 7 days of the first view: no more than 7 × 24 hours after it (exactly 7 days still counts). A user counts once per step, however many events they have. Users with no view aren't in the funnel at all.
Columns: step (1, 2, 3), step_name ('view', 'add_to_cart', 'purchase'), users, pct_of_previous (users as a percentage of the previous step's users, rounded to 1 decimal place; NULL for step 1). Sort by step.