OCI-30481
GROUPING, GROUPING_ID, and GROUP_ID cannot be used without GROUP BY
Cause
GROUPING functions were used without specifying the GROUP BY clause.
Action
Grouping functions (GROUPING, GROUPING_ID, and GROUP_ID) are used to identify the exact level of aggregation for a subtotal for a GROUP BY ROLLUP, CUBE or GROUPING SETS query. Specify a GROUP BY clause in the query, and specifically use GROUP BY extensions ROLLUP, CUBE or GROUPING SETS.