Oracle Error Message
ORA-36162: (XSMXAGGR05) COUNTVAR variable workspace object must be of type INTEGER, not string.
Reason for the Error
The user specified a non-INTEGER variable as a COUNTVAR for aggregation
Solution
Redefine the COUNTVAR to be an INTEGER