Your question is SQL for MoM Retention. Start with the requirements and the two 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.
Thumbtack’s Marketing Analytics team wants to measure how consistently service professionals who joined the platform in 2024 remain active. Write a PostgreSQL query that calculates month-over-month retention by join-month cohort.
joined_at date falls in 2024.| Column | Type | Description |
|---|---|---|
| professional_idPK | INT | Unique service professional identifier |
| professional_name | VARCHAR(100) | Professional display name |
| joined_at | DATE | Date the professional joined Thumbtack |
| city | VARCHAR(80) | Primary service city |
| specialty | VARCHAR(100) | Primary service category |
| Column | Type | Description |
|---|---|---|
| activity_idPK | INT | Unique activity record identifier |
| professional_id | INT | References service_professionals.professional_id |
| activity_at | DATE | Date of activity on Thumbtack |
| activity_type | VARCHAR(40) | Type of professional activity |