Oracle Error QSM-02084: DISTINCT clause on a duplicate sensitive aggregate function

Oracle Error Message

QSM-02084: DISTINCT clause on a duplicate sensitive aggregate function

Reason for the Error

The capability in question is not supported when the materialized view uses the DISTINCT clause in this context.

Solution

Re-phrase the query to avoid the use of the DISTINCT clause.