List:General Discussion« Previous MessageNext Message »
From:Claudio Nanni Date:March 2 2011 11:20am
Subject:Re: Query help
View as plain text  
Hi Neil,

select
   login_id,
   ip_address
from
   basic_table
group by
   login_id,ip_address
having
   count(login_id,ip_address)>1

this should work

in case you want to see also the list of emails add:

   group_concat(email_address,',') as list_of_used_emails

to the select fields.


Claudio




2011/3/2 Tompkins Neil <neil.tompkins@stripped>

> Hi
>
> I've the following basic table
>
> login_id
> email_address
> ip_address
>
> I want to extract all records from this table in which a user has used the
> same IP address but different email address to login ?
>
> Thanks,
> Neil
>



-- 
Claudio

Thread
Query helpTompkins Neil2 Mar
  • Re: Query helpClaudio Nanni2 Mar
  • RE: Query helpJerry Schwartz2 Mar
    • Re: Query helpTompkins Neil2 Mar
      • RE: Query helpJerry Schwartz2 Mar