G
Guest
Is it possible to rank grouped data like you can in Excel using the RANK
function?
Basically I have a table structured as below, and I'd like to be able to run
an update query on the rank column, to rank the policies in order of
due_date. I always know which date is rank 1.
from this:
case due_date rank
10 01/01/2000 1
10 01/01/2001
10 01/01/2003
20 01/01/2000 1
20 01/01/2001
20 01/01/2003
to this:
case due_date rank
10 01/01/2000 1
10 01/01/2001 2
10 01/01/2003 3
20 01/01/2000 1
20 01/01/2001 2
20 01/01/2003 3
Thanks
Damien
function?
Basically I have a table structured as below, and I'd like to be able to run
an update query on the rank column, to rank the policies in order of
due_date. I always know which date is rank 1.
from this:
case due_date rank
10 01/01/2000 1
10 01/01/2001
10 01/01/2003
20 01/01/2000 1
20 01/01/2001
20 01/01/2003
to this:
case due_date rank
10 01/01/2000 1
10 01/01/2001 2
10 01/01/2003 3
20 01/01/2000 1
20 01/01/2001 2
20 01/01/2003 3
Thanks
Damien