Given a list of events with timestamps, compute running totals by day.
Write a PostgreSQL query using the events table. Treat NULL amounts as zero. Return one row for each calendar day represented in the data.
event_day, daily_total, and running_totaldaily_total is the total amount for that dayrunning_total includes that day and all earlier daysevent_day ascending| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique event identifier |
| event_timestamp | TIMESTAMP | Timestamp when the event occurred |
| amount | NUMERIC(12,2) | Numeric value associated with the event |
| event_type | VARCHAR(30) | Category of event |