# 範例 - Rolling 函式 2

• `ROLLINGAVERAGE` - 計算現行列前後某一列數範圍的累計平均值。請參閱 ROLLINGAVERAGE 函式
• `ROLLINGMIN` - 計算某一列數範圍的累計最小值。參閱 ROLLINGMIN 函式
• `ROLLINGMAX` - 計算某一列數範圍的累計最大值。參閱 ROLLINGMAX 函式
• `ROLLINGSTDEV` - 計算某一列數範圍的累計標準差。參閱 ROLLINGSTDEV 函式
• `ROLLINGVAR` - 計算某一列數範圍的累計變異數。參閱 ROLLINGVAR 函式

100.000
1119.554
1239.785
1360.021
2080.950
21101.785
22121.005
23141.185
30162.008
31181.887
32200.945
33220.856

`settype col: lap,quarter type: 'String'`

`derive type:single value: MERGE(['l',lap,'q',quarter]) as: 'splitId'`

`derive type:single value: ROUND(time_sc - PREV(time_sc, 1), 3) order: splitId as: 'split_time_sc'`

`derive type:single value: ROLLINGAVERAGE(split_time_sc, 3) order: splitId as: 'ravg'`

`derive type:single value: ROLLINGMAX(split_time_sc, 3) order: splitId as: 'rmax'`

`derive type:single value: ROLLINGMIN(split_time_sc, 3) order: splitId as: 'rmin'`

`derive type:single value: ROUND(ROLLINGSTDEV(split_time_sc, 3), 3) order: splitId as: 'rstdev'`

`derive type:single value: ROUND(ROLLINGVAR(split_time_sc, 3), 3) order: splitId as: 'rvar'`

10l1q00
11l1q120.09620.0960020.09620.09620.096
12l1q240.5320.4340.0290.16920.09620.43420.265
13l1q361.03120.5010.0310.17720.09620.50120.344
20l2q081.08720.0560.0390.19820.05620.50120.272
21l2q1101.38320.2960.0290.1720.05620.50120.322
22l2q2122.09220.7090.0590.24220.05620.70920.39
23l2q3141.88619.7940.1130.33719.79420.70920.214
30l3q0162.58120.6950.1390.37319.79420.70920.373
31l3q1183.01820.4370.1380.37119.79420.70920.409
32l3q2203.49320.4750.1130.33619.79420.69520.35
33l3q3222.89319.40.2520.50219.420.69520.252

`window value: window1 = lap,rollingaverage(split_time_sc, 0, 3), rollingmax(split_time_sc, 0, 3),rollingmin(split_time_sc, 0, 3),round(rollingstdev(split_time_sc, 0, 3), 3),round(rollingvar(split_time_sc, 0, 3), 3) group: lap order: lap`