Explain it in 60 seconds
Running totals and moving averages
Data Analyst · SQL for Analytics · Intermediate
How do you calculate running totals and moving averages with window functions?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- SUM(x) OVER (ORDER BY date).
- Frame: ROWS BETWEEN 6 PRECEDING AND CURRENT ROW.
- PARTITION BY for per-group.
- ROWS vs RANGE semantics.
- Fill missing dates first.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.