怎么发了两遍?我只会写SQL SERVER的,不知道能不能在ORACLE中用:
select fieldA,fieldC
from 
(
 (select fieldA as fclass,0 as fflag,fieldA as fitem,sum(FieldC) as fqty
   from tablename
   group by fieldA)
 union
 (select fieldA as fclass,1 as fflag,fieldB as fitem,fieldC as fqty
   from tablename)
) t1
order by fclass,fflag,fitem