INVALID_AGGREGATE_FILTER error class

SQLSTATE: 42903

The FILTER expression <filterExpr> in an aggregate function is invalid.

CONTAINS_AGGREGATE

Expected a FILTER expression without an aggregation, but found <aggExpr>.

CONTAINS_WINDOW_FUNCTION

Expected a FILTER expression without a window function, but found <windowExpr>.

NON_DETERMINISTIC

Expected a deterministic FILTER expression.

NOT_BOOLEAN

Expected a FILTER expression of the BOOLEAN type.