题目链接:点击打开链接
题目大意:略。
解题思路:略。
AC 代码
SELECT product_id, 'store1' store, store1 price FROM Products WHERE store1 IS NOT NULL UNION ALL SELECT product_id, 'store2' store, store2 price FROM Products WHERE store2 IS NOT NULL UNION ALL SELECT product_id, 'store3' store, store3 price FROM Products WHERE store3 IS NOT NULL