row_number
ranking window function
Applies to: Databricks SQL
Databricks Runtime
Assigns a unique, sequential number to each row, starting with one, according to the ordering of rows within the window partition.
Returns
An INTEGER.
The OVER
clause of the window function must include an ORDER BY clause.
Unlike rank
and dense_rank
, row_number
breaks ties.
If the order is not unique, the result is non-deterministic.