NovaPay wants to identify the largest drop-off point in its onboarding funnel. Write a PostgreSQL query to measure how many users reached each funnel step and calculate the drop-off to the next step.
web signup source who signed up in January 2024.onboarding_steps.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| signup_date | DATE | Date the user signed up |
| signup_source | VARCHAR(50) | Marketing or acquisition source |
| country_code | VARCHAR(2) | Two-letter country code |
| Column | Type | Description |
|---|---|---|
| step_idPK | INT | Unique onboarding step identifier |
| step_name | VARCHAR(50) | Name of the onboarding step |
| step_order | INT | Sequence order of the step in the funnel |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique onboarding event identifier |
| user_id | INT | User who completed the step |
| step_id | INT | Onboarding step completed |
| completed_at | TIMESTAMP | Timestamp when the step was completed |
| device_type | VARCHAR(20) | Device used for the onboarding event |