Real-world recipes · Product analytics
Conversion funnel
A funnel counts how many people reach each step: signed up, created a report, shared one, invited a teammate. Count each person once per step with COUNT(DISTINCT ...), and divide by the first step to get conversion.
Try itEdit the query, then Run
| signed_up | created_report | shared_report | invited_teammate |
|---|---|---|---|
| 420 | 271 | 191 | 66 |
1 row
A CASE with no ELSE returns empty for rows that don't match, and COUNT skips empties. That's what makes one pass over the table count all four steps at once.
Your turn
What percentage of customers who signed up went on to created_report? Return one number called pct, rounded to 1 decimal.
Divide the created_report count by the signed_up count, times 100.0, inside ROUND(..., 1).
This page on one card
