Your question is SQL Running Totals and Moving Averages. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Cambridge Mobile Telematics uses telematics event data to monitor driver risk in its safety analytics products. Write a PostgreSQL query that reports confirmed harsh-braking activity for each driver.
| Column | Type | Description |
|---|---|---|
| driver_idPK | INTEGER | Unique driver identifier |
| driver_name | VARCHAR(100) | Driver display name |
| region | VARCHAR(50) | Operating region |
| Column | Type | Description |
|---|---|---|
| event_idPK | INTEGER | Unique telematics event identifier |
| driver_id | INTEGER | Driver associated with the event |
| event_date | DATE | Date on which the event occurred |
| event_type | VARCHAR(40) | Type of driving event |
| event_status | VARCHAR(20) | Review status of the event |