Hi guys
This is a sample of the data that I have.
-ID- -Rank- -Type- -Status- -Amount-
1142474 2 Under Offer Approved 23
1148492 1 Present Current 56
1148492 2 Under Offer Approved 3
2273605 1 Present Current 24
Where the ID is the same I only want the record with the highest rank. So the end result of the query.
-ID- -Rank- -Type- -Status- -Amount-
1142474 2 Under Offer Approved 23
1148492 1 Present Current 56
2273605 1 Present Current 24
Now to get the original data set is an expensive operation, so I don't want to do a group by the ID and then mins the rank and then joins back onto the dataset again. Hence the query needs to do its work another way.
Cheers Anthony