MovingAverage Function | Teradata Vantage - MovingAverage (SQL Engine) - Teradata® Database

Database Analytic Functions

Product
Teradata® Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
Teradata_Vantage™___Advanced_SQL_Engine_Analytic_Functions.withLogo_upload_July2021/wnd1589838592459.ditamap
dita:ditavalPath
Teradata_Vantage™___Advanced_SQL_Engine_Analytic_Functions.withLogo_upload_July2021/ayr1485454803741.ditaval
dita:id
B035-1206
lifecycle
previous
Product Category
Teradata Vantage™

The MovingAverage function computes average values in a series, using the specified moving average type.

Moving Average Type Description
Cumulative Moving Average Computes cumulative moving average of value from beginning of series.
Exponential Moving Average Computes average of points in series, applying damping factor that exponentially decreases weights of older values.
Modified Moving Average Computes first value as simple moving average. Computes subsequent values by adding new value and subtracting last average from resulting sum.
Simple Moving Average Computes unweighted mean of previous n data points.
Triangular Moving Average Computes double-smoothed average of points in series.
Weighted Moving Average Computes average of points in series, applying weights to older values. Weights for older values decrease arithmetically.
  • This function requires the UTF8 client character set for UNICODE data.
  • This function does not support Pass Through Characters (PTCs).

    For information about PTCs, see Teradata Vantage™ - Advanced SQL Engine International Character Set Support, B035-1125.

  • The ORDER BY clause supports only ASCII collation.
  • The PARTITION BY clause assumes column names are in Normalization Form C (NFC).