Write a query using SQL window functions to calculate the running total of messages sent per user over a 30-day period.
Use the messages table and evaluate messages from 2024-01-01 through 2024-01-30, inclusive.
user_id, sent_date, daily_messages, and running_total.user_id, then sent_date ascending.| Column | Type | Description |
|---|---|---|
| message_idPK | INT | Unique identifier for the message |
| user_id | VARCHAR(20) | Identifier of the user who sent the message |
| sent_at | TIMESTAMP | Timestamp when the message was sent |
| message_body | TEXT | Message content |