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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT Name FROM ship ORDER BY Tonnage 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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT Name FROM ship ORDER BY Tonnage 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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT TYPE , Nationality FROM ship
[ { "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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT TYPE , Nationality FROM ship
[ { "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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT Name FROM ship WHERE Nationality != "United States"
[ { "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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT Name FROM ship WHERE Nationality != "United States"
[ { "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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT Name FROM ship WHERE Nationality = "United States" OR Nationality = "United Kingdom"
[ { "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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT Name FROM ship WHERE Nationality = "United States" OR Nationality = "United Kingdom"
[ { "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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT Name FROM ship ORDER BY Tonnage 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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT Name FROM ship ORDER BY Tonnage 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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT TYPE , COUNT(*) FROM ship GROUP BY 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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT TYPE , COUNT(*) FROM ship GROUP BY 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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT TYPE FROM ship GROUP BY TYPE 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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT TYPE FROM ship GROUP BY TYPE 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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT Nationality FROM ship GROUP BY Nationality 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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT Nationality FROM ship GROUP BY Nationality 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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT TYPE , avg(Tonnage) FROM ship GROUP BY 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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT TYPE , avg(Tonnage) FROM ship GROUP BY 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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT T1.Code , T1.Fate , T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT T1.Code , T1.Fate , T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928
[ { "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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928
[ { "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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = "United States"
[ { "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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = "United States"
[ { "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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission)
[ { "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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission)
[ { "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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000
[ { "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 \"mission\" (\n\"Mission_ID\" int,\n\"Ship_ID\" ...
You 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 "mission" ( "Mission_ID" int, "Ship_ID" int, "Code" text, "Launched_Year" int, "Location" text, "Speed_knots" int, "Fate" text, PRIMARY KEY ("Mission_ID"), FOREIGN KEY ("Ship_ID") REFERENCES `ship`("Ship_ID") ) CREATE TABLE "ship" ( "Ship_ID" int, "Name" text, "Type" text, "Nationality...
SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the number of stu...
SELECT count(*) FROM list
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question How many students are ...
SELECT count(*) FROM list
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the last names of...
SELECT lastname FROM list WHERE classroom = 111
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question What are the last name...
SELECT lastname FROM list WHERE classroom = 111
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the first names o...
SELECT firstname FROM list WHERE classroom = 108
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question What are the first nam...
SELECT firstname FROM list WHERE classroom = 108
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question What are the first nam...
SELECT DISTINCT firstname FROM list WHERE classroom = 107
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question List the first names o...
SELECT DISTINCT firstname FROM list WHERE classroom = 107
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question For each classroom rep...
SELECT DISTINCT classroom , grade FROM list
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question What are the grade num...
SELECT DISTINCT classroom , grade FROM list
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Which grade is studyin...
SELECT DISTINCT grade FROM list WHERE classroom = 103
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the grade taught ...
SELECT DISTINCT grade FROM list WHERE classroom = 103
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the grade studyin...
SELECT DISTINCT grade FROM list WHERE classroom = 105
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Which grade is studyin...
SELECT DISTINCT grade FROM list WHERE classroom = 105
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Which classrooms are u...
SELECT DISTINCT classroom FROM list WHERE grade = 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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the classrooms in...
SELECT DISTINCT classroom FROM list WHERE grade = 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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Which classrooms are u...
SELECT DISTINCT classroom FROM list WHERE grade = 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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Show me the classrooms...
SELECT DISTINCT classroom FROM list WHERE grade = 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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the last names of...
SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question what are the last name...
SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the first names o...
SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question What are the first nam...
SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the first names o...
SELECT firstname FROM teachers WHERE classroom = 110
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Which teachers teach i...
SELECT firstname FROM teachers WHERE classroom = 110
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the last names of...
SELECT lastname FROM teachers WHERE classroom = 109
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Which teachers teach i...
SELECT lastname FROM teachers WHERE classroom = 109
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Report the first name ...
SELECT DISTINCT firstname , lastname FROM teachers
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question What are the first nam...
SELECT DISTINCT firstname , lastname FROM teachers
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Report the first name ...
SELECT DISTINCT firstname , lastname FROM list
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Show each student's fi...
SELECT DISTINCT firstname , lastname FROM list
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find all students taug...
SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "OTHA" AND T2.lastname = "MOYER"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Which students study u...
SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "OTHA" AND T2.lastname = "MOYER"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find all students taug...
SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "MARROTTE" AND T2.lastname = "KIRK"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Which are the first an...
SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "MARROTTE" AND T2.lastname = "KIRK"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the first and las...
SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "EVELINA" AND T1.lastname = "BROMLEY"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Which teachers teach t...
SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "EVELINA" AND T1.lastname = "BROMLEY"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the last names of...
SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "GELL" AND T1.lastname = "TAMI"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question What are the last name...
SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "GELL" AND T1.lastname = "TAMI"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question How many students does...
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "LORIA" AND T2.lastname = "ONDERSMA"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Count the number of st...
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "LORIA" AND T2.lastname = "ONDERSMA"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question How many students does...
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "KAWA" AND T2.lastname = "GORDON"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the number of stu...
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "KAWA" AND T2.lastname = "GORDON"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the number of stu...
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "TARRING" AND T2.lastname = "LEIA"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question How many students are ...
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "TARRING" AND T2.lastname = "LEIA"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question How many teachers does...
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "CHRISSY" AND T1.lastname = "NABOZNY"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the number of tea...
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "CHRISSY" AND T1.lastname = "NABOZNY"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question How many teachers does...
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "MADLOCK" AND T1.lastname = "RAY"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the number of tea...
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "MADLOCK" AND T1.lastname = "RAY"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find all first-grade s...
SELECT DISTINCT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "OTHA" AND T2.lastname = "MOYER"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question What are the first and...
SELECT DISTINCT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "OTHA" AND T2.lastname = "MOYER"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the last names of...
SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname != "COVIN" AND T2.lastname != "JEROME"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Which students in thir...
SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname != "COVIN" AND T2.lastname != "JEROME"
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question For each grade, report...
SELECT grade , count(DISTINCT classroom) , count(*) FROM list GROUP BY grade
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question For each grade, return...
SELECT grade , count(DISTINCT classroom) , count(*) FROM list GROUP BY grade
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question For each classroom, re...
SELECT classroom , count(DISTINCT grade) FROM list GROUP BY classroom
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question For each classroom, sh...
SELECT classroom , count(DISTINCT grade) FROM list GROUP BY classroom
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Which classroom has th...
SELECT classroom FROM list GROUP BY classroom 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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the classroom tha...
SELECT classroom FROM list GROUP BY classroom 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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Report the number of s...
SELECT classroom , count(*) FROM list GROUP BY classroom
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question For each classroom, sh...
SELECT classroom , count(*) FROM list GROUP BY classroom
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question For each grade 0 class...
SELECT classroom , count(*) FROM list WHERE grade = "0" GROUP BY classroom
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question For each grade 0 class...
SELECT classroom , count(*) FROM list WHERE grade = "0" GROUP BY classroom
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Report the total numbe...
SELECT classroom , count(*) FROM list WHERE grade = "4" GROUP BY classroom
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question For each fourth-grade ...
SELECT classroom , count(*) FROM list WHERE grade = "4" GROUP BY classroom
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the name of the t...
SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname , T2.lastname 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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Which teacher teaches ...
SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname , T2.lastname 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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question Find the number of stu...
SELECT count(*) , classroom FROM list GROUP BY classroom
[ { "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 \"list\" ( \n\t\"LastName\" TEXT, \n\t\"FirstNam...
You 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 "list" ( "LastName" TEXT, "FirstName" TEXT, "Grade" INTEGER, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) CREATE TABLE "teachers" ( "LastName" TEXT, "FirstName" TEXT, "Classroom" INTEGER, PRIMARY KEY(LastName, FirstName) ) ### Question How many students does...
SELECT count(*) , classroom FROM list GROUP BY classroom
[ { "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 \"Age\...
You 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, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT count(*) FROM company WHERE Headquarters = 'USA'
[ { "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 \"Age\...
You 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, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT Name FROM company ORDER BY Sales_in_Billion 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 \"Age\...
You 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, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT Headquarters , Industry FROM company
[ { "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 \"Age\...
You 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, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT Name FROM company WHERE Industry = "Banking" OR Industry = "Retailing"