用sql 查询 工作中遇到的问题,写每个月购物一次和新老会员数。。。。。。。。。。。。。。。。。。。。。。。。
1条回答 默认 最新
threenewbee 2018-11-23 14:54关注select userid from 表 where month(日期) between 1 and 12 group by userid having(count(distinct month(日期)))=12本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
select userid
from 表 where month(日期) between 1 and 12
group by userid
having(count(distinct month(日期)))=12