1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (English)/查找重复的电子邮箱(English) [duplicate-emails].html

43 lines
1012 B
HTML
Raw Normal View History

2022-03-27 20:56:26 +08:00
<p>Table: <code>Person</code></p>
<pre>
+-------------+---------+
| Column Name | Type |
+-------------+---------+
| id | int |
| email | varchar |
+-------------+---------+
2023-12-09 18:42:21 +08:00
id is the primary key (column with unique values) for this table.
2022-03-27 20:56:26 +08:00
Each row of this table contains an email. The emails will not contain uppercase letters.
</pre>
<p>&nbsp;</p>
2023-12-09 18:42:21 +08:00
<p>Write a solution to report all the duplicate emails. Note that it&#39;s guaranteed that the email&nbsp;field is not NULL.</p>
2022-03-27 20:56:26 +08:00
<p>Return the result table in <strong>any order</strong>.</p>
2023-12-09 18:42:21 +08:00
<p>The&nbsp;result format is in the following example.</p>
2022-03-27 20:56:26 +08:00
<p>&nbsp;</p>
2023-12-09 18:42:21 +08:00
<p><strong class="example">Example 1:</strong></p>
2022-03-27 20:56:26 +08:00
<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>