A funnel follows people through steps toward a goal: on Kestrel's site, page_view, product_view, add_to_cart, checkout, purchase. The question is how many reach each step, and what share make it from one step to the next.
Count distinct people per step, all in one row:
SELECT
COUNT(DISTINCT CASE WHEN event_type = 'add_to_cart' THEN visitor_id END) AS carted,
COUNT(DISTINCT CASE WHEN event_type = 'purchase' THEN visitor_id END) AS bought
FROM events;
Count people (DISTINCT visitor_id), not events: one visitor adding three items is still one person who reached the cart. A stricter funnel also checks order, so a purchase only counts if it came after the cart; that needs each visitor's first time at each step, then a comparison. Rates between steps are where the decimals trap appears again: multiply by 100.0 before dividing.