Write a SQL query to find all duplicate emails in a table named Person.
Person
Id
Email
1
[email protected]
2
3
For example, your query should return the following for the above table:
GeeksforGeeks
Leetcodearrow-up-right
ProgramCreek
YouTube
Input:
{"headers": {"Person": ["Id", "Email"]}, "rows": {"Person": [[1, "[email protected]"], [2, "[email protected]"], [3, "[email protected]"]]}}
Output:
{"headers": ["Email"], "values": [["[email protected]"]]}
Last updated 5 years ago
# MySQL query statement SELECT Email FROM Person GROUP BY Email HAVING COUNT(Email) > 1