Oracle Error PLS-00664: Both ORDER BY and CLUSTER BY can not be specified for the same table function

Oracle Error Message

PLS-00664: Both ORDER BY and CLUSTER BY can not be specified for the same table function

Reason for the Error

An attempt was made to specify both ORDER BY and CLUSTER BY for the same table function.

Solution

specify either ORDER BY or CLUSTER BY for a table function, but not both.