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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT Description FROM aircraft
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT avg(International_Passengers) FROM airport
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT avg(International_Passengers) FROM airport
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT International_Passengers , Domestic_Passengers FROM airport WHERE Airport_Name = "London Heathrow"
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT International_Passengers , Domestic_Passengers FROM airport WHERE Airport_Name = "London Heathrow"
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT max(Transit_Passengers) , min(Transit_Passengers) FROM airport
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT max(Transit_Passengers) , min(Transit_Passengers) FROM airport
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT Name FROM pilot WHERE Age >= 25
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT Name FROM pilot WHERE Age >= 25
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT Name FROM pilot ORDER BY 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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT Name FROM pilot ORDER BY 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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick"
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick"
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = "Robinson R-22"
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = "Robinson R-22"
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT T2.Location , T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT T2.Location , T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft 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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft 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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT T1.Aircraft , COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT T1.Aircraft , COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT Name FROM pilot ORDER BY Age DESC
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT Name FROM pilot ORDER BY Age DESC
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft 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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft 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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH)
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH)
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Heathrow" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN...
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Heathrow" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN...
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT * FROM airport ORDER BY International_Passengers 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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT * FROM airport ORDER BY International_Passengers 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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot 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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot 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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age 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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age 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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')
[ { "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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
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 `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')
[ { "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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT T1.property_id , count(*) FROM properties AS T1 JOIN residents AS T2 ON T1.property_id = T2.property_id GROUP BY T1.property_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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id = T2.organization_id WHERE T2.organization_details = 'Denesik and Sons Party'
[ { "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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT T1.resident_id , T1.other_details , count(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY count(*) DESC
[ { "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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT T1.service_id , T1.service_details , count(*) FROM Services AS T1 JOIN Residents_Services AS T2 ON T1.service_id = T2.service_id GROUP BY T1.service_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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT T1.thing_id , T1.type_of_Thing_Code , T2.organization_details FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 3
[ { "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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT T2.date_moved_in , T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events 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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT T1.Customer_Event_ID , T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING count(*) BETWEEN 1 AND 3
[ { "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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT DISTINCT T2.thing_id , T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.Status_of_Thing_Code = 'Close' OR T1.Date_and_Date < '2017-06-19 02:59:21'
[ { "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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT count(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied'
[ { "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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT count(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things
[ { "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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations
[ { "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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT max(date_moved_in) FROM Residents
[ { "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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'
[ { "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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT customer_event_id , date_moved_in , property_id FROM customer_events
[ { "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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT count(*) FROM customers WHERE customer_id NOT IN ( SELECT customer_id FROM customer_events )
[ { "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), PRIMARY KEY (customer_id) ) CREATE TABLE Properties ( property_id INTEGER NOT NULL, property_type_code CHAR(15) NOT NULL, property_address VARCHAR(255), other_details VARCHAR(255), PRIMARY KEY (property_id) ) CRE...
SELECT DISTINCT date_moved_in FROM residents
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT count(*) FROM school
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT count(*) FROM school
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT LOCATION FROM school ORDER BY Enrollment 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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT LOCATION FROM school ORDER BY Enrollment 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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT LOCATION FROM school ORDER BY Founded DESC
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT LOCATION FROM school ORDER BY Founded DESC
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Enrollment FROM school WHERE Denomination != "Catholic"
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Enrollment FROM school WHERE Denomination != "Catholic"
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT avg(Enrollment) FROM school
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT avg(Enrollment) FROM school
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Team FROM player ORDER BY Team 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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Team FROM player ORDER BY Team 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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT count(DISTINCT POSITION) FROM player
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT count(DISTINCT POSITION) FROM player
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Team FROM player ORDER BY Age 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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Team FROM player ORDER BY Age 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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Team FROM player ORDER BY Age DESC LIMIT 5
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Team FROM player ORDER BY Age DESC LIMIT 5
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT T1.Location , T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT T1.Location , T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT School_Colors FROM school ORDER BY Enrollment 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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT School_Colors FROM school ORDER BY Enrollment 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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900
[ { "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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Nickname FROM school_details WHERE Division != "Division 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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Nickname FROM school_details WHERE Division != "Division 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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 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 \"school\" (\n\"School_ID\" int,\n\"School\" tex...
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 "school" ( "School_ID" int, "School" text, "Location" text, "Enrollment" real, "Founded" real, "Denomination" text, "Boys_or_Girls" text, "Day_or_Boarding" text, "Year_Entered_Competition" real, "School_Colors" text, PRIMARY KEY ("School_Id") ) CREATE TABLE "school_details" ( "School_I...
SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1