SQL 문제 15 - Rearrange Products Table LeetCode 1795 Rearrange Products Table 풀이 -- ORACLE SELECT * FROM PRODUCTS UNPIVOT ( PRICE FOR STORE IN ( STORE1 AS 'store1', STORE2 AS 'store2', STORE3 AS 'store3') ); -- MYSQL SELECT T.* FROM ( SELECT PRODUCT_ID , 'store1' as store , STORE1 AS PRICE FROM PRODUCTS WHERE STORE1 IS NOT NULL UNION ALL SELECT PRODUCT_ID , 'store2' as store , STORE2 AS PRICE FROM PRODUCTS WHERE STORE2 IS NOT NULL UNION ALL SELECT PRODUCT_ID , 'store3' as store , STORE3 AS PRICE F...
#RearrangeProductsTable_LeetCode1795
#SQL
#SQL_LeetCode1795
#SQL_RearrangeProductsTable
#SQL_RearrangeProductsTable_LeetCode1795
원문링크 : SQL 문제 15 - Rearrange Products Table LeetCode 1795