Oracle Message ORA-19171 - FORG0007: invalid argument to aggregate function

ERRORFORG0007: invalid argument to aggregate function
CAUSEAn error occurred during the processing of the XQuery expression.
ACTIONCheck the detailed error message for the possible causes.