Question: what is the difference between the rank() and dense_rank() functions?
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.