Duplicate Emails - Sql - Easy - LeetCode
💻 coding

Duplicate Emails - Sql - Easy - LeetCode

1 min read 82 words
1 min read
ShareWhatsAppPost on X
  • 1The article discusses a SQL query to identify duplicate emails in a 'Person' table.
  • 2The example provided shows a table with duplicate email entries, specifically 'a@b.com'.
  • 3The SQL query uses 'GROUP BY' and 'HAVING' clauses to filter emails that appear more than once.

AI-generated summary · May not capture all nuances

Key Insight
AskGif

"The article discusses a SQL query to identify duplicate emails in a 'Person' table."

Duplicate Emails - Sql - Easy - LeetCode

Write a SQL query to find all duplicate emails in a table named Person.

+----+---------+ | Id | Email | +----+---------+ | 1 | a@b.com | | 2 | c@d.com | | 3 | a@b.com | +----+---------+ For example, your query should return the following for the above table:

+---------+ | Email | +---------+ | a@b.com | +---------+ Note: All emails are in lowercase.

# Write your MySQL query statement below
Select Email From Person Group By Email having count(*) > 1;

Enjoyed this article?

Share it with someone who'd find it useful.

ShareWhatsAppPost on X

sumitc91

Published on 16 October 2020 · 1 min read · 82 words

Part of AskGif Blog · coding

You might also like

Duplicate Emails - Sql - Easy - LeetCode | AskGif Blog