Loading problem...
A retail pricing pipeline stores one product per row and tracks prices across three storefront channels.
Table: products
Task: Reshape this wide table into row-level price records so each output row describes one available listing: (product_id, store, price).
Output requirements:
Supported submission environments:
products:
| product_id | store1 | store2 | store3 |
|------------|--------|--------|--------|
| 0 | 95 | 100 | 105 |
| 1 | 70 | null | 80 |[
{"product_id":0,"store":"store1","price":95},
{"product_id":0,"store":"store2","price":100},
{"product_id":0,"store":"store3","price":105},
{"product_id":1,"store":"store1","price":70},
{"product_id":1,"store":"store3","price":80}
]Product 0 is available in all stores. Product 1 is unavailable in store2, so that row is omitted.
products:
| product_id | store1 | store2 | store3 |
|------------|--------|--------|--------|
| 9 | null | 22 | null |
| 2 | 15 | 18 | null |[
{"product_id":2,"store":"store1","price":15},
{"product_id":2,"store":"store2","price":18},
{"product_id":9,"store":"store2","price":22}
]Only non-null store prices are kept, and rows are sorted by product_id then store.
products:
| product_id | store1 | store2 | store3 |
|------------|--------|--------|--------|
| 10 | null | null | null |
| 11 | null | null | null |[]No product has availability in any store, so the output is empty.
Constraints