you can use DENSE_RANK() function.Here i show some example that show results
and i hope clear concept about ranking functions
in SQL Server:
rownumber of each row of result set.
value_expression , ... [ n ] ] order_by_clause )
rank of rows within the partition of a result set, without any gaps in the
ranking.
)
Returns
the rank of each row within the partition of aresult set.
OVER ( [
partition_by_clause ] order_by_clause )
query
used for this purpose because it provide a number for same values.