SUM(...) OVER (PARTITION BY ... ORDER BY ... RANGE UNBOUNDED PRECEDING) |
The query below shows the difference between running total (rt_sum) and (rt_csum) by the use of RANGE UNBOUNDED PRECEDING. When the value of two consecutive partitioned values is the same (9500 in query below), then both will have the same total value (RT_CSum) as shown in row 4 and 5 (Central/West region) for the year 2011 in the query below. |
54937