Oracle Message QSM-02140 - agg(expr) requires correspondng SUM(expr*expr) function

ERRORagg(expr) requires correspondng SUM(expr*expr) function
CAUSEThe capability in question is not supported when the materialized view uses certain aggregate functions but omits an invocation of the SUM function on the square of the same argument (the argument multiplied by itself).
ACTIONAdd the SUM function on the square of the argument.