Returns the rank of rows within the partition of a result set, without any gaps in the ranking. The rank of a row is one plus the number of distinct ranks that come before the row in question.
DENSE_RANK ( ) OVER ( [ <partition_by_clause> ] < order_by_clause > )
Partitioning divides the result set produced by the FROM clause into partitions to which the DENSE_RANK function is applied. ORDER BY clause determines the order in which the DENSE_RANK function is applied to the rows in a partition.
SELECT DENSE_RANK() OVER(PARTITION BY [IntColumn] ORDER BY [IntColumn]) AS [rank] FROM [IntTable]