MySQL UNION SELECT - Easier to understand
\nSELECT\n    view.product_id,\n    view.store,\n    view.price\nFROM (\n    SELECT product_id, \'store1\' AS store, store1 AS price FROM Products\n    UNION AL
```\nSELECT\n    view.product_id,\n    view.store,\n    view.price\nFROM (\n    SELECT product_id, \'store1\' AS store, store1 AS price FROM Products\n    UNION ALL\n    SELECT product_id, \'store2\' AS store, store2 AS price FROM Products\n    UNION ALL\n    SELECT product_id, \'store3\' AS store, store3 AS price FROM Products\n) AS view\nWHERE view.price IS NOT NULL;\n```\n\nGood reference: https://stackoverflow.com/questions/13944417/mysql-convert-column-to-row-pivot-table
[]