Dynamic Pivoting of a Table
['products-price-for-each-store']
['Create table If Not Exists Products (product_id int, store varchar(7), price int)', 'Truncate table Products', "insert into Products (product_id, store, price) values ('1', 'Shop', '110')", "insert into Products (product_id, store, price) values ('1', 'LC_Store', '100')", "insert into Products (product_id, store, price) values ('2', 'Nozama', '200')", "insert into Products (product_id, store, price) values ('2', 'Souq', '190')", "insert into Products (product_id, store, price) values ('3', 'Shop', '1000')", "insert into Products (product_id, store, price) values ('3', 'Souq', '1900')"]
{"mysql": ["Create table If Not Exists Products (product_id int, store varchar(7), price int)"], "mssql": ["Create table Products (product_id int, store varchar(7), price int)"], "oraclesql": ["Create table Products (product_id int, store varchar(7), price int)"], "database": true, "manual": true, "name": "dynamic_pivoting_table", "pythondata": ["Products = pd.DataFrame([], columns=['product_id', 'store', 'price']).astype({'product_id':'Int64', 'store':'object', 'price':'Int64'})"], "database_schema": {"Products": {"product_id": "INT", "store": "VARCHAR(7)", "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']