ORA-22959
cannot group by a XMLType column
Cause
An object type must have a MAP or ORDER method defined for all comparisons other than equality and inequality comparisons. This is not possible with XMLType.
Action
Remove the XMLType column from the GROUP BY clause.