Oracle Error QSM-02198: PCT FAST REFRESH is not possible if HAVING clause includes a subquery

Oracle Error Message

QSM-02198: PCT FAST REFRESH is not possible if HAVING clause includes a subquery

Reason for the Error

The capability in question was not supported because the materialized view query HAVING clause included a subquery.

Solution

Rephrase the query to avoid the use of a subquery in the HAVING clause.