PLS-00664: Both ORDER BY and CLUSTER BY can not be specified for the same table function Cause: An attempt was made to specify both ORDER BY and CLUSTER BY for the same table function. Action: specify either ORDER BY or CLUSTER BY for a table function, but not both.