SQL
来源:互联网 发布:mac迅雷无法登陆 编辑:程序博客网 时间:2024/06/03 20:54
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]
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]
- SQL
- SQL
- SQL
- sql
- sql
- SQL
- sql
- SQL (-)
- sql
- SQL
- SQL
- SQL
- sql
- sql
- sql
- sql
- SQL
- sql
- Linux I2C子系统分析之(二) ----- 概述
- 012年全国硕士研究生考试复试分数线划定
- OBJECT ARX 绘制常用图形 总结
- App ID & Game Center - II (代码部分)
- 教你自定义绘制TreeView
- SQL
- OSGI--apache felix 入门
- 3.python的set集合的操作示例——《深入python》学习
- socket用户异常掉线检测
- MVC概念(一)
- 屏幕字段不允许直接输入,只能通过SearchHelp(F4)
- css中设置div为透明,及内容垂直居中
- 深入浅出之正则表达式---收藏学习
- html正则表达式验证标签只能输入数字,英文。电话号码格式……