Argument | Category | Description |
---|---|---|
TargetColumns | Optional | Specifies the names of the input columns for which the simple moving average is to be computed. If you omit this argument, then the function copies all numeric input columns to the output table. |
IncludeFirst | Optional | Specifies whether to output window_size rows. Because the simple moving average for the first window_size rows is undefined, the function returns NULL values for those columns. The default value is 'false'. |
WindowSize | Optional | Specifies the number of previous values to include in the computation of the simple moving average. The default value is 10. |
The SMAVG function treats the schema names, table names, and column names as case-insensitive arguments. If any of these arguments contain capital letters, you must surround each one of them with double quotation marks. For example:
TargetColumns ('"City"', 'date')