List:General Discussion« Previous MessageNext Message »
From:mizioumt Date:August 31 2006 8:03pm
Subject:Re: Group By question
View as plain text  
select * from t where emailaddress in
(select emailaddress from t group by emailaddress having count(*) > 1)
order by emailaddress;


-----Original Message-----
From: 2wsxdr5@stripped
To: mysql@stripped
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 123@stripped
B 456@stripped
C 984@stripped
D 123@stripped
E 456@stripped
F 321@stripped

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:
To unsubscribe:

Check Out the new free AIM(R) Mail -- 2 GB of storage and 
industry-leading spam and email virus protection.

Group By questionChris W30 Aug
  • Re: Group By questionPeter Brawley30 Aug
  • Re: Group By questionVisolve DB TEAM31 Aug
  • Re: Group By questionmizioumt31 Aug
  • changing datadirHelen M Hudson4 Sep