Rank process using T-SQL partition function.