34,589
社区成员
发帖
与我相关
我的任务
分享
select * from adshowlog2 as a where not exists (select 1 from adshowlog where ip=a.ip or numiid=a.numiid)
select uid from adshowlog2 a
left join adshowlog b on a.adid=b.adid
where a.ip<>b.ip and a.numiid<>b.numiid
select * from adshowlog2 as a where not exists(select 1 from dshowlog where ip=a.ip and numiid=a.numiid)
select * from adshowlog2 as a where not exists(select 1 from dshowlog where ip=a.ip and numiid=a.numiid)
select a2.uip
from adshowlog a, adshowlog2 a2
where a.ip <> a2.ip
and a.numidd <> a2.numidd
--uid和IP和numiid有一项不相同的
select * from adshowlog2 as a where not exists(select 1 from dshowlog where uid=a.uid and ip=a.ip and numiid=a.numiid)
--uid存在,IP和numiid有一项不相同
select * from adshowlog2 as a where not exists(select 1 from dshowlog where uid=a.uid and ip=a.ip and numiid=a.numiid)
and exists(select 1 from dshowlog where uid=a.uid)
select distinct userid from adshowlog2 where userid not in
(
select distinct a.* from (select l.userid from adshowlog2 as l inner join adshowlog r on l.ip=r.ip and l.cnumiid=r.cnumiid) as a
)