with t (gb,mon,val) as ( select '사과','1월',100 from dual union all select '딸기','1월',100 from dual union all select '사과','2월',100 from dual union all select '딸기','2월',100 from dual ) select gb,min(decode(mon,'1월',val)) "1월",min(decode(mon,'2월',val)) "2월" from t group by gb; --11g 이상 with t (gb,mon,val) as ( select '사과','1월',100 from dual union all select '딸기','1월',100 from dual union all select '사과','2월',100 from dual union all select '딸기','2월',100 from dual ) select * from t pivot (min(val) for mon in ('1월','2월'));