Oracle Error Message
QSM-02040: top level query contains GSets and the key is too long for rewrite
Reason for the Error
The capability in question is not supported when the materialized view uses a grouping set with too many keys.
Solution
Reduce the number of grouping set keys.