453ms solution using cross join lateral
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\nCROSS JOIN LATERAL\n Describe your approach to solving the problem. \n\n#
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\nCROSS JOIN LATERAL\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nselect p.product_id, x.store, x.price\nfrom Products p\ncross join lateral (\n    select store1, \'store1\' \n    union all select store2, \'store2\'\n    union all select store3, \'store3\'\n) as x(price, store)\nwhere price <> \'0\'\norder by product_id ASC\n```
['MySQL']