Write a SQL query to calculate the repeat purchase rate of customers within Sephora's Beauty Insider loyalty program over a six-month period.
Use the period from January 1, 2025 through June 30, 2025. Include completed purchases made by enrolled Beauty Insider members only.
purchasing_customers, repeat_customers, and repeat_purchase_rate_percent.| Column | Type | Description |
|---|---|---|
| member_idPK | INT | Unique Beauty Insider member identifier |
| VARCHAR(255) | Member email address | |
| joined_at | DATE | Date the member joined Beauty Insider |
| Column | Type | Description |
|---|---|---|
| purchase_idPK | INT | Unique purchase identifier |
| member_id | INT | Beauty Insider member associated with the purchase |
| purchased_at | DATE | Purchase date |
| purchase_status | VARCHAR(30) | Purchase lifecycle status |