A web analytics report measures how many visitors survive each step of a signup funnel. The funnel is strict: a visitor counts at step k only if they have an event for step k and for every step before it. Reaching step 3 without step 2 counts for step 1 only.
step_index, step_name, visitors, drop_off_pct, ordered by step_indexvisitors counts distinct visitors who reached that step and every earlier onedrop_off_pct is the percentage lost from the previous step, round(..., 2)drop_off_pct is null for step 1, and null when the previous step had 0 visitorsevents| event_id | step_name | visitor_id | occurred_at |
|---|---|---|---|
| 1 | view | v1 | 2026-05-01 09:00:00 |
| 2 | signup | v1 | 2026-05-01 09:05:00 |
| 3 | activate | v1 | 2026-05-01 09:10:00 |
| 4 | view | v2 | 2026-05-01 10:00:00 |
| 5 | signup | v2 | 2026-05-01 10:05:00 |
| 6 | view | v3 | 2026-05-01 11:00:00 |
funnel_steps| step_name | step_index |
|---|---|
| view | 1 |
| signup | 2 |
| activate | 3 |
| step_index | step_name | visitors | drop_off_pct |
|---|---|---|---|
| 1 | view | 4 | null |
| 2 | signup | 2 | 50 |
| 3 | activate | 1 | 50 |
events| event_id | step_name | visitor_id | occurred_at |
|---|---|---|---|
| 1 | view | v1 | 2026-05-02 09:00:00 |
| 2 | activate | v1 | 2026-05-02 09:10:00 |
| 3 | view | v2 | 2026-05-02 10:00:00 |
| 4 | signup | v2 | 2026-05-02 10:05:00 |
funnel_steps| step_name | step_index |
|---|---|
| view | 1 |
| signup | 2 |
| activate | 3 |
| step_index | step_name | visitors | drop_off_pct |
|---|---|---|---|
| 1 | view | 2 | null |
| 2 | signup | 1 | 50 |
| 3 | activate | 0 | 100 |
Community-reported interview topic. Not an official company question and no affiliation is implied.
Run against the public tests, or submit to score against all of them.