Write a SQL query to calculate the month-over-month retention rate of users acquired through different marketing channels.
Use the users and user_activity tables. A retained user is an acquired user with at least one activity event during the calendar month immediately following acquisition.
acquisition_channel, acquisition_month, acquired_users, retained_users, and retention_rate.retention_rate as a percentage rounded to two decimal places, ordered by acquisition month and channel.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| acquired_at | TIMESTAMP | Timestamp when the user was acquired |
| acquisition_channel | VARCHAR(50) | Marketing channel that acquired the user |
| Column | Type | Description |
|---|---|---|
| activity_idPK | INT | Unique activity event identifier |
| user_id | INT | User associated with the activity event |
| activity_at | TIMESTAMP | Timestamp of the user activity event |