Write a query to find duplicate records in a database table and explain how you would safely remove them.