mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-04 15:01:40 +08:00
update
This commit is contained in:
42
leetcode/problem/duplicate-emails.html
Normal file
42
leetcode/problem/duplicate-emails.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<p>Table: <code>Person</code></p>
|
||||
|
||||
<pre>
|
||||
+-------------+---------+
|
||||
| Column Name | Type |
|
||||
+-------------+---------+
|
||||
| id | int |
|
||||
| email | varchar |
|
||||
+-------------+---------+
|
||||
id is the primary key column for this table.
|
||||
Each row of this table contains an email. The emails will not contain uppercase letters.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p>Write an SQL query to report all the duplicate emails.</p>
|
||||
|
||||
<p>Return the result table in <strong>any order</strong>.</p>
|
||||
|
||||
<p>The query result format is in the following example.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong>
|
||||
Person table:
|
||||
+----+---------+
|
||||
| id | email |
|
||||
+----+---------+
|
||||
| 1 | a@b.com |
|
||||
| 2 | c@d.com |
|
||||
| 3 | a@b.com |
|
||||
+----+---------+
|
||||
<strong>Output:</strong>
|
||||
+---------+
|
||||
| Email |
|
||||
+---------+
|
||||
| a@b.com |
|
||||
+---------+
|
||||
<strong>Explanation:</strong> a@b.com is repeated two times.
|
||||
</pre>
|
Reference in New Issue
Block a user