Teradata Database Message 3627 - 3627 - Analytics Database - Teradata Vantage

Teradata® VantageCloud Lake - Analytics Database Messages

Edition
Lake
Product
Analytics Database
Teradata Vantage
Published
October 2022
Language
English (United States)
Last Update
2024-02-26
dita:mapPath
tzr1629746512312.ditamap
dita:ditavalPath
ft:empty
dita:id
vza1585613049811
lifecycle
latest
Product Category
Teradata® Vantage™
Message
Illegal use of DISTINCT Aggregate Expressions.
Explanation
The given SELECT operation uses an aggregate function that specifies the DISTINCT option, as in: COUNT( DISTINCT <expression> ); Uses of the DISTINCT modifier are restricted to: (a) the SELECT List, ORDER BY, and HAVING clause of a select statement that uses a GROUP BY clause, or; (b) the first WITH clause SELECT list for select statements that do not use a GROUP BY clause. Multiple use of DISTINCT modifier is restricted when there is a WITH clause. The option can not be used in both places, and the option can not be used in multiple WITH Clauses. In the given query, the DISTINCT option is not being properly used.
Generated By
OPT modules.
For Whom
End User.
Notes
None
Remedy
Correct the request and resubmit it.