Optional Syntax Elements for MovingAverage - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
MAvgType
Specify one of the following moving average types:
Type Description
'C' (Default) Cumulative moving average.
'E' Exponential moving average.
'M' Modified moving average.
'S' Simple moving average.
'T' Triangular moving average.
'W' Weighted moving average.
TargetColumns
Specify the input column names for which to compute the moving average.
Default behavior: The function copies every input column to the output table but does not compute any moving averages.
Alpha
[Optional with MAvgType E, otherwise ignored.] Specify the damping factor, a value in the range [0, 1], which represents a percentage in the range [0, 100]. For example, if alpha is 0.2, the damping factor is 20%. A higher alpha discounts older observations faster.
Default: 0.1
StartRows
[Optional with MAvgType E, otherwise ignored.] Specify the number of rows to skip before calculating the exponential moving average. The function uses the arithmetic average of these rows as the initial value of the exponential moving average. The value must be an integer.
Default: 2
IncludeFirst
[Ignored with MAvgType C, otherwise optional.] Specify whether to include the starting rows in the output table. If you specify 'true', the output columns for the starting rows contain NULL, because their moving average is undefined.
Default: 'false'
WindowSize
[Optional with MAvgType M, S, T, and W; otherwise ignored.] Specify the number of previous values to consider when computing the new moving average. The data type of window_size must be BYTEINT, SMALLINT, or INTEGER.
Minimum value: 3
Default: '10'