How would you write a SQL query to calculate the retention rate of users acquired through paid search versus organic search?
For this exercise, define retention as having recorded activity exactly 30 days after signup. Include only users whose acquisition source is paid search or organic search.
acquisition_source, acquired_users, retained_users, and retention_rate_pct| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| acquisition_source | VARCHAR(50) | Marketing source that acquired the user |
| signup_date | DATE | Date the user signed up |
| Column | Type | Description |
|---|---|---|
| activity_idPK | INT | Unique activity record identifier |
| user_id | INT | User associated with the activity |
| activity_date | DATE | Date the user was active |
| activity_type | VARCHAR(40) | Type of recorded user activity |