I

ShopKart wants to measure how many shoppers who signed up in January came back and placed another order later. Write a SQL query to calculate the retention rate for the January signup cohort.
signup_date is in January 2024.has_returned is TRUE.shoppers
| column | type | description |
|---|---|---|
| shopper_id | INT | Unique shopper ID |
| shopper_name | VARCHAR(100) | Shopper name |
| signup_date | DATE | Date the shopper created an account |
| has_returned | BOOLEAN | Whether the shopper returned after signup |
| country | VARCHAR(50) | Shopper country |
| shopper_id | shopper_name | signup_date | has_returned | country |
|---|---|---|---|---|
| 1 | Ava Patel | 2024-01-15 | TRUE | US |
| 2 | Liam Chen | 2024-01-03 | FALSE | CA |
| 3 | Noah Kim | 2024-02-01 | TRUE | US |
| 4 | Emma Davis | 2024-01-31 | TRUE | UK |
| 5 | Olivia Brown | 2023-12-31 | TRUE | US |
| 6 | Sophia Wilson | 2024-01-10 | NULL | AU |
| 7 | Mason Lee | 2024-01-22 | FALSE | US |
| 8 | Isabella Garcia | 2024-03-05 | TRUE | CA |
| january_signups | retained_shoppers | retention_rate_pct |
|---|---|---|
| 7 | 4 | 57.14 |
| Column | Type | Description |
|---|---|---|
| shopper_idPK | INT | Unique shopper identifier |
| shopper_name | VARCHAR(100) | Shopper full name |
| signup_date | DATE | Date the shopper signed up |
| has_returned | BOOLEAN | Whether the shopper returned after signup |
| country | VARCHAR(50) | Shopper country |
{"shoppers":[["1","Ava Patel","2024-01-15","true","US"],["2","Liam Chen","2024-01-03","false","CA"],["3","Noah Kim","2024-02-01","true","US"],["4","Emma Davis","2024-01-31","true","UK"],["5","Olivia Brown","2023-12-31","true","US"],["6","Sophia Wilson","2024-01-10","null","AU"],["7","Mason Lee","2024-01-22","false","US"],["8","Isabella Garcia","2024-03-05","true","CA"],["9","James Miller","2024-01-01","true","US"],["10","Mia Anderson","2024-01-20","true","null"],["11","Ethan Thomas","2024-02-14"Output[["14","7","50.00"]]