D80 182. Duplicate Emails
Topic link
182. Duplicate Emails
Subject analysis
Write an SQL statement to find duplicate mailbox addresses in the table.
Train of thought
Aggregate the results using GROUP BY and count the occurrences. Use having to filter for results with occurrences greater than 1.
The final code
# Write your MySQL query statement below
SELECT Email FROM Person group by Email having count(id)>1;
Copy the code
If you find this article useful, you are welcome to subsidize it with love.