우선 http://www.gurubee.net/lecture/1028 이부분을 읽어보시고 구글에 sql 행열 바꾸기 검색하셔서 방법들을 이해하시면 좋을 것 같습니다.
방법은 많네요
select gubun, SUM(DECODE(ym, '201901', tm)) "201901", SUM(DECODE(ym, '201902', tm)) "201902", SUM(DECODE(ym, '201903', tm)) "201903" from t group by gubun;
select gubun, SUM(case when YM='201901' then tm end) AS "201901", SUM(case when YM='201902' then tm end) AS "201902", SUM(case when YM='201903' then tm end) AS "201903" from t group by gubun;
select * from t pivot (SUM(TM) FOR YM IN ('201901', '201902', '201903'));