The window frame (ROWS BETWEEN ... AND ...) specifies which rows, relative to the current row, enter the calculation: UNBOUNDED PRECEDING, n PRECEDING, CURRENT ROW, n FOLLOWING. ROWS counts physical rows, RANGE counts by values. It defines running totals and moving averages.
Example
SUM(x) OVER (ORDER BY d ROWS BETWEEN 2 PRECEDING AND CURRENT ROW)