A window function can keep the detail rows while calculating across related rows. PARTITION BY defines independent groups. ORDER BY defines sequence, and a frame defines which rows contribute to the current calculation.
For a running total, write ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW. For a three-observation moving average, use ROWS BETWEEN 2 PRECEDING AND CURRENT ROW. The first rows have fewer observations. Missing dates aren't filled automatically, so three observations can span more than three calendar days.
An ordered aggregate's default frame can include peers that share its ordering value. Choose an explicit ROWS frame and add a stable tie-breaker when each transaction must advance the total separately. LAST_VALUE also needs care: its default frame can stop at the current row. Extend the end to UNBOUNDED FOLLOWING to read the final value in a whole partition.