Given a table of equipment events, how would you calculate running totals by site and date for Swinerton?
Use equipment_events. Treat NULL event_value values as zero, and exclude rows missing site_name or event_date.
site_name, event_date, daily_event_total, and running_total.site_name, then event_date ascending.| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique equipment event identifier |
| site_name | VARCHAR(100) | Swinerton construction site associated with the event |
| event_date | DATE | Calendar date on which the event occurred |
| event_type | VARCHAR(50) | Category of equipment event |
| event_value | NUMERIC(12,2) | Numeric value contributed by the event |