select status,count(*) from t where status in (50,40,30) group by status;
select status,count(*) from t where status in (50,40,30) group by status;
select sum(decode(status,30,1,0)) count1,sum(decode(status,40,1,0)) count2, sum(decode(status,50,1,0)) count3 from table
select status, sum(quantity) from tablename where status in (50,40,30) group by status;
select sum(c) status,c from table1 where c in(50,30,40) group by c;
select status, sum(quantity) from tablename where status in (50,40,30) group by status;这句对 或者用苯办法 select sum(quantity) from tablename where status='50' or status='40' or status='30';
select sum(1) as bb into #c from table where status in (1200,2000,6000) group by statusselect sum(bb) from #cdrop table #c
select sum(1) as bb into #c from table where status in (50,30,40) group by statusselect sum(bb) from #cdrop table #c
select status,count(status) from table where status in (50,40,30) group by status
liang521_1985() ( ) : select sum(1) as bb into #c from table where status in (50,30,40) group by statusselect sum(bb) from #cdrop table #c ============================================ 这是oracle的语法??
sum(decode(status,50,1,0)) count3
from table
sum(quantity)
from tablename
where status in (50,40,30)
group by status;
sum(quantity)
from tablename
where status in (50,40,30)
group by status;这句对 或者用苯办法
select
sum(quantity)
from tablename
where status='50' or status='40' or status='30';
from table
where status in (1200,2000,6000)
group by statusselect sum(bb) from #cdrop table #c
from table
where status in (50,30,40)
group by statusselect sum(bb) from #cdrop table #c
select sum(1) as bb into #c
from table
where status in (50,30,40)
group by statusselect sum(bb) from #cdrop table #c
============================================
这是oracle的语法??