An events table tracks a three-step checkout funnel:
events (
user_id INTEGER,
event TEXT -- 'view', 'cart', or 'purchase'
)
Count the DISTINCT users at each funnel stage, where the stages are strictly
progressive:
view — users with at least one 'view' event
cart — users counted in view who also have a 'cart' event
purchase — users counted in cart who also have a 'purchase' event
A user who carted without ever viewing does NOT count toward cart; a user who
purchased without carting (or viewing) does NOT count toward purchase.
Return columns: stage, users — exactly 3 rows in funnel order:
view, cart, purchase.