oracle中decode和case的使用例子
select sum(case when count_01 10 and count_01 20 and count_01 50 and count_01 100 and count_01 200 and count_01 500 and count_01 1000 then 1 else 0 end) as g1000from (select ssn,sum(t.changepoints + t.fpoints) count_01
from pay_detail_new_200701 t
where serviceip not in ('charge','ptransfer')
group by t.ssn);
页:
[1]