Customer Order Frequency
[]
['Create table If Not Exists Customers (customer_id int, name varchar(30), country varchar(30))', 'Create table If Not Exists Product (product_id int, description varchar(30), price int)\n', 'Create table If Not Exists Orders (order_id int, customer_id int, product_id int, order_date date, quantity int)\n', 'Truncate table Customers', "insert into Customers (customer_id, name, country) values ('1', 'Winston', 'USA')", "insert into Customers (customer_id, name, country) values ('2', 'Jonathan', 'Peru')", "insert into Customers (customer_id, name, country) values ('3', 'Moustafa', 'Egypt')", 'Truncate table Product', "insert into Product (product_id, description, price) values ('10', 'LC Phone', '300')", "insert into Product (product_id, description, price) values ('20', 'LC T-Shirt', '10')", "insert into Product (product_id, description, price) values ('30', 'LC Book', '45')", "insert into Product (product_id, description, price) values ('40', 'LC Keychain', '2')", 'Truncate table Orders', "insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('1', '1', '10', '2020-06-10', '1')", "insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('2', '1', '20', '2020-07-01', '1')", "insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('3', '1', '30', '2020-07-08', '2')", "insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('4', '2', '10', '2020-06-15', '2')", "insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('5', '2', '40', '2020-07-01', '10')", "insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('6', '3', '20', '2020-06-24', '2')", "insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('7', '3', '30', '2020-06-25', '2')", "insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('9', '3', '30', '2020-05-08', '3')"]
{"mysql": ["Create table If Not Exists Customers (customer_id int, name varchar(30), country varchar(30))", "Create table If Not Exists Product (product_id int, description varchar(30), price int)\n", "Create table If Not Exists Orders (order_id int, customer_id int, product_id int, order_date date, quantity int)\n"], "mssql": ["Create table Customers (customer_id int, name varchar(30), country varchar(30))\n", "Create table Product (product_id int, description varchar(30), price int)", "Create table Orders (order_id int, customer_id int, product_id int, order_date date, quantity int)"], "oraclesql": ["Create table Customers (customer_id int, name varchar(30), country varchar(30))", "Create table Product (product_id int, description varchar(30), price int)", "Create table Orders (order_id int, customer_id int, product_id int, order_date date, quantity int)", "ALTER SESSION SET nls_date_format='YYYY-MM-DD'"], "database": true, "name": "customer_order_frequency", "pythondata": ["Customers = pd.DataFrame([], columns=['customer_id', 'name', 'country']).astype({'customer_id':'Int64', 'name':'object', 'country':'object'})", "Product = pd.DataFrame([], columns=['product_id', 'description', 'price']).astype({'product_id':'Int64', 'description':'object', 'price':'Int64'})", "Orders = pd.DataFrame([], columns=['order_id', 'customer_id', 'product_id', 'order_date', 'quantity']).astype({'order_id':'Int64', 'customer_id':'Int64', 'product_id':'Int64', 'order_date':'datetime64[ns]', 'quantity':'Int64'})"], "postgresql": ["\nCreate table If Not Exists Customers (customer_id int, name varchar(30), country varchar(30))\n", "Create table If Not Exists Product (product_id int, description varchar(30), price int)\n", "Create table If Not Exists Orders (order_id int, customer_id int, product_id int, order_date date, quantity int)"], "database_schema": {"Customers": {"customer_id": "INT", "name": "VARCHAR(30)", "country": "VARCHAR(30)"}, "Product": {"product_id": "INT", "description": "VARCHAR(30)", "price": "INT"}, "Orders": {"order_id": "INT", "customer_id": "INT", "product_id": "INT", "order_date": "DATE", "quantity": "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']