advanced windowing MySQL MariaDB SQL Server PostgreSQL SQLite
Compute a Rolling Moving Average With a Window Frame
Smooth time-series data by computing a rolling average over a fixed window of preceding rows using `AVG … OVER (ORDER BY … ROWS BETWEEN n PRECEDING AND CURRENT ROW)`.