Oracle Error PLS-00653: aggregate/table functions are not allowed in PL/SQL scope

Oracle Error Message

PLS-00653: aggregate/table functions are not allowed in PL/SQL scope

Reason for the Error

User tried to use a table/aggregate function in PL/SQL scope.

Solution

Do not use table/aggregate function in PL/SQL scope.