Write a query to find and delete duplicate records from a database table while retaining the original entry.