Oracle Error PLS-00665: ORDER BY and CLUSTER BY clauses require a PARTITION BY clause

Oracle Error Message

PLS-00665: ORDER BY and CLUSTER BY clauses require a PARTITION BY clause

Reason for the Error

An attempt was made to specify an ORDER BY or CLUSTER BY clause without also specifying a PARTITION BY clause.

Solution

Add a PARTITION BY clause, or remove the ORDER BY or CLUSTER BY clause.