Find Longest Calls
[]
['Create table if Not Exists Contacts(id int, first_name varchar(20), last_name varchar(20))', "Create table if Not Exists Calls(contact_id int, type ENUM('incoming', 'outgoing'), duration int)", 'Truncate table Contacts', "insert into Contacts (id, first_name, last_name) values ('1', 'John', 'Doe')", "insert into Contacts (id, first_name, last_name) values ('2', 'Jane', 'Smith')", "insert into Contacts (id, first_name, last_name) values ('3', 'Alice', 'Johnson')", "insert into Contacts (id, first_name, last_name) values ('4', 'Michael', 'Brown')", "insert into Contacts (id, first_name, last_name) values ('5', 'Emily', 'Davis')", 'Truncate table Calls', "insert into Calls (contact_id, type, duration) values ('1', 'incoming', '120')", "insert into Calls (contact_id, type, duration) values ('1', 'outgoing', '180')", "insert into Calls (contact_id, type, duration) values ('2', 'incoming', '300')", "insert into Calls (contact_id, type, duration) values ('2', 'outgoing', '240')", "insert into Calls (contact_id, type, duration) values ('3', 'incoming', '150')", "insert into Calls (contact_id, type, duration) values ('3', 'outgoing', '360')", "insert into Calls (contact_id, type, duration) values ('4', 'incoming', '420')", "insert into Calls (contact_id, type, duration) values ('4', 'outgoing', '200')", "insert into Calls (contact_id, type, duration) values ('5', 'incoming', '180')", "insert into Calls (contact_id, type, duration) values ('5', 'outgoing', '280')"]
{"mysql": ["Create table if Not Exists Contacts(id int, first_name varchar(20), last_name varchar(20))", "Create table if Not Exists Calls(contact_id int, type ENUM('incoming', 'outgoing'), duration int)"], "mssql": ["Create table Contacts(id int, first_name varchar(20), last_name varchar(20))", "Create table Calls(contact_id int, type varchar(20) NOT NULL CHECK (type in ('incoming' , 'outgoing')), duration int)"], "oraclesql": ["Create table Contacts(id int, first_name varchar(20), last_name varchar(20))", "Create table Calls(contact_id int, type varchar(20) NOT NULL CHECK (type in ('incoming' , 'outgoing')), duration int)"], "database": true, "name": "find_longest_calls", "pythondata": ["Contacts = pd.DataFrame([], columns=['id', 'first_name', 'last_name']).astype({'id':'Int64', 'first_name':'object', 'last_name':'object'})\n", "Calls = pd.DataFrame([], columns=['contact_id', 'type', 'duration']).astype({'contact_id': 'Int64', 'type': 'category', 'duration': 'Int64'})\n"], "postgresql": ["CREATE TABLE Contacts (\n    id SERIAL PRIMARY KEY,\n    first_name VARCHAR(20),\n    last_name VARCHAR(20)\n);\n", "CREATE TABLE Calls (\n    contact_id INT,\n    type VARCHAR(20) NOT NULL CHECK (type IN ('incoming', 'outgoing')),\n    duration INT\n);\n"], "manual": true, "database_schema": {"Contacts": {"id": "INT", "first_name": "VARCHAR(20)", "last_name": "VARCHAR(20)"}, "Calls": {"contact_id": "INT", "type": "ENUM('incoming', 'outgoing')", "duration": "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']