select * from t where emailaddress in
(select emailaddress from t group by emailaddress having count(*) > 1)
order by emailaddress;
Sent: Wed, 30 Aug 2006 5:17 PM
Subject: Group By question
I have a table of people with one of the fields being the email
address. I would like to query all rows that have more than one person
with the same email address. For example if the data were like this...
The query would return row A, D, B, and E, in that order. It would not
return C or F
-- Chris W
Gift Giving Made Easy
Get the gifts you want & give the gifts they want
One stop wish list for any gift, from anywhere, for any occasion!
-- MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
Check Out the new free AIM(R) Mail -- 2 GB of storage and
industry-leading spam and email virus protection.