SQLite Forum

Novice question concerning adding conditional incremental integer counter
The Window Query that generates the new row_number excludes rows with strongs_no == 'punc2' from the Window Function.  You could use a FILTER clause but that does not work with "built-in" window functions, only aggregate window functions, so since those rows are excluded, you have to add them back in with a union.

The union can be a union all because the _rowid_ in the update table (src) is used to lookup the row to be updated in dst, so they do not need to be in order.