Applies to: Databricks SQL Databricks Runtime
Returns the rank of a value compared to all values in the partition.
OVER clause of the window function must include an ORDER BY clause.
Unlike the function
dense_rank, rank will produce gaps in the ranking sequence.
row_number, rank does not break ties.
If the order is not unique, the duplicates share the same relative earlier position.