select 품목,nvl(min(decode(차번호,'AA',수량)),'-')AA
,nvl(min(decode(차번호,'BB',수량)),'-')BB
,nvl(min(decode(차번호,'CC',수량)),'-')CC
from(
select 'AA' 차번호,'1-1' 품목,'4' 수량 from dual union all
select 'AA' 차번호,'1-2' 품목,'3' 수량 from dual union all
select 'AA' 차번호,'1-3' 품목,'10' 수량 from dual union all
select 'AA' 차번호,'1-5' 품목,'8' 수량 from dual union all
select 'AA' 차번호,'1-9' 품목,'11' 수량 from dual union all
select 'AA' 차번호,'1-13' 품목,'90' 수량 from dual union all
select 'BB' 차번호,'1-2' 품목,'1' 수량 from dual union all
select 'BB' 차번호,'1-3' 품목,'4' 수량 from dual union all
select 'BB' 차번호,'1-4' 품목,'8' 수량 from dual union all
select 'BB' 차번호,'1-5' 품목,'20' 수량 from dual union all
select 'BB' 차번호,'1-9' 품목,'32' 수량 from dual union all
select 'BB' 차번호,'1-13' 품목,'65' 수량 from dual union all
select 'CC' 차번호,'1-3' 품목,'22' 수량 from dual union all
select 'CC' 차번호,'1-5' 품목,'88' 수량 from dual union all
select 'CC' 차번호,'1-13' 품목,'100' 수량 from dual)
group by 품목
order by to_number(replace(품목,'-'));
수고하십시요~