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

45 lines
982 B
HTML

<p><meta charset="UTF-8" /></p>
<p>表:&nbsp;<code>Person</code></p>
<pre>
+-------------+---------+
| Column Name | Type |
+-------------+---------+
| id | int |
| email | varchar |
+-------------+---------+
id 是该表的主键(具有唯一值的列)。
此表的每一行都包含一封电子邮件。电子邮件不包含大写字母。
</pre>
<p>&nbsp;</p>
<p>编写解决方案来报告所有重复的电子邮件。 请注意,可以保证电子邮件字段不为 NULL。</p>
<p>&nbsp;<strong>任意顺序&nbsp;</strong>返回结果表。</p>
<p>结果格式如下例。</p>
<p>&nbsp;</p>
<p><strong>示例&nbsp;1:</strong></p>
<pre>
<strong>输入:</strong>
Person 表:
+----+---------+
| id | email |
+----+---------+
| 1 | a@b.com |
| 2 | c@d.com |
| 3 | a@b.com |
+----+---------+
<strong>输出:</strong>
+---------+
| Email |
+---------+
| a@b.com |
+---------+
<strong>解释:</strong> a@b.com 出现了两次。</pre>