leetcode 182 查找重复的电子邮箱
查找重复的电子邮箱
对于mysql来说 inner join 就是在做笛卡尔积
select email as Email from Person group by email having count(email) > 1
select email as Email from ( select email ,count(email) as c from Person group by email ) r where r.c > 1
select distinct p1.email as Email from Person p1 inner join Person p2 on p1.email = p2.email and p1.id != p2.id
==