3 回答

TA貢獻(xiàn)1825條經(jīng)驗(yàn) 獲得超6個(gè)贊
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貢獻(xiàn)1804條經(jīng)驗(yàn) 獲得超7個(gè)贊
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貢獻(xiàn)1803條經(jīng)驗(yàn) 獲得超3個(gè)贊
SELECT? *
FROM??? ( SELECT??? COUNT(*)?新
????????? FROM????? StatisticsInfon
????????? WHERE?????xxxx
??????? ) a ,
??????? ( SELECT??? COUNT(*)?舊
????????? FROM??????StatisticsInfon
????????? WHERE?????xxxxxx
??????? ) b
- 3 回答
- 0 關(guān)注
- 921 瀏覽
添加回答
舉報(bào)