MySql query to check for duplicate ips
I need to know if there's any method to do the task below using only a mysql query. I want to check if 2 accounts have on the last_login_from columm the same IP adress. I want the query to return all the rows that don't have an unique value on the last_login开发者_开发问答_from columm
select *
from accounts a
where a.last_login_from IN
( select last_login_from
from accounts
group by last_login_from
having count(*)>1 )
精彩评论