关闭

SQL

148人阅读 评论(0) 收藏 举报
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]
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:47102次
    • 积分:949
    • 等级:
    • 排名:千里之外
    • 原创:52篇
    • 转载:5篇
    • 译文:0篇
    • 评论:2条