一个mysql不解的问题

执行语句1
select count(distinct uid) from usership ;
假设得到结果数据 10000
执行语句2
select count(distinct uid) from usership where groupid not in (select id from usergroup where fleet=1);
得到的
结果是 > 10000
select count(*) from (select distinct uid from usership where groupid not in (select id from usergroup where fleet=1)) t
得到的结果是 <10000 符合预期的
posted @ 2017-07-26 16:23  云淡风轻~  阅读(118)  评论(0编辑  收藏  举报