Your question is SQL Retention Over Six Months. 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 wants to measure whether service professionals who completed a job during January 2025 continued completing jobs over the following five months. Write a PostgreSQL query that calculates monthly retention for this January cohort.
| Column | Type | Description |
|---|---|---|
| professional_idPK | INT | Unique Thumbtack service professional identifier |
| service_category | VARCHAR(50) | Primary service category listed by the professional |
| onboarded_at | DATE | Date the professional joined Thumbtack |
| Column | Type | Description |
|---|---|---|
| job_idPK | INT | Unique job identifier |
| professional_id | INT | Professional assigned to the job |
| status | VARCHAR(20) | Current job status |
| completed_at | TIMESTAMP | Timestamp when the job was completed |