We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b947456 commit a9b1314Copy full SHA for a9b1314
1795-rearrange-products-table.sql
@@ -0,0 +1,8 @@
1
+# Write your MySQL query statement below
2
+SELECT product_id, 'store1' AS store, store1 AS price FROM Products WHERE store1 IS NOT NULL
3
+UNION
4
+SELECT product_id, 'store2' AS store, store2 AS price FROM Products WHERE store2 IS NOT NULL
5
6
+SELECT product_id, 'store3' AS store, store3 AS price FROM Products WHERE store3 IS NOT NULL
7
+
8
+ORDER BY 1,2 ASC;
0 commit comments