投递网易互娱等公司10个岗位 >
0 点赞 评论 收藏
分享
dhfrjunifmb:对不?????? Select sp.日期,充值档位,购买物品 as ‘物品名称’ ,count(购买物品) as ‘数量’ from src_prepaid sp , (Select id,日期,(case when total>0 and total <=100 then‘(0,100]’ When total<=500 then ‘(100,500]’ When total<=1000 then ‘(500,1000]’ Else ‘(1000,inf)’ end) as ‘充值档位’ from (select id ,日期,sum(充值) as total from scr_prepaid where 时间<日期 and 时间>=date_sub(日期,interval 30 day) group by id) a ) aa where aa.id=sp.id and aa.日期=sp.日期 And sp.日期 between ‘2019-08-15’ and ‘2019-08-20’ group by sp.日期,充值档位,物品名称
投递网易雷火等公司10个岗位 >
0 点赞 评论 收藏
分享
关注他的用户也关注了: