开发者

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 )
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜