Given a table of user logins on DigitalOcean, write a query to find the daily active users (DAU) and month-over-month retention rates.
Use the previous calendar month as the comparison period. Exclude login records without a user ID.
activity_date, daily_active_users, and month_over_month_retention_rate.NULL when no prior month exists, and order by activity_date ascending.| Column | Type | Description |
|---|---|---|
| login_idPK | INT | Unique login event identifier |
| user_id | INT | DigitalOcean user identifier |
| login_date | TIMESTAMP | Timestamp when the user logged in |