WITH T AS ( SELECT 'A' ITM , '1' NO , '보통' ATT , 1 QTY FROM DUAL UNION ALL SELECT 'A' ITM , '1' NO , '약하게' ATT , 2 QTY FROM DUAL UNION ALL SELECT 'A' ITM , '1' NO , '세게' ATT ,31 QTY FROM DUAL UNION ALL SELECT 'B' ITM , '2' NO , '세게' ATT ,41 QTY FROM DUAL ) SELECT ITM , NO , MAX(CASE WHEN ATT = '보통' THEN QTY END) "보통" , MAX(CASE WHEN ATT = '약하게' THEN QTY END) "약하게" , MAX(CASE WHEN ATT = '세게' THEN QTY END) "세게" FROM T GROUP BY ITM , NO