Leetcode 182 Duplicate Emails

 

+----+---------+
| Id | Email   |
+----+---------+
| 1  | a@b.com |
| 2  | c@d.com |
| 3  | a@b.com |
+----+---------+

For example, your query should return the following for the above table:

+---------+
| Email   |
+---------+
| a@b.com |
+---------+

Note: All emails are in lowercase.

select Email from Person
group by Email
having count(*) > 1
posted @ 2015-06-30 14:33  lilixu  阅读(689)  评论(0编辑  收藏  举报