Product's Price for Each Store
['rearrange-products-table', 'dynamic-pivoting-of-a-table']
["Create table If Not Exists Products (product_id int, store ENUM('store1', 'store2', 'store3'), price int)", 'Truncate table Products', "insert into Products (product_id, store, price) values ('0', 'store1', '95')", "insert into Products (product_id, store, price) values ('0', 'store3', '105')", "insert into Products (product_id, store, price) values ('0', 'store2', '100')", "insert into Products (product_id, store, price) values ('1', 'store1', '70')", "insert into Products (product_id, store, price) values ('1', 'store3', '80')"]
{"mysql": ["Create table If Not Exists Products (product_id int, store ENUM('store1', 'store2', 'store3'), price int)"], "mssql": ["Create table Products (product_id int, store varchar(6) not null check(store in ('store1', 'store2', 'store3')), price int)"], "oraclesql": ["Create table Products (product_id int, store varchar(6) not null check(store in ('store1', 'store2', 'store3')), price int)"], "database": true, "name": "products_price", "pythondata": ["Products = pd.DataFrame([], columns=['product_id', 'store', 'price']).astype({'product_id':'Int64', 'store':'category', 'price':'Int64'})"], "postgresql": ["Create table If Not Exists Products (product_id int, store VARCHAR(30) CHECK (store IN ('store1', 'store2', 'store3')), price int)\n"], "manual": false, "database_schema": {"Products": {"product_id": "INT", "store": "ENUM('store1', 'store2', 'store3')", "price": "INT"}}}
{"mysql": ["MySQL", "<p><code>MySQL 8.0</code>.</p>"], "mssql": ["MS SQL Server", "<p><code>mssql server 2019</code>.</p>"], "oraclesql": ["Oracle", "<p><code>Oracle Sql 11.2</code>.</p>"], "pythondata": ["Pandas", "<p>Python 3.10 with Pandas 2.2.2 and NumPy 1.26.4</p>"], "postgresql": ["PostgreSQL", "<p>PostgreSQL 16</p>"]}
['Database']