17.00 - 17.05 - Interval Data Types - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Date and Time Functions and Expressions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
17.05
Release Date
June 2020
Content Type
Programming Reference
Publication ID
B035-1211-170K
Language
English (United States)

The following aggregate functions are valid for Interval types.

For this function … The result is …
AVG(arg) the type of the argument.
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.
MAX(arg) the type of the argument, based on the comparison rules for DateTime types.
MIN(arg)
SUM(arg) the type of the argument.

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