select
a.productVersion as Version,
count(a.licenseId) as Activation_Count,
DATE_FORMAT(a.lastActivatedOn,
GET_FORMAT(DATE,'USA')) as Date,
TO_DAYS(a.lastActivatedOn) as Days

from
activations as a,
((select licenseId from licenses
where TRUE
and (InstallType='trial' or InstallType='trialExtended')
and creator!='Website 10 Free'
and validUntil >= "2011-12-1"
-- and validFrom <= "2012-1-1"
) as l)

where TRUE
-- and getProductMajorVersion(a.productVersion) >= 7
and (a.productVersion like "7%" or  a.productVersion like "8%")
and a.licenseId = l.licenseId
and a.lastActivatedOn >= "2011-12-1"

group by Days, Version
order by Days desc, Version desc;


select
a.productVersion as Version,
count(a.lid) as Activation_Count,
DATE_FORMAT(a.lastActivatedOn, GET_FORMAT(DATE,'USA')) as Date,
TO_DAYS(a.lastActivatedOn) as Days

from
activations as a,
licenses as l


where TRUE
-- getProductMajorVersion(a.productVersion) >= 7
and (a.productVersion like "7%" or  a.productVersion like "8%")
and (l.InstallType='trial' or l.InstallType='trialExtended')
and l.creator!='Website 10 Free'
and l.validUntil >= "2011-12-1"
and a.lid = l.lidand a.lastActivatedOn >= "2011-12-1"


group by Days, Version
order by Days desc, Version desc;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值