Is it posible to select a stack of value by using MYSQL GROUP BY -
i got query :
select email abc_table group email having ( count(email) > 1 )
so return me :
email a@b.com c@d.com e@f.com
and need adjust query :
email id a@b.com 1 a@b.com 2 c@d.com 3 c@d.com 4 c@d.com 5 e@f.com 6
is posible result using group having ? or suggestion result?
thanks lot!
select a.email , a.id abc_table join ( select email abc_table group email having count(email) > 1 ) ag on ag.email = a.email
Comments
Post a Comment