Sparksoft wants to show each user's cumulative spend over time in its analytics view. Write a SQL query to calculate a running total of order amounts for every user, ordered by purchase date.
user_id, order_date, order_amount, and the cumulative spend as running_total.user_id, then order_date, then order_id.| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique identifier for each order |
| user_id | INT | Identifier of the user who placed the order |
| order_date | DATE | Date when the order was created |
| order_amount | DECIMAL(10,2) | Order value, may be NULL for incomplete records |
| channel | VARCHAR(20) | Order source channel |