Write a SQL query to calculate the retention rate of subscribers over a 30-day period.
Assume a subscriber is retained when they have activity exactly 30 days after their subscription date. Include only subscribers whose 30th day is on or before the latest recorded activity date.
eligible_subscribers, retained_subscribers, and retention_rate_percent.| Column | Type | Description |
|---|---|---|
| subscriber_idPK | INT | Unique subscriber identifier |
| subscription_date | DATE | Date the subscriber started their subscription |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique activity event identifier |
| subscriber_id | INT | Subscriber associated with the activity |
| event_date | DATE | Date of subscriber activity |
| event_type | VARCHAR(30) | Type of subscriber activity |