select * from t where emailaddress in
(select emailaddress from t group by emailaddress having count(*) > 1)
order by emailaddress;
Thanks,
Michael
-----Original Message-----
From: [EMAIL PROTECTED]
To: mysql@lists.mysql.com
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...
A [EMAIL PROTECTED]
B [EMAIL PROTECTED]
C [EMAIL PROTECTED]
D [EMAIL PROTECTED]
E [EMAIL PROTECTED]
F [EMAIL PROTECTED]
The query would return row A, D, B, and E, in that order. It would not
return C or F
-- Chris W
KE5GIX
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!
http://thewishzone.com
-- MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
________________________________________________________________________
Check Out the new free AIM(R) Mail -- 2 GB of storage and
industry-leading spam and email virus protection.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]