Hello,

I would like to find duplicate records based off two columns and then also get the unique ID / index field? Is this possible since I am doing a GROUP BY?

I want to delete duplicate records and it would be easier if I had the ID.

Thanks,
Bart

Code MySQL:
 
SELECT DirID, COUNT(*), RecordID, COUNT(*)
FROM Instance
GROUP BY DirID,RecordID
HAVING COUNT(*) > 1