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...
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.