I have a table with 4 columns : customerid , purchasedate, purchasenumber, and operationid. This table is returned as a result of another query.
I would like to eliminate any duplicate customers except the one that has the most recent date.
For example: If I have 4 entries with different purchasedates but the same operationid and same customerid then I would like to keep the most recent.