This example shows how to find duplicate records in a table.

SELECT id, COUNT(id) FROM table1 GROUP BY id HAVING COUNT(id)>1