颤抖吧,骚年们,2016年末最牛逼的sql语句

select channel_name,from_unixtime(createTime,'%Y-%m-%d') as tdate,
count(deviceid) '安装量',count(case when amt<>0 then 1 end) '付费量'
from v_payitem group by channel_name,tdate

 

count里可以加条件判断,你们见过吗?

posted on 2016-12-19 20:09  防空洞123  阅读(667)  评论(0编辑  收藏  举报

导航