17,377
社区成员
发帖
与我相关
我的任务
分享
select file_name,
max(decode(col,'2010/04/12 EQP',count,0) as col1_1),
max(decode(col,'2010/04/12 CHP',count,0) as col1_2),
max(decode(col,'2010/04/13 EQP',count,0) as col2_1),
max(decode(col,'2010/04/13 CHP',count,0) as col2_2)
from (
select file_name,count,to_char(trns_date,'yyyy/mm/dd')||trim(data_type) as col
from tab
)
GROUP BY file_name