我举个例子:create table aa(
a number,
b number)insert into aaselect 1,2 from dualunion select 2,3 from dualunion select 3,4 from dualselect * from aa;selectsum(case b
when 2 then 1 else 0 end) c,
sum(case b
when 3 then 2 else 0 end) d,
sum(case b
when 4 then 3 else 0 end) e
...