Distincts and Multiple Aggregate Distincts - Analytics Database - Teradata Vantage

SQL Data Manipulation Language

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2024-12-13
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
Product Category
Teradata Vantageā„¢

Vantage 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.