Write a SQL query to find duplicate records in a transaction table and explain how you would clean up the test data.