Find all IP columns that occures with different Logins columns
It looks like you need exists
select distinct Login, IP
from t
where exists (
select * from t t2
where t2.ip = t.ip and t2.login != t.login
)
order by IP
It looks like you need exists
select distinct Login, IP
from t
where exists (
select * from t t2
where t2.ip = t.ip and t2.login != t.login
)
order by IP