we have a scenario here where we need to delete all the duplicate rows from a table based on timestamp. The table structure looks like this:
Item Ref1 Ref2 Timestamp 1 A test1 2/3/2012 10:00:00 1 A test2 2/3/2012 11:00:00 1 A test1 2/3/2012 12:00:00 2 A prod1 2/3/2012 10:00:00 2 B prod2 2/3/2012 11:00:00 2 A prod2 2/3/2012 12:00:00
So we need to delete the duplicate rows from this table based on item and ref1. like here we should have only 1 row for item 1 and ref1 A with the latest timestamp. Same for item 2 we should have only 1 row for ref1 A with latest timestamp.
Any pointers will be great