首页 > 代码库 > 颤抖吧,骚年们,2016年末最牛逼的sql语句

颤抖吧,骚年们,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里可以加条件判断,你们见过吗?

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