SQL query statement to find duplicate records in a database table.

SELECT fieldname1, fieldname2, COUNT(duplicatefieldname)
FROM tablename
GROUP BY duplicatefieldname
HAVING COUNT(duplicatefieldname) > 1