Oracle Error ORA-36161: (XSAGGRRUVCV) Aggregation variable workspace object cannot have itself as a COUNTVAR.

Oracle Error Message

ORA-36161: (XSAGGRRUVCV) Aggregation variable workspace object cannot have itself as a COUNTVAR.

Reason for the Error

The user specified the same variable as both an aggregation variable and a COUNTVAR

Solution

Specify a different COUNTVAR