Your question is Cohort Conversion Comparison. 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.
Mirakl marketplace analytics needs to compare how effectively buyer cohorts convert after joining the marketplace.
Write a PostgreSQL query that calculates and ranks buyer conversion rates by signup-month cohort for January through April 2025. A buyer is converted if they have at least one order with order_status = 'completed'.
signup_date using PostgreSQL date functions.| Column | Type | Description |
|---|---|---|
| buyer_idPK | INTEGER | Unique Mirakl marketplace buyer identifier |
| signup_date | DATE | Date the buyer joined the marketplace |
| acquisition_channel | VARCHAR(30) | Channel that generated the buyer signup |
| Column | Type | Description |
|---|---|---|
| order_idPK | INTEGER | Unique marketplace order identifier |
| buyer_id | INTEGER | Buyer associated with the order |
| order_date | DATE | Date the order was placed |
| order_status | VARCHAR(20) | Order lifecycle status |