3 回答
TA贡献1825条经验 获得超6个赞
select sum(case when addtime between '2012-11-13 00:00:00' and '2012-11-13 23:59:59' then 1 else 0 end) as 旧,sum(case when addtime between '2012-11-14 00:00:00' and '2012-11-14 23:59:59' then 1 else 0 end) as 新
from StatisticsInfon
TA贡献1804条经验 获得超7个赞
select count(Azcount) as 新, (
select count(Azcount) as 旧 from StatisticsInfon
where addtime between '2012-11-13 00:00:00' and '2012-11-13 23:59:59'
)from StatisticsInfon
where addtime between '2012-11-14 00:00:00' and '2012-11-14 23:59:59'
TA贡献1803条经验 获得超3个赞
SELECT *
FROM ( SELECT COUNT(*) 新
FROM StatisticsInfon
WHERE xxxx
) a ,
( SELECT COUNT(*) 旧
FROM StatisticsInfon
WHERE xxxxxx
) b
- 3 回答
- 0 关注
- 854 浏览
添加回答
举报