Oracle Error QSM-02182: PCT is enabled through a join dependency

Oracle Error Message

QSM-02182: PCT is enabled through a join dependency

Reason for the Error

The capability in question is not supported when the materialized view does not contain some expression join dependent on the partitioning key of relation in question in the select list. For definition of join dependency, please look at Oracle documentation.

Solution

Change the query to contain the partitioning key