How to Rank this...

  • I'm failing to write a suitable rank function to label the following select resultset as seen here. I want my RankNumber column to be as set out here...

    Untitled

    Basically for each account id, i want to sequentially number the rows from 1 to X and the number needs to change only when the accountowner changes. Each row for each account needs to be ordered in "LastModifiedDate" DESC order first.

     

  • Would you please provide your sample data in the form of CREATE TABLE / INSERT statements?


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply