Calculate a 3-month moving average of monthly order value. For each month, show the monthly average order value and a moving average that includes the current month and the two preceding months. Round to 2 decimal places. Sort chronologically.
Schema
🔑idINT
🔗customer_idINT
order_dateTEXT
statusTEXT
total_amountREAL
postgresql
Run your query to see results
Press Ctrl + Enter to execute