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 as if all subsequent records were unique. aka 1, 2, 2, 4.

SELECT 
	ColName1,
	ColName2,
	ColName3,
	RANK() OVER (PARTITION BY ColName1 ORDER BY ColName1, ColName2) AS RankCol
FROM SchemaName.TableName
	ORDER BY ColName1, ColName2

Note: using PARTITION BY ColName1 is optional