Oracle的一个行-列转换和合并表的问题,请教高手
发布网友
发布时间:2022-04-13 23:06
我来回答
共1个回答
热心网友
时间:2022-04-14 00:35
select 'a','b','c','d',...... 'z' from al
union
select
(select count(1) from table_a where event='a'),
(select count(1) from table_a where event='b'),
(select count(1) from table_a where event='c'),
(select count(1) from table_a where event='d'),
...............
(select count(1) from table_a where event='z')
from al;