
我想显示成下面这样的,只有一条数据

------解决方案--------------------
写个土方法
with tt as(
select 1 id,'c1' nn from dual
union
select 2,'c2' from dual
union
select 3,'c3' from dual
)
select sum(c1) c1,sum(c2) c2,sum(c3) c3
from
(select case nn when 'c1' then id else 0 end c1,
case nn when 'c2' then id else 0 end c2,
case nn when 'c3' then id else 0 end c3
from tt)
------解决方案--------------------
select pfkid,max(decode(wrlx,'烟尘',wrvalue)) '烟尘',max(decode(wrlx,'氮氧化物,wrvalue)) 氮氧化物,max(decode(wrlx,'烟气湿度',wrvalue)) 烟气湿度 from 表 group by pfkid