In SQL you can use Rank which counts ties in a series, or Dense_Rank which does not - for example a sequence of 100,110,120,120,150 would give ranks of 1,2,3,3,5 but a dense rank of 1,2,3,3,4. This is useful when creating ranks when you are adding up rows of data before applying the ranking.