Number of Trusted Contacts of a Customer
[]
['Create table If Not Exists Customers (customer_id int, customer_name varchar(20), email varchar(30))', 'Create table If Not Exists Contacts (user_id int, contact_name varchar(20), contact_email varchar(30))', 'Create table If Not Exists Invoices (invoice_id int, price int, user_id int)', 'Truncate table Customers', "insert into Customers (customer_id, customer_name, email) values ('1', 'Alice', 'alice@leetcode.com')", "insert into Customers (customer_id, customer_name, email) values ('2', 'Bob', 'bob@leetcode.com')", "insert into Customers (customer_id, customer_name, email) values ('13', 'John', 'john@leetcode.com')", "insert into Customers (customer_id, customer_name, email) values ('6', 'Alex', 'alex@leetcode.com')", 'Truncate table Contacts', "insert into Contacts (user_id, contact_name, contact_email) values ('1', 'Bob', 'bob@leetcode.com')", "insert into Contacts (user_id, contact_name, contact_email) values ('1', 'John', 'john@leetcode.com')", "insert into Contacts (user_id, contact_name, contact_email) values ('1', 'Jal', 'jal@leetcode.com')", "insert into Contacts (user_id, contact_name, contact_email) values ('2', 'Omar', 'omar@leetcode.com')", "insert into Contacts (user_id, contact_name, contact_email) values ('2', 'Meir', 'meir@leetcode.com')", "insert into Contacts (user_id, contact_name, contact_email) values ('6', 'Alice', 'alice@leetcode.com')", 'Truncate table Invoices', "insert into Invoices (invoice_id, price, user_id) values ('77', '100', '1')", "insert into Invoices (invoice_id, price, user_id) values ('88', '200', '1')", "insert into Invoices (invoice_id, price, user_id) values ('99', '300', '2')", "insert into Invoices (invoice_id, price, user_id) values ('66', '400', '2')", "insert into Invoices (invoice_id, price, user_id) values ('55', '500', '13')", "insert into Invoices (invoice_id, price, user_id) values ('44', '60', '6')"]
{"mysql": ["Create table If Not Exists Customers (customer_id int, customer_name varchar(20), email varchar(30))", "Create table If Not Exists Contacts (user_id int, contact_name varchar(20), contact_email varchar(30))", "Create table If Not Exists Invoices (invoice_id int, price int, user_id int)"], "mssql": ["Create table Customers (customer_id int, customer_name varchar(20), email varchar(30))", "Create table Contacts (user_id int, contact_name varchar(20), contact_email varchar(30))", "Create table Invoices (invoice_id int, price int, user_id int)"], "oraclesql": ["Create table Customers (customer_id int, customer_name varchar(20), email varchar(30))", "Create table Contacts (user_id int, contact_name varchar(20), contact_email varchar(30))", "Create table Invoices (invoice_id int, price int, user_id int)"], "database": true, "name": "count_trusted_contacts", "pythondata": ["Customers = pd.DataFrame([], columns=['customer_id', 'customer_name', 'email']).astype({'customer_id':'Int64', 'customer_name':'object', 'email':'object'})", "Contacts = pd.DataFrame([], columns=['user_id', 'contact_name', 'contact_email']).astype({'user_id':'Int64', 'contact_name':'object', 'contact_email':'object'})", "Invoices = pd.DataFrame([], columns=['invoice_id', 'price', 'user_id']).astype({'invoice_id':'Int64', 'price':'Int64', 'user_id':'Int64'})"], "postgresql": ["\nCreate table If Not Exists Customers (customer_id int, customer_name varchar(20), email varchar(30))", "Create table If Not Exists Contacts (user_id int, contact_name varchar(20), contact_email varchar(30))", "Create table If Not Exists Invoices (invoice_id int, price int, user_id int)"], "database_schema": {"Customers": {"customer_id": "INT", "customer_name": "VARCHAR(20)", "email": "VARCHAR(30)"}, "Contacts": {"user_id": "INT", "contact_name": "VARCHAR(20)", "contact_email": "VARCHAR(30)"}, "Invoices": {"invoice_id": "INT", "price": "INT", "user_id": "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']