Concept Flow - Window frame (ROWS BETWEEN, RANGE BETWEEN)
Start Window Function
Partition Data (optional)
Order Data
Define Frame Start and End
Calculate Aggregate over Frame
Return Result for Current Row
Move to Next Row
Repeat Until All Rows Processed
Window functions process rows in partitions and order, then apply an aggregate over a frame defined by ROWS or RANGE boundaries for each row.