Find Duplicate Names in Employees Table

Find employees whose names occur more than once.

sql

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

This query groups the records in the "employees" table by the "name" column and filters the results to return only those names that appear in more than one row.

PromptDB can make mistakes. Please double-check responses.