>> Don't know whether windowing functions can be used in the WHERE clause, but >> when Firebird 3 is released, it would be tempting to try things like >> >> WHERE MOD(ROW_NUMBER() OVER (ORDER BY <something>), 5) = 2 > >You shouldn't be able to use window functions in a `WHERE`, only in the >`SELECT` columnlist. The `ROW_NUMBER` is applied over the materialized >rows, so you can't apply it in the filtering condition. You need a >subquery or CTE with `ROW_NUMBER()` and then filter that in the outer >select.
Thanks for confirming things to work more like I expected them to, rather than what I hoped. Anyway, adding a CTE is only a minor overhead. Set
