http://db.apache.org/derby/docs/10.9/ref/rreffuncrownumber.html
* Derby does not currently allow the named or unnamed window specification to be specified in the OVER() clause, but requires an empty parenthesis. This means the function is evaluated over the entire result set. * The ROW_NUMBER function cannot currently be used in a WHERE clause. * Derby does not currently support ORDER BY in subqueries, so there is currently no way to guarantee the order of rows in the SELECT subquery. An optimizer override can be used to force the optimizer to use an index ordered on the desired column(s) if ordering is a firm requirement. I see these possibly relevant fixes: https://issues.apache.org/jira/browse/DERBY-3634 https://issues.apache.org/jira/browse/DERBY-4397 Also are there still performance considerations with ROW_NUMBER? I see: https://issues.apache.org/jira/browse/DERBY-3505 Are there still other concerns with ROW_NUMBER? Thanks Kathey