Ancestry Marketing wants to evaluate 30-day retention for customers who purchased a DNA kit during the DNA-SUMMER-25 promotion. A retained customer is one who records at least one qualifying activity exactly 30 days after their first qualifying promotion purchase.
Write a PostgreSQL query that calculates the retention rate for this promotion.
Requirements
- Include users whose DNA kit purchase occurred within the promotion dates.
- Use each user's first qualifying purchase as the cohort date, even if they purchased more than once.
- Count a user as retained when an activity occurs from 30 days through, but not including, 31 days after the cohort purchase.
- Return the cohort size, retained users, and retention percentage rounded to two decimals.