Write a SQL query to find all duplicate Person table e-mail.
Example:
+ ---- + --------- +
| Id | Email |
+ ---- + --------- +
| 1 | [email protected] |
| 2 | c d.com @ |
| 3 | [email protected] |
+ ---- + --------- +
Based on the above inputs, your query should return the following results:
+ --------- +
| Email |
+ --------- +
| [email protected] |
+ --------- +
Note: All e-mail is Lower case letters.
Source: stay button (LeetCode)
select Email from Person group by Email having count(Email)>1