Your question is Rank Top Funnel Segments. Start with the requirements and the three tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Rippling’s growth team wants to identify which user segments convert best through the signup funnel in Rippling HR Cloud. Write a SQL query to find the top converting segments based on users who reached the final funnel step.
Use the tables below to calculate conversion from signup_started to payroll_enabled for each segment.
signup_started_at is in January 2024.payroll_enabled event within 14 days of signup.segment_name from the segments table.segment_name, started_users, converted_users, conversion_rate, and segment_rank.conversion_rate descending, then converted_users descending.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| segment_id | INT | Segment assigned to the user |
| signup_started_at | TIMESTAMP | Timestamp when the user started signup |
| company_country | VARCHAR(50) | Country of the company |
| Column | Type | Description |
|---|---|---|
| segment_idPK | INT | Unique segment identifier |
| segment_name | VARCHAR(100) | Segment label |
| acquisition_channel | VARCHAR(50) | Primary acquisition channel |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique event identifier |
| user_id | INT | User tied to the event |
| event_name | VARCHAR(50) | Name of the funnel event |
| event_time | TIMESTAMP | Timestamp when the event occurred |