Write a SQL query to find the top 3 most active users by number of sessions in each month.
Use valid users and sessions with non-null timestamps. Break ties by ascending user_id.
month, user_id, user_name, session_count, and monthly_rankmonth, then monthly_rank| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| user_name | VARCHAR(100) | User display name |
| Column | Type | Description |
|---|---|---|
| session_idPK | INT | Unique session identifier |
| user_id | INT | User associated with the session |
| started_at | TIMESTAMP | Timestamp when the session started |