Find Duplicate Emails in Employees Table

Find employees whose email addresses appear more than once.

sql

SELECT email, COUNT(email) FROM employees GROUP BY email HAVING COUNT(email) > 1;

This query groups the records in the "employees" table by the "email" column and filters for those groups where the count of occurrences is greater than one.

PromptDB can make mistakes. Please double-check responses.