• 10e5x (1/15/2013)


    Lynn, i am still trying. Mind explaining the difference between dense_rank() and row_number() if both using partion by?

    First thing you need to do is to read about the ROW_NUMBER(), RANK(), DENSE_RANK() functions in Books Online. Work through the samples they provide, then move on to some of your own data.

    Once you have a good understanding of these functions and what they are doing, we can work on understanding the slightly more complex aspects of them and how I used them.

    Also, you should take the time to read this article, http://www.sqlservercentral.com/articles/T-SQL/71550/, as it discusses the main concepts behind how my code works as well.