RANK and DENSE_RANK both assign rankings to result rows.
With RANK, when two or more rows have the same values, they’ll be assigned the same rank, and the subsequent rank will be skipped.
Meanwhile, DENSE_RANK provides a consecutive ranking and doesn’t leave gaps in ranking even when duplicate values exist.