查找重复的电子邮箱-leetcode

查找重复的电子邮箱


sql 编程

1. 地址

https://leetcode-cn.com/problems/duplicate-emails/

2. 解法

内连接,或者多表查询
email 相同,但是 id 不同的行

select
    distinct p1.Email
from
    Person p1
    inner join Person p2 on p1.Id <> p2.Id
    and p1.Email = p2.Email
posted @ 2020-06-14 13:14  吴丹阳-V  阅读(175)  评论(0编辑  收藏  举报