Calculate Product Final Price
[]
['Create table if not exists Products (product_id int, category varchar(50), price int)', 'Create table if not exists Discounts(category varchar(50), discount int)', 'Truncate table Products', "insert into Products (product_id, category, price) values ('1', 'Electronics', '1000')", "insert into Products (product_id, category, price) values ('2', 'Clothing', '50')", "insert into Products (product_id, category, price) values ('3', 'Electronics', '1200')", "insert into Products (product_id, category, price) values ('4', 'Home', '500')", 'Truncate table Discounts', "insert into Discounts (category, discount) values ('Electronics', '10')", "insert into Discounts (category, discount) values ('Clothing', '20')"]
{"mysql": ["Create table if not exists Products (product_id int, category varchar(50), price int)", "Create table if not exists Discounts(category varchar(50), discount int)"], "mssql": ["Create table Products (product_id int, category varchar(50), price int)", "Create table Discounts(category varchar(50), discount int)"], "oraclesql": ["Create table Products (product_id Number, category varchar2(50), price Number)", "Create table Discounts(category varchar2(50), discount Number)"], "database": true, "name": "calculate_final_prices", "postgresql": ["CREATE TABLE IF NOT EXISTS Products (\n    product_id INT,\n    category VARCHAR(50),\n    price INT\n);\n", "CREATE TABLE IF NOT EXISTS Discounts (\n    category VARCHAR(50),\n    discount INT\n);\n"], "pythondata": ["Products = pd.DataFrame(columns=['product_id', 'category', 'price'], dtype=int)\n", "Discounts = pd.DataFrame({'category': pd.Series(dtype='str'), 'discount': pd.Series(dtype='int')})\n"], "database_schema": {"Products": {"product_id": "INT", "category": "VARCHAR(50)", "price": "INT"}, "Discounts": {"category": "VARCHAR(50)", "discount": "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']