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.
OVER clause of the window function must include an ORDER BY clause.
row_number breaks ties.
If the order is not unique, the result is non-deterministic.