$ 0 0 You probably need to a PARTITION to your ROW_NUMBER: row_number() over (PARTITION BY col2 order by col1) But you should check explain, it might do the STATS step before applying the WHERE filter. Dieter
You probably need to a PARTITION to your ROW_NUMBER:
row_number() over (PARTITION BY col2 order by col1)
But you should check explain, it might do the STATS step before applying the WHERE filter.
Dieter