You are given a table named sales that records the total sales amount for each business day. The day column is a sequential integer identifying the day, and amount is the sales total for that day.
For every row, compute two extra values:
Return one row per day with the columns day, amount, running_total, and moving_avg, ordered by day in ascending order. Both calculations must be produced with explicit window frames.