Reference Guide > TDV Support for SQL Functions > TDV-Supported Analytical Functions
 
TDV-Supported Analytical Functions
Analytical functions produce summaries, reports, and statistics on large amounts of static data. TDV supports more than three dozen such functions.
Analytical functions are OLAP (on-line analytic processing) functions that operate on large amounts of static data. Most SQL functions are OLTP (on-line transaction processing) functions that operate as quickly as possible on discrete amounts of dynamic, transactional data.
Analytical functions are generally characterized by an OVER keyword and a window clause. (See Window Clause.)
Limitation
Large data sets can be very slow when using analytical functions.
Teradata does not support the RANGE keyword. It only supports the ROWS keyword.
For analytical functions that support the windowing clause, TDV does not push to Teradata without you explicitly suppling the windowing clause. Teradata implicitly adds ROWS BETWEEN UNBOUNDED PRECEEDING AND UNBOUNDED FOLLOWING for analytical functions that do not supply a windowing clause. In TDV and ANSI SQL, RANGE UNBOUNDED PRECEDING is supplied.
Teradata (version 16) does not support the RANGE keyword.
TDV supports the following analytical functions:
AVG
CORR
COUNT
COVAR_POP
COVAR_SAMP
CUME_DIST
DENSE_RANK
FIRST_VALUE
LAG
LAST_VALUE
LEAD
LISTAGG
MAX
MIN
NTH_VALUE
NTILE
PERCENT_RANK
PERCENTILE_CONT
PERCENTILE_DISC
RANK
RATIO_TO_REPORT
REGR_AVGX
REGR_AVGY
REGR_COUNT
REGR_INTERCEPT
REGR_R2
REGR_ SLOPE
REGR_SXX
REGR_SXY
REGR_SYY
ROW_NUMBER
STDDEV
STDDEV_POP
STDDEV_SAMP
SUM
VAR_POP
VAR_SAMP
VARIANCE