Aggregate Functions and ANSI DateTime and Interval Data Types | Teradata Vantage - Aggregate Functions and ANSI DateTime and Interval Data Types - Analytics Database - Teradata Vantage

SQL Date and Time Functions and Expressions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-10-30
dita:mapPath
cpk1628111786971.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
pxz1544241488545
lifecycle
latest
Product Category
Teradata Vantage™

The following aggregate functions are valid for ANSI SQL:2011 DateTime types.

For this function … The result is …
AVG(arg) the type of the argument.
MAX(arg) the type of the argument, based on the comparison rules for DateTime types.
MIN(arg)
COUNT(arg) INTEGER, if the mode is Teradata.
DECIMAL(n,0), if the mode is ANSI, where:
  • n is 15 if MaxDecimal in DBSControl is 0, 15, or 18.
  • n is 38 if MaxDecimal in DBSControl is 38.

For more information about these functions, see Teradata Vantage™ - SQL Functions, Expressions, and Predicates, B035-1145.