StreamFlow tracks users moving through a signup funnel. Write a SQL query to identify the biggest drop-off between consecutive funnel steps for each funnel version.
completed_flag = true.funnel_version, previous_step, current_step, previous_step_users, current_step_users, drop_off_users, drop_off_rate.funnel_version ascending.step_order ascending to define consecutive steps.current_step ascending.drop_off_rate to four decimal places.NULL for drop_off_rate when previous_step_users is zero, and include steps with zero completed users.| Column | Type | Description |
|---|---|---|
| step_idPK | INT | Unique step identifier |
| funnel_version | VARCHAR(20) | Funnel version label |
| step_name | VARCHAR(50) | Name of the funnel step |
| step_order | INT | Step position within the funnel |
| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| acquisition_channel | VARCHAR(30) | Marketing acquisition source |
| signup_date | DATE | Date the user signed up |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique event identifier |
| user_id | INT | User who triggered the event |
| step_id | INT | Funnel step reached |
| event_time | TIMESTAMP | Time of the event |
| completed_flag | BOOLEAN | Whether the step was completed |