Distincts and Multiple Aggregate Distincts - Teradata Database

SQL Data Manipulation Language

Product
Teradata Database
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata® Database

Distincts and Multiple Aggregate Distincts

Teradata Database supports the use of:

  • One DISTINCT expression when performing an aggregation.
  • Multiple aggregate distincts, which allow multiple DISTINCT expressions for aggregates.
  • For example:

    SELECT g, SUM(DISTINCT a), SUM(DISTINCT b)
    FROM T
    GROUP BY g
     COUNT(DISTINCT c) > 5;

    The feature simplifies SQL generation.