row_number is exact only with explicit tie-free ordering.

highlighted = computed this step

row_number

The window surface supports only row_number with explicit order columns. Ambiguous ties fail closed instead of choosing hidden order.

row number with explicit order\text{row number with explicit order}

Partitioned row numbers

The output has 4 rows and 4 window facts. The DB partition contains 3 ordered rows.

rows=4,window facts=4\text{rows}=4,\quad \text{window facts}=4

SQL extensions are rendered as tiny finite-table semantics; SQL dialect completeness, optimizer behavior, execution cost, full DDL behavior, and database-product claims are out of scope.

compiled summaryfactvaluerowCount4arity4rootKindrow_number row_numbercoursesidscorernDBs1901DBs2NULL2DBs4703OSs1801 row_number factspartitionorderrowNumber[DB][s1]1[DB][s2]2[DB][s4]3[OS][s1]1

Summary

row_number is exact only because the order is explicit and tie-free. Note: frames, ranges, and other window functions are out of scope.

explicit tie free order\text{explicit tie free order}