messages
listlengths
3
3
system
stringclasses
1 value
user
stringlengths
326
8.38k
assistant
stringlengths
18
577
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"people\" (\n\"People_ID\" int,\n\"District\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "District" text, "Name" text, "Party" text, "Age" int, PRIMARY KEY ("People_ID") ) CREATE TABLE "debate" ( "Debate_ID" int, "Date" text, "Venue" text, "Num_of_Audience" int, PRIMARY KEY ("Debate_ID") ) CREATE TABLE "debate_people" ( "Debate_ID" int, "Affirm...
SELECT DISTINCT Venue FROM debate
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"people\" (\n\"People_ID\" int,\n\"District\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "District" text, "Name" text, "Party" text, "Age" int, PRIMARY KEY ("People_ID") ) CREATE TABLE "debate" ( "Debate_ID" int, "Date" text, "Venue" text, "Num_of_Audience" int, PRIMARY KEY ("Debate_ID") ) CREATE TABLE "debate_people" ( "Debate_ID" int, "Affirm...
SELECT T3.Name , T2.Date , T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"people\" (\n\"People_ID\" int,\n\"District\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "District" text, "Name" text, "Party" text, "Age" int, PRIMARY KEY ("People_ID") ) CREATE TABLE "debate" ( "Debate_ID" int, "Date" text, "Venue" text, "Num_of_Audience" int, PRIMARY KEY ("Debate_ID") ) CREATE TABLE "debate_people" ( "Debate_ID" int, "Affirm...
SELECT T3.Name , T2.Date , T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Negative = T3.People_ID ORDER BY T3.Name ASC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"people\" (\n\"People_ID\" int,\n\"District\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "District" text, "Name" text, "Party" text, "Age" int, PRIMARY KEY ("People_ID") ) CREATE TABLE "debate" ( "Debate_ID" int, "Date" text, "Venue" text, "Num_of_Audience" int, PRIMARY KEY ("Debate_ID") ) CREATE TABLE "debate_people" ( "Debate_ID" int, "Affirm...
SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID WHERE T2.Num_of_Audience > 200
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"people\" (\n\"People_ID\" int,\n\"District\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "District" text, "Name" text, "Party" text, "Age" int, PRIMARY KEY ("People_ID") ) CREATE TABLE "debate" ( "Debate_ID" int, "Date" text, "Venue" text, "Num_of_Audience" int, PRIMARY KEY ("Debate_ID") ) CREATE TABLE "debate_people" ( "Debate_ID" int, "Affirm...
SELECT T2.Name , COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"people\" (\n\"People_ID\" int,\n\"District\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "District" text, "Name" text, "Party" text, "Age" int, PRIMARY KEY ("People_ID") ) CREATE TABLE "debate" ( "Debate_ID" int, "Date" text, "Venue" text, "Num_of_Audience" int, PRIMARY KEY ("Debate_ID") ) CREATE TABLE "debate_people" ( "Debate_ID" int, "Affirm...
SELECT T2.Name FROM debate_people AS T1 JOIN people AS T2 ON T1.Negative = T2.People_ID GROUP BY T2.Name HAVING COUNT(*) >= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"people\" (\n\"People_ID\" int,\n\"District\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "District" text, "Name" text, "Party" text, "Age" int, PRIMARY KEY ("People_ID") ) CREATE TABLE "debate" ( "Debate_ID" int, "Date" text, "Venue" text, "Num_of_Audience" int, PRIMARY KEY ("Debate_ID") ) CREATE TABLE "debate_people" ( "Debate_ID" int, "Affirm...
SELECT Name FROM people WHERE People_id NOT IN (SELECT Affirmative FROM debate_people)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT customer_details FROM customers ORDER BY customer_details
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT customer_details FROM customers ORDER BY customer_details
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = "Dayana Robel"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = "Dayana Robel"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*) > 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*) > 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT sum(amount_piad) , avg(amount_piad) FROM claim_headers
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT sum(amount_piad) , avg(amount_piad) FROM claim_headers
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT sum(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2.claim_id WHERE t2.created_date = (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT sum(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2.claim_id WHERE t2.created_date = (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_claimed = (SELECT max(amount_claimed) FROM claim_headers)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_claimed = (SELECT max(amount_claimed) FROM claim_headers)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT min(amount_piad) FROM claim_headers)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT min(amount_piad) FROM claim_headers)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT count(*) FROM claims_processing_stages
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT count(*) FROM claims_processing_stages
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id = t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id = t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT customer_details FROM customers WHERE customer_details LIKE "%Diana%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT customer_details FROM customers WHERE customer_details LIKE "%Diana%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = "Deputy"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = "Deputy"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = "Deputy" OR t1.policy_type_code = "Uniform"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = "Deputy" OR t1.policy_type_code = "Uniform"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT customer_details FROM customers UNION SELECT staff_details FROM staff
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT customer_details FROM customers UNION SELECT staff_details FROM staff
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT policy_type_code , count(*) FROM policies GROUP BY policy_type_code
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT policy_type_code , count(*) FROM policies GROUP BY policy_type_code
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t2.customer_details ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t2.customer_details ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = "Open"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = "Open"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT count(DISTINCT claim_outcome_code) FROM claims_processing
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT count(DISTINCT claim_outcome_code) FROM claims_processing
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.start_date = (SELECT max(start_date) FROM policies)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Staff ( Staff_ID INTEGER NOT NULL, Staff_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Staff_ID) ) CREATE TABLE Policies ( Policy_ID INTEGER NOT NULL, Customer_ID I...
SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.start_date = (SELECT max(start_date) FROM policies)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(*) FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(*) FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(DISTINCT customer_id) FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(DISTINCT customer_id) FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT account_id , date_account_opened , account_name , other_account_details FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT account_id , date_account_opened , account_name , other_account_details FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T1.account_id , T1.date_account_opened , T1.account_name , T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T1.account_id , T1.date_account_opened , T1.account_name , T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T1.account_name , T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Meaghan" AND T2.customer_last_name = "Keeling"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T1.account_name , T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Meaghan" AND T2.customer_last_name = "Keeling"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "900"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "900"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT DISTINCT T1.customer_first_name , T1.customer_last_name , T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT DISTINCT T1.customer_first_name , T1.customer_last_name , T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(*) , customer_id FROM Accounts GROUP BY customer_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(*) , customer_id FROM Accounts GROUP BY customer_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name , count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name , count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T2.customer_first_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T2.customer_first_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(*) FROM Customers
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(*) FROM Customers
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT gender , count(*) FROM Customers GROUP BY gender
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT gender , count(*) FROM Customers GROUP BY gender
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(*) FROM Financial_transactions
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(*) FROM Financial_transactions
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(*) , account_id FROM Financial_transactions
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(*) , account_id FROM Financial_transactions
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = "337"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = "337"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT avg(transaction_amount) , min(transaction_amount) , max(transaction_amount) , sum(transaction_amount) FROM Financial_transactions
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT avg(transaction_amount) , min(transaction_amount) , max(transaction_amount) , sum(transaction_amount) FROM Financial_transactions
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT avg(transaction_amount) FROM Financial_transactions)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT avg(transaction_amount) FROM Financial_transactions)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT transaction_type , sum(transaction_amount) FROM Financial_transactions GROUP BY transaction_type
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT transaction_type , sum(transaction_amount) FROM Financial_transactions GROUP BY transaction_type
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T2.account_name , T1.account_id , count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T2.account_name , T1.account_id , count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T1.account_id , T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id HAVING count(*) >= 4
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT T1.account_id , T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id HAVING count(*) >= 4
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT DISTINCT product_size FROM Products
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT DISTINCT product_size FROM Products
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT DISTINCT product_color FROM Products
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT DISTINCT product_color FROM Products
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(50), `customer_middle_initial` VARCHAR(1), `customer_last_name` VARCHAR(50), `gender` VARCHAR(1), `email_address` VARCHAR(255), `login_name` VARCHAR(80), `login_password` VARCHAR(20), `phone_number` VARCHAR(2...
SELECT invoice_number , count(*) FROM Financial_transactions GROUP BY invoice_number