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

Teradata Vantage™ - SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1184-171K
Language
English (United States)

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, andTeradata Vantage™ - Database Design, B035-1094.

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