大数据第35天—Mysql练习题6-杨大伟
展示效果:
a@b.com |
1 Create table If Not Exists Person (Id int, Email varchar(255)) 2 3 insert into Person (Id, Email) values (1, 'a@b.com') 4 insert into Person (Id, Email) values (2, 'c@d.com') 5 insert into Person (Id, Email) values (3, 'a@b.com')
最终SQL:
1 select 2 Email 3 from 4 Person 5 group by 6 Email 7 having 8 count(Email) > 1;