Given a table of PlayStation Network login timestamps, write a SQL query to calculate the daily active users (DAU) and monthly active users (MAU) for the past year.
Treat MAU as the number of distinct users active during the calendar month containing each activity date. Exclude invalid timestamps and do not count NULL user IDs.
activity_date, daily_active_users, and monthly_active_users.activity_date ascending.| Column | Type | Description |
|---|---|---|
| login_idPK | BIGINT | Unique identifier for the login event |
| user_id | BIGINT | PlayStation Network user identifier |
| login_timestamp | TIMESTAMP | Timestamp when the login occurred |