按照oralce分组,列转换成行
select dxbh 线路,sum(decode(yhfl,'低压非居民', 1,0)) 低压非居民,
sum(decode(yhfl,'低压居民', 1,0)) 低压居民,
sum(decode(yhfl,'高压', 1,0)) 高压
from s_tqkhxx
group by dxbh ;
按照oralce分组,列转换成行
select dxbh 线路,sum(decode(yhfl,'低压非居民', 1,0)) 低压非居民,
sum(decode(yhfl,'低压居民', 1,0)) 低压居民,
sum(decode(yhfl,'高压', 1,0)) 高压
from s_tqkhxx
group by dxbh ;