数据库查询
来源:互联网 发布:vb pdfview.ocx使用 编辑:程序博客网 时间:2024/05/29 09:15
select convert(Date, char(10)) as TransCreateDate,
ContentProviderName as CompanyName,
sum(TotalCount) as TotalRequest,
sum(CASE WHEN status= 'F' THEN TotalCount ELSE '0' END) as SuccessfullyDownload,
sum(CASE WHEN Paid= 'Y' THEN TotalCount ELSE '0' END) as SuccessCharged,
price as Price,
sum(CASE WHEN Paid = 'Y' THEN GrossRevenue ELSE 0 END) as GrossRevenue,
ItemType as ContentType,
sum(WEBChannel) as WEBChannel,
sum(WAPChannel) as WAPChannel,
sum(SMSChannel) as SMSChannel,
sum(UMBChannel) as UMBChannel,
sum(VASChannel) as VASChannel
#,status,Paid
from AortaReporting
where convert(Date, char(10)) <= '2013-05-01' and convert(Date, char(10)) >= '2013-05-01' and ItemType = "FTD" and ContentProviderID = 162
GROUP BY
TransCreateDate,ContentProviderID,price
select
ProductName as ContentName,Album,Artist,ContentProviderName as CompanyName,
sum(CASE WHEN Paid= 'Y' THEN TotalCount ELSE '0' END) as SuccessCharged,
ItemType as ContentType,Price as Price,
sum(WEBChannel) as WEBChannel,sum(WAPChannel) as WAPChannel,sum(SMSChannel) as SMSChannel,sum(UMBChannel) as UMBChannel,sum(VASChannel) as VASChannel
,status,Paid
from AortaReporting where convert(Date, char(10)) <= '2013-05-01' and convert(Date, char(10)) >= '2013-05-01' and ItemType = 'FTD' and ContentProviderID = 162
GROUP BY ProductName ,Album,Artist,ContentProviderID
- 数据库查询
- 数据库查询
- 数据库查询
- 数据库查询
- 数据库查询
- 数据库查询
- 数据库查询
- 数据库查询
- 数据库查询
- 数据库查询
- 数据库查询
- 查询数据库
- 查询数据库
- 数据库查询
- 数据库查询
- 数据库查询
- 数据库查询
- 数据库查询
- floor函数
- Error: MySQL server is requesting the old and insecure pre-4.1 auth mechanism.
- 通过手机音频口,实现与单片机通讯,做电子签名成功
- 安卓开发手记 之 intent 传递数据的另外几种方式
- What is the difference between test, [ and [[ ?
- 数据库查询
- 关于Html无宽度居中
- 单例设计模式(懒汉式和饿汉式区别)
- 学习Python(十)
- Linux网络设置1——Linux网络环境配置
- ubuntu12.04下配置LAMP
- Android设置页面没有标题的方法
- JAVA设计模式——命令模式
- 使用HTML5拍照