Write a SQL query to calculate the monthly retention rate of users acquired through paid marketing channels at Wise. Energy. Treat paid_search, paid_social, and paid_display as paid channels. Retention is measured when a paid user records activity in a later calendar month.
cohort_month and retention_month.cohort_users, retained_users, and retention_rate_pct, calculated against the original paid acquisition cohort.cohort_month, then retention_month.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| acquired_at | DATE | Date when the user was acquired |
| acquisition_channel | VARCHAR(50) | Marketing channel responsible for acquisition |
| Column | Type | Description |
|---|---|---|
| activity_idPK | INT | Unique activity identifier |
| user_id | INT | User who performed the activity |
| activity_at | DATE | Date when the activity occurred |
| activity_type | VARCHAR(50) | Type of user activity |