Aggregates Returning More than One Result | Teradata Vantage - Aggregates That Return More Than One Result - Advanced SQL Engine - Teradata Database

Time Series Tables and Operations

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
cxa1555383531762.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1208
lifecycle
previous
Product Category
Teradata Vantageā„¢
Some aggregate functions can create multiple results. For example, when computing the MODE of a set of data, if there is more than one value which is the most frequently observed (a tie of two or more values) each is considered the MODE of the data. The following general rule applies to any aggregates which return more than one result:
  • If a query has only one aggregate function with multiple results, all results are returned. There will be more than one result row for at least one timebucket, where the only value which differs in the result rows is the result of the function which had multiple results.
  • If more than one aggregate function has more than one result, only one result per timebucket is returned, along with a warning that this occurred. In this case, there is no way of predicting which result will be processed first. This type of request can be seen in Example: Multiple Results Found for One or More Time Series Aggregate Functions.