Joins and Aggregation in View Definitions - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
jpx1556733107962.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

When defining a non-updatable view, you can specify one or more aggregate operators (SUM, AVG, MAX, MIN, and COUNT) in the SELECT expression list or in the conditional expression of a HAVING clause. Creating views with aggregation can eliminate the need to create and delete temporary tables. For many applications, an aggregate join index might be a more optimal solution. For more information about aggregate join indexes, see Aggregate Join Indexes, Optimizer Rules for Using Aggregate Join Indexes in a Query Plan, and “Join and Hash Indexes” in Teradata Vantage™ - Database Design, B035-1094.

Aggregate operators cannot be used in the conditional expression of a WHERE clause.