User Purchase Platform
[]
["Create table If Not Exists Spending (user_id int, spend_date date, platform ENUM('desktop', 'mobile'), amount int)", 'Truncate table Spending', "insert into Spending (user_id, spend_date, platform, amount) values ('1', '2019-07-01', 'mobile', '100')", "insert into Spending (user_id, spend_date, platform, amount) values ('1', '2019-07-01', 'desktop', '100')", "insert into Spending (user_id, spend_date, platform, amount) values ('2', '2019-07-01', 'mobile', '100')", "insert into Spending (user_id, spend_date, platform, amount) values ('2', '2019-07-02', 'mobile', '100')", "insert into Spending (user_id, spend_date, platform, amount) values ('3', '2019-07-01', 'desktop', '100')", "insert into Spending (user_id, spend_date, platform, amount) values ('3', '2019-07-02', 'desktop', '100')"]
{"mysql": ["Create table If Not Exists Spending (user_id int, spend_date date, platform ENUM('desktop', 'mobile'), amount int)"], "mssql": ["create table Spending (user_id int, spend_date date, platform VARCHAR(10) NOT NULL CHECK (platform IN ('desktop', 'mobile')), amount int)"], "oraclesql": ["create table Spending (user_id int, spend_date date, platform VARCHAR(10) NOT NULL CHECK (platform IN ('desktop', 'mobile')), amount int)", "ALTER SESSION SET nls_date_format='YYYY-MM-DD'"], "database": true, "name": "user_purchase", "pythondata": ["Spending = pd.DataFrame([], columns=['user_id', 'spend_date', 'platform', 'amount']).astype({'user_id':'Int64', 'spend_date':'datetime64[ns]', 'platform':'object', 'amount':'Int64'})\n"], "postgresql": ["Create table If Not Exists Spending (user_id int, spend_date date, platform VARCHAR(10) CHECK (platform IN ('desktop', 'mobile')), amount int)\n"], "database_schema": {"Spending": {"user_id": "INT", "spend_date": "DATE", "platform": "ENUM('desktop', 'mobile')", "amount": "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']