Aggregates in WHERE and HAVING Clauses

Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

Aggregates can appear in the following types of clauses:

  • The WHERE clause of an ABORT statement to specify an abort condition.

    But an aggregate function cannot appear in the WHERE clause of a SELECT statement.

  • A HAVING clause to specify a group condition.