SQL

count( distinct case when sms_content='6' and usr_brand='1000' then  send_nbr else null end) as 积分兑换不重复量,
count(case when sms_content='6' and usr_brand='1000' then  send_nbr else null end) as 积分兑换总量,
count( distinct case when recv_nbr='10086888' then  send_nbr else null end) as 入网中奖不重复,
count(case when recv_nbr='10086888' then  send_nbr else null end) as 入网中奖总量,
count( distinct sms_content like '%20*%' and recv_nbr='10086'  send_nbr else null end) as 营销活动不重复,
count(case when sms_content like '%20*%' and recv_nbr='10086' then  send_nbr else null end) as 营销活动总量
from smbh_sms_recv_log
where recv_time>=to_date('20070401 00:00:01','yyyymmdd hh24:mi:ss')
and recv_time<=to_date('20070514 23:59:59','yyyymmdd hh24:mi:ss')
and home_city in ('591','592','593','594','595','596','597','598','599')
group by home_city [/B]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值