Question: what is the difference between rank and dense_rank in sql?
Answer: RANK: This gives you the ranking within your ordered partition. Ties are assigned the same rank, with the next ranking(s) skipped. ... DENSE_RANK: This gives you the ranking within your ordered partition, but the ranks are consecutive in it. Also, no ranks are skipped if there are ranks with multiple items.