Optional Syntax Elements for MovingAverage - Analytics Database

Database Analytic Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
gjn1627595495337.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
jmh1512506877710
Product Category
Teradata Vantageā„¢
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'