MovingAverage Function Syntax | Teradata Vantage - 17.05 - MovingAverage Syntax - Teradata Database

Teradata Vantage™ - Advanced SQL Engine Analytic Functions

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
17.05
created_date
June 2020
category
Programming Reference
featnum
B035-1206-170K
SELECT * FROM MovingAverage (
  ON { table | view | (query) }
     [ PARTITION BY partition_column [,...] ]
     [ ORDER BY order_column [,...] ]
  [ USING
    [ MAvgType ({ 'C' | 'E' | 'M' | 'S' | 'T' | 'W' }) ]
    [ TargetColumns ('target_column' [,...]) ]
    [ Alpha (alpha) ]
    [ StartRows (n) ]
    [ IncludeFirst ({'true'|'t'|'yes'|'y'|'1'|'false'|'f'|'no'|'n'|'0'}) ]
    [ WindowSize (window_size) ]
  ]
) AS alias;
If the ON clause does not include the PARTITION BY and ORDER BY clauses, results are nondeterministic.