DENSE_RANK
This will create a new column that has an incrementing number for each record. When the order by values are identical, then the number will not increment. When the next non-identical record arrives, the number will increment from them last number. aka 1, 2, 2, 3.
SELECT
ColName1,
ColName2,
ColName3,
DENSE_RANK() OVER (PARTITION BY ColName1 ORDER BY ColName1, ColName2) AS RankCol
FROM SchemaName.TableName
ORDER BY ColName1, ColName2Note: using PARTITION BY ColName1 is optional