human
Data una tabella di ordini cliente con colonne OrderID, CustomerID, OrderDate e OrderAmount, scrivere una query SQL per trovare il totale parziale degli importi dell'ordine per ciascun cliente, ordinati per cliente e data dell'ordine.
gpt
Here's an example SQL query that should accomplish this task:

```
SELECT 
   CustomerID, 
   OrderDate, 
   OrderAmount,
   SUM(OrderAmount) OVER (PARTITION BY CustomerID ORDER BY OrderDate) AS RunningTotal
FROM 
   Orders
ORDER BY 
   CustomerID, 
   OrderDate ASC
```

This query uses the window function `SUM()` with `OVER()` to calculate the running total for each customer, partitioning by the `CustomerID` column and ordering by the `OrderDate` column. The resulting table will include columns for `CustomerID`, `OrderDate`, `OrderAmount`, and `RunningTotal`, sorted by customer and order date.