Previous Topic: OQ143051Next Topic: OQ143060


OQ143052

An aggregate function reference is not valid for GROUP BY.

Reason:

Your GROUP BY clause references a column name which is derived from an aggregate function. Aggregate functions are not valid predicates in the GROUP BY clause. For example, in the following statement, the as-name reference represents the result of the aggregate function MAX:

   DESTINATION IS NULL
SELECT MAX(field-name) AS (as-name) FROM table-name
GROUP BY as-name

Module:

OLQSSCAN

Severity:

0