Write a SQL query to calculate the moving average of a commodity's price over a rolling 7-day window, partitioned by the market exchange at Castleton Commodities International.
Problem
Write a SQL query to calculate the moving average of a commodity's price over a rolling 7-day window, partitioned by the market exchange at Castleton Commodities International.
Your answer
Try one AI text evaluation on us
Get structured feedback, scored against a 4-axis rubric. Premium unlocks unlimited.