select email
from person
group by email
having count(email) > 1
# Write your MySQL query statement below
select email
from (
select email, count(email) as cnt
from person
group by email
) as t
where cnt > 1
这篇博客探讨了如何使用MySQL查询来识别和统计`person`表中出现多次的电子邮件地址。通过`groupby`和`having`子句,筛选出计数大于1的邮箱,从而找出重复的邮件记录。查询结果进一步通过子查询进行筛选,确保只保留重复的邮箱。
select email
from person
group by email
having count(email) > 1
# Write your MySQL query statement below
select email
from (
select email, count(email) as cnt
from person
group by email
) as t
where cnt > 1
2001

被折叠的 条评论
为什么被折叠?