请教一句sql

phalcon 2003-10-09 11:33:21
某月新增用户数 表A 字段mobile 找出字段date like '200309%'的时候出现过的mobile 但是date not like '200309%'的时候没出现过的 总数 Count()
...全文
112 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
sdhdy 2003-10-09
  • 打赏
  • 举报
回复

select count(*) from 表A
where mobile in (select moblie from 表A where date like '200309%')
and mobile not in (select moblie from 表A where date not like '200309%')
xiaogate 2003-10-09
  • 打赏
  • 举报
回复
Select count(*) from 表A
where mobile in (select moblie from 表A where date like '200309%')
and mobile not in (select moblie from 表A where date not like '200309%')
我同意这个
pengdali 2003-10-09
  • 打赏
  • 举报
回复
Select count(*) from 表A where date like '200309%' and mobile not in (select moblie from 表A where date not like '200309%')
txlicenhe 2003-10-09
  • 打赏
  • 举报
回复
Select count(*) from 表A
where mobile in (select moblie from 表A where date like '200309%')
and mobile not in (select moblie from 表A where date not like '200309%')

34,874

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧