text
stringlengths 150
1.06k
| source
dict |
---|---|
### QUESTION
Show all storm names except for those with at least two affected regions.
### CONTEXT
CREATE TABLE storm (name VARCHAR); CREATE TABLE affected_region (storm_id VARCHAR); CREATE TABLE storm (name VARCHAR, storm_id VARCHAR)
### ANSWER
SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2</s> | {
"answer": "SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2",
"context": "CREATE TABLE storm (name VARCHAR); CREATE TABLE affected_region (storm_id VARCHAR); CREATE TABLE storm (name VARCHAR, storm_id VARCHAR)",
"question": "Show all storm names except for those with at least two affected regions."
} |
### QUESTION
Find the name of the storm that affected both Afghanistan and Albania regions.
### CONTEXT
CREATE TABLE storm (Name VARCHAR, storm_id VARCHAR); CREATE TABLE affected_region (region_id VARCHAR, storm_id VARCHAR); CREATE TABLE region (region_id VARCHAR, Region_name VARCHAR)
### ANSWER
SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania'</s> | {
"answer": "SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania'",
"context": "CREATE TABLE storm (Name VARCHAR, storm_id VARCHAR); CREATE TABLE affected_region (region_id VARCHAR, storm_id VARCHAR); CREATE TABLE region (region_id VARCHAR, Region_name VARCHAR)",
"question": "Find the name of the storm that affected both Afghanistan and Albania regions."
} |
### QUESTION
What Label has a Region of united states, and a Format of cassette?
### CONTEXT
CREATE TABLE table_name_68 (label VARCHAR, region VARCHAR, format VARCHAR)
### ANSWER
SELECT label FROM table_name_68 WHERE region = "united states" AND format = "cassette"</s> | {
"answer": "SELECT label FROM table_name_68 WHERE region = \"united states\" AND format = \"cassette\"",
"context": "CREATE TABLE table_name_68 (label VARCHAR, region VARCHAR, format VARCHAR)",
"question": "What Label has a Region of united states, and a Format of cassette?"
} |
### QUESTION
What Label has a Format of cd, and a Catalog of crgd 86136?
### CONTEXT
CREATE TABLE table_name_88 (label VARCHAR, format VARCHAR, catalog VARCHAR)
### ANSWER
SELECT label FROM table_name_88 WHERE format = "cd" AND catalog = "crgd 86136"</s> | {
"answer": "SELECT label FROM table_name_88 WHERE format = \"cd\" AND catalog = \"crgd 86136\"",
"context": "CREATE TABLE table_name_88 (label VARCHAR, format VARCHAR, catalog VARCHAR)",
"question": "What Label has a Format of cd, and a Catalog of crgd 86136?"
} |
### QUESTION
how many players played running back where status is made 53-man roster at start of 2009 season
### CONTEXT
CREATE TABLE table_20898602_1 (player VARCHAR, status VARCHAR, position VARCHAR)
### ANSWER
SELECT COUNT(player) FROM table_20898602_1 WHERE status = "Made 53-man roster at start of 2009 season" AND position = "Running back"</s> | {
"answer": "SELECT COUNT(player) FROM table_20898602_1 WHERE status = \"Made 53-man roster at start of 2009 season\" AND position = \"Running back\"",
"context": "CREATE TABLE table_20898602_1 (player VARCHAR, status VARCHAR, position VARCHAR)",
"question": "how many players played running back where status is made 53-man roster at start of 2009 season"
} |
### QUESTION
howe many positions did wallace, mike mike wallace play for
### CONTEXT
CREATE TABLE table_20898602_1 (position VARCHAR, player VARCHAR)
### ANSWER
SELECT COUNT(position) FROM table_20898602_1 WHERE player = "Wallace, Mike Mike Wallace"</s> | {
"answer": "SELECT COUNT(position) FROM table_20898602_1 WHERE player = \"Wallace, Mike Mike Wallace\"",
"context": "CREATE TABLE table_20898602_1 (position VARCHAR, player VARCHAR)",
"question": "howe many positions did wallace, mike mike wallace play for "
} |
### QUESTION
Show the delegates and the names of county they belong to.
### CONTEXT
CREATE TABLE election (Delegate VARCHAR, District VARCHAR); CREATE TABLE county (County_name VARCHAR, County_id VARCHAR)
### ANSWER
SELECT T2.Delegate, T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District</s> | {
"answer": "SELECT T2.Delegate, T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District",
"context": "CREATE TABLE election (Delegate VARCHAR, District VARCHAR); CREATE TABLE county (County_name VARCHAR, County_id VARCHAR)",
"question": "Show the delegates and the names of county they belong to."
} |
### QUESTION
How many distinct delegates are from counties with population larger than 50000?
### CONTEXT
CREATE TABLE election (Delegate VARCHAR, District VARCHAR); CREATE TABLE county (County_id VARCHAR, Population INTEGER)
### ANSWER
SELECT COUNT(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000</s> | {
"answer": "SELECT COUNT(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000",
"context": "CREATE TABLE election (Delegate VARCHAR, District VARCHAR); CREATE TABLE county (County_id VARCHAR, Population INTEGER)",
"question": "How many distinct delegates are from counties with population larger than 50000?"
} |
### QUESTION
What are the names of the county that the delegates on "Appropriations" committee belong to?
### CONTEXT
CREATE TABLE election (District VARCHAR, Committee VARCHAR); CREATE TABLE county (County_name VARCHAR, County_id VARCHAR)
### ANSWER
SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = "Appropriations"</s> | {
"answer": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = \"Appropriations\"",
"context": "CREATE TABLE election (District VARCHAR, Committee VARCHAR); CREATE TABLE county (County_name VARCHAR, County_id VARCHAR)",
"question": "What are the names of the county that the delegates on \"Appropriations\" committee belong to?"
} |
### QUESTION
How many attempts did Charley Johnson have?
### CONTEXT
CREATE TABLE table_20906175_3 (attempts VARCHAR, name VARCHAR)
### ANSWER
SELECT COUNT(attempts) FROM table_20906175_3 WHERE name = "Charley Johnson"</s> | {
"answer": "SELECT COUNT(attempts) FROM table_20906175_3 WHERE name = \"Charley Johnson\"",
"context": "CREATE TABLE table_20906175_3 (attempts VARCHAR, name VARCHAR)",
"question": "How many attempts did Charley Johnson have?"
} |
### QUESTION
Who were the comptrollers of the parties associated with the delegates from district 1 or district 2?
### CONTEXT
CREATE TABLE party (Comptroller VARCHAR, Party_ID VARCHAR); CREATE TABLE election (Party VARCHAR, District VARCHAR)
### ANSWER
SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2</s> | {
"answer": "SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2",
"context": "CREATE TABLE party (Comptroller VARCHAR, Party_ID VARCHAR); CREATE TABLE election (Party VARCHAR, District VARCHAR)",
"question": "Who were the comptrollers of the parties associated with the delegates from district 1 or district 2?"
} |
### QUESTION
What Place has a To par of –4?
### CONTEXT
CREATE TABLE table_name_92 (place VARCHAR, to_par VARCHAR)
### ANSWER
SELECT place FROM table_name_92 WHERE to_par = "–4"</s> | {
"answer": "SELECT place FROM table_name_92 WHERE to_par = \"–4\"",
"context": "CREATE TABLE table_name_92 (place VARCHAR, to_par VARCHAR)",
"question": "What Place has a To par of –4?"
} |
### QUESTION
What To par has a Country of united states, and a Score of 67-66-78-77=288?
### CONTEXT
CREATE TABLE table_name_52 (to_par VARCHAR, country VARCHAR, score VARCHAR)
### ANSWER
SELECT to_par FROM table_name_52 WHERE country = "united states" AND score = 67 - 66 - 78 - 77 = 288</s> | {
"answer": "SELECT to_par FROM table_name_52 WHERE country = \"united states\" AND score = 67 - 66 - 78 - 77 = 288",
"context": "CREATE TABLE table_name_52 (to_par VARCHAR, country VARCHAR, score VARCHAR)",
"question": "What To par has a Country of united states, and a Score of 67-66-78-77=288?"
} |
### QUESTION
Show the name of each party and the corresponding number of delegates from that party.
### CONTEXT
CREATE TABLE election (Party VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR)
### ANSWER
SELECT T2.Party, COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party</s> | {
"answer": "SELECT T2.Party, COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party",
"context": "CREATE TABLE election (Party VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR)",
"question": "Show the name of each party and the corresponding number of delegates from that party."
} |
### QUESTION
Return the names of all counties sorted by population in ascending order.
### CONTEXT
CREATE TABLE county (County_name VARCHAR, Population VARCHAR)
### ANSWER
SELECT County_name FROM county ORDER BY Population</s> | {
"answer": "SELECT County_name FROM county ORDER BY Population",
"context": "CREATE TABLE county (County_name VARCHAR, Population VARCHAR)",
"question": "Return the names of all counties sorted by population in ascending order."
} |
### QUESTION
Show the name of the party that has the most delegates.
### CONTEXT
CREATE TABLE election (Party VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR)
### ANSWER
SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1</s> | {
"answer": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE election (Party VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR)",
"question": "Show the name of the party that has the most delegates."
} |
### QUESTION
What are the names of parties that have both delegates on "Appropriations" committee and
### CONTEXT
CREATE TABLE election (Party VARCHAR, Committee VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR)
### ANSWER
SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = "Appropriations" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = "Economic Matters"</s> | {
"answer": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = \"Appropriations\" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = \"Economic Matters\"",
"context": "CREATE TABLE election (Party VARCHAR, Committee VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR)",
"question": "What are the names of parties that have both delegates on \"Appropriations\" committee and"
} |
### QUESTION
Which committees have delegates from both democratic party and liberal party?
### CONTEXT
CREATE TABLE election (Committee VARCHAR, Party VARCHAR); CREATE TABLE party (Party_ID VARCHAR, Party VARCHAR)
### ANSWER
SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Democratic" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Liberal"</s> | {
"answer": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Democratic\" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Liberal\"",
"context": "CREATE TABLE election (Committee VARCHAR, Party VARCHAR); CREATE TABLE party (Party_ID VARCHAR, Party VARCHAR)",
"question": "Which committees have delegates from both democratic party and liberal party?"
} |
### QUESTION
Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.
### CONTEXT
CREATE TABLE journalist (Nationality VARCHAR, Years_working INTEGER)
### ANSWER
SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3</s> | {
"answer": "SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3",
"context": "CREATE TABLE journalist (Nationality VARCHAR, Years_working INTEGER)",
"question": "Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working."
} |
### QUESTION
Name the least episode for november 29, 1985
### CONTEXT
CREATE TABLE table_20967430_2 (ep INTEGER, original_air_date VARCHAR)
### ANSWER
SELECT MIN(ep) FROM table_20967430_2 WHERE original_air_date = "November 29, 1985"</s> | {
"answer": "SELECT MIN(ep) FROM table_20967430_2 WHERE original_air_date = \"November 29, 1985\"",
"context": "CREATE TABLE table_20967430_2 (ep INTEGER, original_air_date VARCHAR)",
"question": "Name the least episode for november 29, 1985"
} |
### QUESTION
Show the names of journalists and the names of the events they reported in ascending order
### CONTEXT
CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Event_ID VARCHAR, journalist_ID VARCHAR); CREATE TABLE event (Name VARCHAR, Event_ID VARCHAR, Event_Attendance VARCHAR)
### ANSWER
SELECT T3.Name, T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID ORDER BY T2.Event_Attendance</s> | {
"answer": "SELECT T3.Name, T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID ORDER BY T2.Event_Attendance",
"context": "CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Event_ID VARCHAR, journalist_ID VARCHAR); CREATE TABLE event (Name VARCHAR, Event_ID VARCHAR, Event_Attendance VARCHAR)",
"question": "Show the names of journalists and the names of the events they reported in ascending order"
} |
### QUESTION
Show the names of journalists that have reported more than one event.
### CONTEXT
CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Event_ID VARCHAR, journalist_ID VARCHAR); CREATE TABLE event (Event_ID VARCHAR)
### ANSWER
SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*) > 1</s> | {
"answer": "SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*) > 1",
"context": "CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Event_ID VARCHAR, journalist_ID VARCHAR); CREATE TABLE event (Event_ID VARCHAR)",
"question": "Show the names of journalists that have reported more than one event."
} |
### QUESTION
List the names of journalists who have not reported any event.
### CONTEXT
CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Name VARCHAR, journalist_ID VARCHAR)
### ANSWER
SELECT Name FROM journalist WHERE NOT journalist_ID IN (SELECT journalist_ID FROM news_report)</s> | {
"answer": "SELECT Name FROM journalist WHERE NOT journalist_ID IN (SELECT journalist_ID FROM news_report)",
"context": "CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Name VARCHAR, journalist_ID VARCHAR)",
"question": "List the names of journalists who have not reported any event."
} |
### QUESTION
Find the average age and experience working length of journalists working on different role type.
### CONTEXT
CREATE TABLE news_report (work_type VARCHAR, journalist_id VARCHAR); CREATE TABLE journalist (age INTEGER, journalist_id VARCHAR)
### ANSWER
SELECT AVG(t1.age), AVG(Years_working), t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type</s> | {
"answer": "SELECT AVG(t1.age), AVG(Years_working), t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type",
"context": "CREATE TABLE news_report (work_type VARCHAR, journalist_id VARCHAR); CREATE TABLE journalist (age INTEGER, journalist_id VARCHAR)",
"question": "Find the average age and experience working length of journalists working on different role type."
} |
### QUESTION
What is the broadcast date of the episode on 16mm t/r that ran 23:25?
### CONTEXT
CREATE TABLE table_2101431_1 (broadcast_date VARCHAR, archive VARCHAR, run_time VARCHAR)
### ANSWER
SELECT broadcast_date FROM table_2101431_1 WHERE archive = "16mm t/r" AND run_time = "23:25"</s> | {
"answer": "SELECT broadcast_date FROM table_2101431_1 WHERE archive = \"16mm t/r\" AND run_time = \"23:25\"",
"context": "CREATE TABLE table_2101431_1 (broadcast_date VARCHAR, archive VARCHAR, run_time VARCHAR)",
"question": "What is the broadcast date of the episode on 16mm t/r that ran 23:25?"
} |
### QUESTION
Where did the player place who is from the United States, who made more than $216, and whose score was 74-70-71-69=284?
### CONTEXT
CREATE TABLE table_name_71 (place VARCHAR, country VARCHAR, money___$__ VARCHAR, score VARCHAR)
### ANSWER
SELECT place FROM table_name_71 WHERE country = "united states" AND money___$__ > 216 AND score = 74 - 70 - 71 - 69 = 284</s> | {
"answer": "SELECT place FROM table_name_71 WHERE country = \"united states\" AND money___$__ > 216 AND score = 74 - 70 - 71 - 69 = 284",
"context": "CREATE TABLE table_name_71 (place VARCHAR, country VARCHAR, money___$__ VARCHAR, score VARCHAR)",
"question": "Where did the player place who is from the United States, who made more than $216, and whose score was 74-70-71-69=284?"
} |
### QUESTION
If torque is n·m (lb·ft) @1600–2400 rpm and applications is 2000 w90x sprinter, what is the power?
### CONTEXT
CREATE TABLE table_21021796_1 (power VARCHAR, torque VARCHAR, applications VARCHAR)
### ANSWER
SELECT power FROM table_21021796_1 WHERE torque = "N·m (lb·ft) @1600–2400 rpm" AND applications = "2000 W90x Sprinter"</s> | {
"answer": "SELECT power FROM table_21021796_1 WHERE torque = \"N·m (lb·ft) @1600–2400 rpm\" AND applications = \"2000 W90x Sprinter\"",
"context": "CREATE TABLE table_21021796_1 (power VARCHAR, torque VARCHAR, applications VARCHAR)",
"question": "If torque is n·m (lb·ft) @1600–2400 rpm and applications is 2000 w90x sprinter, what is the power?"
} |
### QUESTION
Which Advisor has most of students? List advisor and the number of students.
### CONTEXT
CREATE TABLE Student (Advisor VARCHAR)
### ANSWER
SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor ORDER BY COUNT(Advisor) DESC LIMIT 1</s> | {
"answer": "SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor ORDER BY COUNT(Advisor) DESC LIMIT 1",
"context": "CREATE TABLE Student (Advisor VARCHAR)",
"question": "Which Advisor has most of students? List advisor and the number of students."
} |
### QUESTION
Which major has least number of students? List the major and the number of students.
### CONTEXT
CREATE TABLE Student (Major VARCHAR)
### ANSWER
SELECT Major, COUNT(*) FROM Student GROUP BY Major ORDER BY COUNT(Major) LIMIT 1</s> | {
"answer": "SELECT Major, COUNT(*) FROM Student GROUP BY Major ORDER BY COUNT(Major) LIMIT 1",
"context": "CREATE TABLE Student (Major VARCHAR)",
"question": "Which major has least number of students? List the major and the number of students."
} |
### QUESTION
What date was the UEFA Cup against Panathinaikos?
### CONTEXT
CREATE TABLE table_name_29 (date VARCHAR, competition VARCHAR, opponent VARCHAR)
### ANSWER
SELECT date FROM table_name_29 WHERE competition = "uefa cup" AND opponent = "panathinaikos"</s> | {
"answer": "SELECT date FROM table_name_29 WHERE competition = \"uefa cup\" AND opponent = \"panathinaikos\"",
"context": "CREATE TABLE table_name_29 (date VARCHAR, competition VARCHAR, opponent VARCHAR)",
"question": "What date was the UEFA Cup against Panathinaikos?"
} |
### QUESTION
How many restaurant is the Sandwich type restaurant?
### CONTEXT
CREATE TABLE Type_Of_Restaurant (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR); CREATE TABLE Restaurant_Type (Id VARCHAR)
### ANSWER
SELECT COUNT(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID = Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = 'Sandwich'</s> | {
"answer": "SELECT COUNT(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID = Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = 'Sandwich'",
"context": "CREATE TABLE Type_Of_Restaurant (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR); CREATE TABLE Restaurant_Type (Id VARCHAR)",
"question": "How many restaurant is the Sandwich type restaurant?"
} |
### QUESTION
How long does student Linda Smith spend on the restaurant in total?
### CONTEXT
CREATE TABLE Visits_Restaurant (Spent INTEGER); CREATE TABLE Student (Spent INTEGER)
### ANSWER
SELECT SUM(Spent) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID WHERE Student.Fname = "Linda" AND Student.Lname = "Smith"</s> | {
"answer": "SELECT SUM(Spent) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID WHERE Student.Fname = \"Linda\" AND Student.Lname = \"Smith\"",
"context": "CREATE TABLE Visits_Restaurant (Spent INTEGER); CREATE TABLE Student (Spent INTEGER)",
"question": "How long does student Linda Smith spend on the restaurant in total?"
} |
### QUESTION
How many times has the student Linda Smith visited Subway?
### CONTEXT
CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Student (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR)
### ANSWER
SELECT COUNT(*) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = "Linda" AND Student.Lname = "Smith" AND Restaurant.ResName = "Subway"</s> | {
"answer": "SELECT COUNT(*) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = \"Linda\" AND Student.Lname = \"Smith\" AND Restaurant.ResName = \"Subway\"",
"context": "CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Student (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR)",
"question": "How many times has the student Linda Smith visited Subway?"
} |
### QUESTION
When did Linda Smith visit Subway?
### CONTEXT
CREATE TABLE Restaurant (TIME VARCHAR); CREATE TABLE Visits_Restaurant (TIME VARCHAR); CREATE TABLE Student (TIME VARCHAR)
### ANSWER
SELECT TIME FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = "Linda" AND Student.Lname = "Smith" AND Restaurant.ResName = "Subway"</s> | {
"answer": "SELECT TIME FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = \"Linda\" AND Student.Lname = \"Smith\" AND Restaurant.ResName = \"Subway\"",
"context": "CREATE TABLE Restaurant (TIME VARCHAR); CREATE TABLE Visits_Restaurant (TIME VARCHAR); CREATE TABLE Student (TIME VARCHAR)",
"question": "When did Linda Smith visit Subway?"
} |
### QUESTION
At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.
### CONTEXT
CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR)
### ANSWER
SELECT Restaurant.ResName, SUM(Visits_Restaurant.Spent) FROM Visits_Restaurant JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID GROUP BY Restaurant.ResID ORDER BY SUM(Visits_Restaurant.Spent) LIMIT 1</s> | {
"answer": "SELECT Restaurant.ResName, SUM(Visits_Restaurant.Spent) FROM Visits_Restaurant JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID GROUP BY Restaurant.ResID ORDER BY SUM(Visits_Restaurant.Spent) LIMIT 1",
"context": "CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR)",
"question": "At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total."
} |
### QUESTION
Which student visited restaurant most often? List student's first name and last name.
### CONTEXT
CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Student (Id VARCHAR)
### ANSWER
SELECT Student.Fname, Student.Lname FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID GROUP BY Student.StuID ORDER BY COUNT(*) DESC LIMIT 1</s> | {
"answer": "SELECT Student.Fname, Student.Lname FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID GROUP BY Student.StuID ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Student (Id VARCHAR)",
"question": "Which student visited restaurant most often? List student's first name and last name."
} |
### QUESTION
What was the archive for the episode with a run time of 25:24?
### CONTEXT
CREATE TABLE table_2102714_1 (archive VARCHAR, run_time VARCHAR)
### ANSWER
SELECT archive FROM table_2102714_1 WHERE run_time = "25:24"</s> | {
"answer": "SELECT archive FROM table_2102714_1 WHERE run_time = \"25:24\"",
"context": "CREATE TABLE table_2102714_1 (archive VARCHAR, run_time VARCHAR)",
"question": "What was the archive for the episode with a run time of 25:24?"
} |
### QUESTION
Find the name and price of the product that has been ordered the greatest number of times.
### CONTEXT
CREATE TABLE products (product_name VARCHAR, product_price VARCHAR, product_id VARCHAR); CREATE TABLE regular_order_products (product_id VARCHAR)
### ANSWER
SELECT t1.product_name, t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY COUNT(*) DESC LIMIT 1</s> | {
"answer": "SELECT t1.product_name, t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE products (product_name VARCHAR, product_price VARCHAR, product_id VARCHAR); CREATE TABLE regular_order_products (product_id VARCHAR)",
"question": "Find the name and price of the product that has been ordered the greatest number of times."
} |
### QUESTION
Who has the lowest league total goals with 0 FA cup goals and no FA cup appearances, plays the DF position and has appeared in total of 3 times?
### CONTEXT
CREATE TABLE table_name_84 (league_goals INTEGER, total_apps VARCHAR, position VARCHAR, fa_cup_goals VARCHAR, fa_cup_apps VARCHAR)
### ANSWER
SELECT MIN(league_goals) FROM table_name_84 WHERE fa_cup_goals = "0" AND fa_cup_apps = "0" AND position = "df" AND total_apps = "3"</s> | {
"answer": "SELECT MIN(league_goals) FROM table_name_84 WHERE fa_cup_goals = \"0\" AND fa_cup_apps = \"0\" AND position = \"df\" AND total_apps = \"3\"",
"context": "CREATE TABLE table_name_84 (league_goals INTEGER, total_apps VARCHAR, position VARCHAR, fa_cup_goals VARCHAR, fa_cup_apps VARCHAR)",
"question": "Who has the lowest league total goals with 0 FA cup goals and no FA cup appearances, plays the DF position and has appeared in total of 3 times?"
} |
### QUESTION
How many opponents led to an exactly 7-0 record?
### CONTEXT
CREATE TABLE table_21034801_1 (opponent VARCHAR, record VARCHAR)
### ANSWER
SELECT COUNT(opponent) FROM table_21034801_1 WHERE record = "7-0"</s> | {
"answer": "SELECT COUNT(opponent) FROM table_21034801_1 WHERE record = \"7-0\"",
"context": "CREATE TABLE table_21034801_1 (opponent VARCHAR, record VARCHAR)",
"question": "How many opponents led to an exactly 7-0 record?"
} |
### QUESTION
What is he archive for the episode with a run time of 24:05?
### CONTEXT
CREATE TABLE table_2102714_1 (archive VARCHAR, run_time VARCHAR)
### ANSWER
SELECT archive FROM table_2102714_1 WHERE run_time = "24:05"</s> | {
"answer": "SELECT archive FROM table_2102714_1 WHERE run_time = \"24:05\"",
"context": "CREATE TABLE table_2102714_1 (archive VARCHAR, run_time VARCHAR)",
"question": "What is he archive for the episode with a run time of 24:05?"
} |
### QUESTION
Find the names of customers who are not living in the state of California.
### CONTEXT
CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR); CREATE TABLE addresses (address_id VARCHAR, state_province_county VARCHAR)
### ANSWER
SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'</s> | {
"answer": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'",
"context": "CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR); CREATE TABLE addresses (address_id VARCHAR, state_province_county VARCHAR)",
"question": "Find the names of customers who are not living in the state of California."
} |
### QUESTION
What was the score when Sheffield United was the home team?
### CONTEXT
CREATE TABLE table_name_37 (score VARCHAR, home_team VARCHAR)
### ANSWER
SELECT score FROM table_name_37 WHERE home_team = "sheffield united"</s> | {
"answer": "SELECT score FROM table_name_37 WHERE home_team = \"sheffield united\"",
"context": "CREATE TABLE table_name_37 (score VARCHAR, home_team VARCHAR)",
"question": "What was the score when Sheffield United was the home team?"
} |
### QUESTION
Find the names and phone numbers of customers living in California state.
### CONTEXT
CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_phone VARCHAR, customer_id VARCHAR); CREATE TABLE addresses (address_id VARCHAR, state_province_county VARCHAR)
### ANSWER
SELECT t1.customer_name, t1.customer_phone FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'</s> | {
"answer": "SELECT t1.customer_name, t1.customer_phone FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'",
"context": "CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_phone VARCHAR, customer_id VARCHAR); CREATE TABLE addresses (address_id VARCHAR, state_province_county VARCHAR)",
"question": "Find the names and phone numbers of customers living in California state."
} |
### QUESTION
What is the sum of League Goals, when Position is "DF", when League Cup Apps is "0", when Total Apps is "7", and when FLT Goals is less than 0?
### CONTEXT
CREATE TABLE table_name_95 (league_goals INTEGER, flt_goals VARCHAR, total_apps VARCHAR, position VARCHAR, league_cup_apps VARCHAR)
### ANSWER
SELECT SUM(league_goals) FROM table_name_95 WHERE position = "df" AND league_cup_apps = "0" AND total_apps = "7" AND flt_goals < 0</s> | {
"answer": "SELECT SUM(league_goals) FROM table_name_95 WHERE position = \"df\" AND league_cup_apps = \"0\" AND total_apps = \"7\" AND flt_goals < 0",
"context": "CREATE TABLE table_name_95 (league_goals INTEGER, flt_goals VARCHAR, total_apps VARCHAR, position VARCHAR, league_cup_apps VARCHAR)",
"question": "What is the sum of League Goals, when Position is \"DF\", when League Cup Apps is \"0\", when Total Apps is \"7\", and when FLT Goals is less than 0?"
} |
### QUESTION
Find the states which do not have any employee in their record.
### CONTEXT
CREATE TABLE Employees (state_province_county VARCHAR, address_id VARCHAR, employee_address_id VARCHAR); CREATE TABLE addresses (state_province_county VARCHAR, address_id VARCHAR, employee_address_id VARCHAR)
### ANSWER
SELECT state_province_county FROM addresses WHERE NOT address_id IN (SELECT employee_address_id FROM Employees)</s> | {
"answer": "SELECT state_province_county FROM addresses WHERE NOT address_id IN (SELECT employee_address_id FROM Employees)",
"context": "CREATE TABLE Employees (state_province_county VARCHAR, address_id VARCHAR, employee_address_id VARCHAR); CREATE TABLE addresses (state_province_county VARCHAR, address_id VARCHAR, employee_address_id VARCHAR)",
"question": "Find the states which do not have any employee in their record."
} |
### QUESTION
What is the lowest FA Cup Goals, when Total Goals is greater than 0, when League Goals is "4", when FA Cup Apps is "1", and when League Cup Goals is greater than 0?
### CONTEXT
CREATE TABLE table_name_10 (fa_cup_goals INTEGER, league_cup_goals VARCHAR, fa_cup_apps VARCHAR, total_goals VARCHAR, league_goals VARCHAR)
### ANSWER
SELECT MIN(fa_cup_goals) FROM table_name_10 WHERE total_goals > 0 AND league_goals = 4 AND fa_cup_apps = "1" AND league_cup_goals > 0</s> | {
"answer": "SELECT MIN(fa_cup_goals) FROM table_name_10 WHERE total_goals > 0 AND league_goals = 4 AND fa_cup_apps = \"1\" AND league_cup_goals > 0",
"context": "CREATE TABLE table_name_10 (fa_cup_goals INTEGER, league_cup_goals VARCHAR, fa_cup_apps VARCHAR, total_goals VARCHAR, league_goals VARCHAR)",
"question": "What is the lowest FA Cup Goals, when Total Goals is greater than 0, when League Goals is \"4\", when FA Cup Apps is \"1\", and when League Cup Goals is greater than 0?"
} |
### QUESTION
List the names of all routes in alphabetic order.
### CONTEXT
CREATE TABLE Delivery_Routes (route_name VARCHAR)
### ANSWER
SELECT route_name FROM Delivery_Routes ORDER BY route_name</s> | {
"answer": "SELECT route_name FROM Delivery_Routes ORDER BY route_name",
"context": "CREATE TABLE Delivery_Routes (route_name VARCHAR)",
"question": "List the names of all routes in alphabetic order."
} |
### QUESTION
Find the name of route that has the highest number of deliveries.
### CONTEXT
CREATE TABLE Delivery_Routes (route_name VARCHAR, route_id VARCHAR); CREATE TABLE Delivery_Route_Locations (route_id VARCHAR)
### ANSWER
SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY COUNT(*) DESC LIMIT 1</s> | {
"answer": "SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE Delivery_Routes (route_name VARCHAR, route_id VARCHAR); CREATE TABLE Delivery_Route_Locations (route_id VARCHAR)",
"question": "Find the name of route that has the highest number of deliveries."
} |
### QUESTION
List the state names and the number of customers living in each state.
### CONTEXT
CREATE TABLE customer_addresses (address_id VARCHAR); CREATE TABLE addresses (state_province_county VARCHAR, address_id VARCHAR)
### ANSWER
SELECT t2.state_province_county, COUNT(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county</s> | {
"answer": "SELECT t2.state_province_county, COUNT(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county",
"context": "CREATE TABLE customer_addresses (address_id VARCHAR); CREATE TABLE addresses (state_province_county VARCHAR, address_id VARCHAR)",
"question": "List the state names and the number of customers living in each state."
} |
### QUESTION
What is the air force cross when you recieve the Aerial achievement medal?
### CONTEXT
CREATE TABLE table_2104176_1 (air_force_cross VARCHAR, homeland_security_distinguished_service_medal VARCHAR)
### ANSWER
SELECT air_force_cross FROM table_2104176_1 WHERE homeland_security_distinguished_service_medal = "Aerial Achievement Medal"</s> | {
"answer": "SELECT air_force_cross FROM table_2104176_1 WHERE homeland_security_distinguished_service_medal = \"Aerial Achievement Medal\"",
"context": "CREATE TABLE table_2104176_1 (air_force_cross VARCHAR, homeland_security_distinguished_service_medal VARCHAR)",
"question": "What is the air force cross when you recieve the Aerial achievement medal?"
} |
### QUESTION
What did they do in the game when their record was 3-2-1?
### CONTEXT
CREATE TABLE table_21058823_1 (result VARCHAR, record VARCHAR)
### ANSWER
SELECT result FROM table_21058823_1 WHERE record = "3-2-1"</s> | {
"answer": "SELECT result FROM table_21058823_1 WHERE record = \"3-2-1\"",
"context": "CREATE TABLE table_21058823_1 (result VARCHAR, record VARCHAR)",
"question": "What did they do in the game when their record was 3-2-1?"
} |
### QUESTION
What are the titles of papers published by "Jeremy Gibbons"?
### CONTEXT
CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR)
### ANSWER
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Jeremy" AND t1.lname = "Gibbons"</s> | {
"answer": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Jeremy\" AND t1.lname = \"Gibbons\"",
"context": "CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR)",
"question": "What are the titles of papers published by \"Jeremy Gibbons\"?"
} |
### QUESTION
Find all the papers published by "Aaron Turon".
### CONTEXT
CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR)
### ANSWER
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Aaron" AND t1.lname = "Turon"</s> | {
"answer": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Aaron\" AND t1.lname = \"Turon\"",
"context": "CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR)",
"question": "Find all the papers published by \"Aaron Turon\"."
} |
### QUESTION
How many papers have "Atsushi Ohori" published?
### CONTEXT
CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE papers (paperid VARCHAR)
### ANSWER
SELECT COUNT(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Atsushi" AND t1.lname = "Ohori"</s> | {
"answer": "SELECT COUNT(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Atsushi\" AND t1.lname = \"Ohori\"",
"context": "CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE papers (paperid VARCHAR)",
"question": "How many papers have \"Atsushi Ohori\" published?"
} |
### QUESTION
What is the name of the institution that "Matthias Blume" belongs to?
### CONTEXT
CREATE TABLE authorship (authid VARCHAR, instid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE inst (name VARCHAR, instid VARCHAR)
### ANSWER
SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = "Matthias" AND t1.lname = "Blume"</s> | {
"answer": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = \"Matthias\" AND t1.lname = \"Blume\"",
"context": "CREATE TABLE authorship (authid VARCHAR, instid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE inst (name VARCHAR, instid VARCHAR)",
"question": "What is the name of the institution that \"Matthias Blume\" belongs to?"
} |
### QUESTION
Which institution does "Katsuhiro Ueno" belong to?
### CONTEXT
CREATE TABLE authorship (authid VARCHAR, instid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE inst (name VARCHAR, instid VARCHAR)
### ANSWER
SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = "Katsuhiro" AND t1.lname = "Ueno"</s> | {
"answer": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = \"Katsuhiro\" AND t1.lname = \"Ueno\"",
"context": "CREATE TABLE authorship (authid VARCHAR, instid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE inst (name VARCHAR, instid VARCHAR)",
"question": "Which institution does \"Katsuhiro Ueno\" belong to?"
} |
### QUESTION
Who belong to the institution "University of Oxford"? Show the first names and last names.
### CONTEXT
CREATE TABLE authorship (authid VARCHAR, instid VARCHAR); CREATE TABLE authors (fname VARCHAR, lname VARCHAR, authid VARCHAR); CREATE TABLE inst (instid VARCHAR, name VARCHAR)
### ANSWER
SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "University of Oxford"</s> | {
"answer": "SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"University of Oxford\"",
"context": "CREATE TABLE authorship (authid VARCHAR, instid VARCHAR); CREATE TABLE authors (fname VARCHAR, lname VARCHAR, authid VARCHAR); CREATE TABLE inst (instid VARCHAR, name VARCHAR)",
"question": "Who belong to the institution \"University of Oxford\"? Show the first names and last names."
} |
### QUESTION
What's the white for a black of Anand, a result of ½–½, 39 moves, and an opening of d37 queen's gambit declined?
### CONTEXT
CREATE TABLE table_name_20 (white VARCHAR, opening VARCHAR, moves VARCHAR, black VARCHAR, result VARCHAR)
### ANSWER
SELECT white FROM table_name_20 WHERE black = "anand" AND result = "½–½" AND moves = 39 AND opening = "d37 queen's gambit declined"</s> | {
"answer": "SELECT white FROM table_name_20 WHERE black = \"anand\" AND result = \"½–½\" AND moves = 39 AND opening = \"d37 queen's gambit declined\"",
"context": "CREATE TABLE table_name_20 (white VARCHAR, opening VARCHAR, moves VARCHAR, black VARCHAR, result VARCHAR)",
"question": "What's the white for a black of Anand, a result of ½–½, 39 moves, and an opening of d37 queen's gambit declined?"
} |
### QUESTION
What are the last names of the author of the paper titled "Binders Unbound"?
### CONTEXT
CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE authors (lname VARCHAR, authid VARCHAR); CREATE TABLE papers (paperid VARCHAR, title VARCHAR)
### ANSWER
SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = "Binders Unbound"</s> | {
"answer": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = \"Binders Unbound\"",
"context": "CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE authors (lname VARCHAR, authid VARCHAR); CREATE TABLE papers (paperid VARCHAR, title VARCHAR)",
"question": "What are the last names of the author of the paper titled \"Binders Unbound\"?"
} |
### QUESTION
What's the black with 24 moves in the dortmund tournament?
### CONTEXT
CREATE TABLE table_name_56 (black VARCHAR, moves VARCHAR, tournament VARCHAR)
### ANSWER
SELECT black FROM table_name_56 WHERE moves = 24 AND tournament = "dortmund"</s> | {
"answer": "SELECT black FROM table_name_56 WHERE moves = 24 AND tournament = \"dortmund\"",
"context": "CREATE TABLE table_name_56 (black VARCHAR, moves VARCHAR, tournament VARCHAR)",
"question": "What's the black with 24 moves in the dortmund tournament?"
} |
### QUESTION
What are the papers published under the institution "Indiana University"?
### CONTEXT
CREATE TABLE inst (instid VARCHAR, name VARCHAR); CREATE TABLE authorship (paperid VARCHAR, instid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR)
### ANSWER
SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "Indiana University"</s> | {
"answer": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Indiana University\"",
"context": "CREATE TABLE inst (instid VARCHAR, name VARCHAR); CREATE TABLE authorship (paperid VARCHAR, instid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR)",
"question": "What are the papers published under the institution \"Indiana University\"?"
} |
### QUESTION
Find all the papers published by the institution "Google".
### CONTEXT
CREATE TABLE inst (instid VARCHAR, name VARCHAR); CREATE TABLE authorship (paperid VARCHAR, instid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR)
### ANSWER
SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "Google"</s> | {
"answer": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Google\"",
"context": "CREATE TABLE inst (instid VARCHAR, name VARCHAR); CREATE TABLE authorship (paperid VARCHAR, instid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR)",
"question": "Find all the papers published by the institution \"Google\"."
} |
### QUESTION
What game did the Bruins play Santa Clara?
### CONTEXT
CREATE TABLE table_21058836_1 (game VARCHAR, opponent VARCHAR)
### ANSWER
SELECT game FROM table_21058836_1 WHERE opponent = "Santa Clara"</s> | {
"answer": "SELECT game FROM table_21058836_1 WHERE opponent = \"Santa Clara\"",
"context": "CREATE TABLE table_21058836_1 (game VARCHAR, opponent VARCHAR)",
"question": "What game did the Bruins play Santa Clara?"
} |
### QUESTION
How many papers are published by the institution "Tokohu University"?
### CONTEXT
CREATE TABLE inst (instid VARCHAR, name VARCHAR); CREATE TABLE authorship (paperid VARCHAR, instid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR)
### ANSWER
SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "Tokohu University"</s> | {
"answer": "SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Tokohu University\"",
"context": "CREATE TABLE inst (instid VARCHAR, name VARCHAR); CREATE TABLE authorship (paperid VARCHAR, instid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR)",
"question": "How many papers are published by the institution \"Tokohu University\"?"
} |
### QUESTION
Find the first and last name of the author(s) who wrote the paper "Nameless, Painless".
### CONTEXT
CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE papers (paperid VARCHAR, title VARCHAR); CREATE TABLE authors (fname VARCHAR, lname VARCHAR, authid VARCHAR)
### ANSWER
SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = "Nameless , Painless"</s> | {
"answer": "SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = \"Nameless , Painless\"",
"context": "CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE papers (paperid VARCHAR, title VARCHAR); CREATE TABLE authors (fname VARCHAR, lname VARCHAR, authid VARCHAR)",
"question": "Find the first and last name of the author(s) who wrote the paper \"Nameless, Painless\"."
} |
### QUESTION
Which papers have "Stephanie Weirich" as an author?
### CONTEXT
CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR)
### ANSWER
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Stephanie" AND t1.lname = "Weirich"</s> | {
"answer": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Stephanie\" AND t1.lname = \"Weirich\"",
"context": "CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR)",
"question": "Which papers have \"Stephanie Weirich\" as an author?"
} |
### QUESTION
Which paper is published in an institution in "USA" and have "Turon" as its second author?
### CONTEXT
CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR, instid VARCHAR, authorder VARCHAR); CREATE TABLE authors (authid VARCHAR, lname VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR); CREATE TABLE inst (instid VARCHAR, country VARCHAR)
### ANSWER
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = "USA" AND t2.authorder = 2 AND t1.lname = "Turon"</s> | {
"answer": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"USA\" AND t2.authorder = 2 AND t1.lname = \"Turon\"",
"context": "CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR, instid VARCHAR, authorder VARCHAR); CREATE TABLE authors (authid VARCHAR, lname VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR); CREATE TABLE inst (instid VARCHAR, country VARCHAR)",
"question": "Which paper is published in an institution in \"USA\" and have \"Turon\" as its second author?"
} |
### QUESTION
Find the titles of papers whose first author is affiliated with an institution in the country "Japan" and has last name "Ohori"?
### CONTEXT
CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR, instid VARCHAR, authorder VARCHAR); CREATE TABLE authors (authid VARCHAR, lname VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR); CREATE TABLE inst (instid VARCHAR, country VARCHAR)
### ANSWER
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = "Japan" AND t2.authorder = 1 AND t1.lname = "Ohori"</s> | {
"answer": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"Japan\" AND t2.authorder = 1 AND t1.lname = \"Ohori\"",
"context": "CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR, instid VARCHAR, authorder VARCHAR); CREATE TABLE authors (authid VARCHAR, lname VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR); CREATE TABLE inst (instid VARCHAR, country VARCHAR)",
"question": "Find the titles of papers whose first author is affiliated with an institution in the country \"Japan\" and has last name \"Ohori\"?"
} |
### QUESTION
What is the last name of the author that has published the most papers?
### CONTEXT
CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE authors (lname VARCHAR, fname VARCHAR, authid VARCHAR); CREATE TABLE papers (paperid VARCHAR)
### ANSWER
SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname, t1.lname ORDER BY COUNT(*) DESC LIMIT 1</s> | {
"answer": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname, t1.lname ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE authors (lname VARCHAR, fname VARCHAR, authid VARCHAR); CREATE TABLE papers (paperid VARCHAR)",
"question": "What is the last name of the author that has published the most papers?"
} |
### QUESTION
Retrieve the country that has published the most papers.
### CONTEXT
CREATE TABLE inst (country VARCHAR, instid VARCHAR); CREATE TABLE authorship (instid VARCHAR, paperid VARCHAR); CREATE TABLE papers (paperid VARCHAR)
### ANSWER
SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY COUNT(*) DESC LIMIT 1</s> | {
"answer": "SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE inst (country VARCHAR, instid VARCHAR); CREATE TABLE authorship (instid VARCHAR, paperid VARCHAR); CREATE TABLE papers (paperid VARCHAR)",
"question": "Retrieve the country that has published the most papers."
} |
### QUESTION
Find the name of the organization that has published the largest number of papers.
### CONTEXT
CREATE TABLE inst (name VARCHAR, instid VARCHAR); CREATE TABLE authorship (instid VARCHAR, paperid VARCHAR); CREATE TABLE papers (paperid VARCHAR)
### ANSWER
SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY COUNT(*) DESC LIMIT 1</s> | {
"answer": "SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE inst (name VARCHAR, instid VARCHAR); CREATE TABLE authorship (instid VARCHAR, paperid VARCHAR); CREATE TABLE papers (paperid VARCHAR)",
"question": "Find the name of the organization that has published the largest number of papers."
} |
### QUESTION
Find the papers which have "Olin Shivers" as an author.
### CONTEXT
CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR)
### ANSWER
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Olin" AND t1.lname = "Shivers"</s> | {
"answer": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Olin\" AND t1.lname = \"Shivers\"",
"context": "CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR)",
"question": "Find the papers which have \"Olin Shivers\" as an author."
} |
### QUESTION
Find the first names of all the authors who have written a paper with title containing the word "Functional".
### CONTEXT
CREATE TABLE authors (fname VARCHAR, authid VARCHAR); CREATE TABLE papers (paperid VARCHAR, title VARCHAR); CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR)
### ANSWER
SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE "%Functional%"</s> | {
"answer": "SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE \"%Functional%\"",
"context": "CREATE TABLE authors (fname VARCHAR, authid VARCHAR); CREATE TABLE papers (paperid VARCHAR, title VARCHAR); CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR)",
"question": "Find the first names of all the authors who have written a paper with title containing the word \"Functional\"."
} |
### QUESTION
Find the last names of all the authors that have written a paper with title containing the word "Monadic".
### CONTEXT
CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE authors (lname VARCHAR, authid VARCHAR); CREATE TABLE papers (paperid VARCHAR, title VARCHAR)
### ANSWER
SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE "%Monadic%"</s> | {
"answer": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE \"%Monadic%\"",
"context": "CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE authors (lname VARCHAR, authid VARCHAR); CREATE TABLE papers (paperid VARCHAR, title VARCHAR)",
"question": "Find the last names of all the authors that have written a paper with title containing the word \"Monadic\"."
} |
### QUESTION
Retrieve the title of the paper that has the largest number of authors.
### CONTEXT
CREATE TABLE authorship (authorder INTEGER); CREATE TABLE authorship (paperid VARCHAR, authorder INTEGER); CREATE TABLE papers (title VARCHAR, paperid VARCHAR)
### ANSWER
SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship)</s> | {
"answer": "SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship)",
"context": "CREATE TABLE authorship (authorder INTEGER); CREATE TABLE authorship (paperid VARCHAR, authorder INTEGER); CREATE TABLE papers (title VARCHAR, paperid VARCHAR)",
"question": "Retrieve the title of the paper that has the largest number of authors."
} |
### QUESTION
What is the run time for the episode with 7.9 million viewers?
### CONTEXT
CREATE TABLE table_2108684_1 (run_time VARCHAR, viewers__in_millions_ VARCHAR)
### ANSWER
SELECT run_time FROM table_2108684_1 WHERE viewers__in_millions_ = "7.9"</s> | {
"answer": "SELECT run_time FROM table_2108684_1 WHERE viewers__in_millions_ = \"7.9\"",
"context": "CREATE TABLE table_2108684_1 (run_time VARCHAR, viewers__in_millions_ VARCHAR)",
"question": "What is the run time for the episode with 7.9 million viewers?"
} |
### QUESTION
Which city has the most addresses? List the city name, number of addresses, and city id.
### CONTEXT
CREATE TABLE address (city_id VARCHAR); CREATE TABLE city (city VARCHAR, city_id VARCHAR)
### ANSWER
SELECT T2.city, COUNT(*), T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY COUNT(*) DESC LIMIT 1</s> | {
"answer": "SELECT T2.city, COUNT(*), T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE address (city_id VARCHAR); CREATE TABLE city (city VARCHAR, city_id VARCHAR)",
"question": "Which city has the most addresses? List the city name, number of addresses, and city id."
} |
### QUESTION
Name the opponents for record of 2-1
### CONTEXT
CREATE TABLE table_21092444_1 (opponents VARCHAR, record VARCHAR)
### ANSWER
SELECT opponents FROM table_21092444_1 WHERE record = "2-1"</s> | {
"answer": "SELECT opponents FROM table_21092444_1 WHERE record = \"2-1\"",
"context": "CREATE TABLE table_21092444_1 (opponents VARCHAR, record VARCHAR)",
"question": "Name the opponents for record of 2-1"
} |
### QUESTION
Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id.
### CONTEXT
CREATE TABLE film (title VARCHAR, film_id VARCHAR, rental_rate VARCHAR); CREATE TABLE inventory (film_id VARCHAR); CREATE TABLE film (title VARCHAR, film_id VARCHAR)
### ANSWER
SELECT title, film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING COUNT(*) < 3</s> | {
"answer": "SELECT title, film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING COUNT(*) < 3",
"context": "CREATE TABLE film (title VARCHAR, film_id VARCHAR, rental_rate VARCHAR); CREATE TABLE inventory (film_id VARCHAR); CREATE TABLE film (title VARCHAR, film_id VARCHAR)",
"question": "Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id."
} |
### QUESTION
How many cities are in Australia?
### CONTEXT
CREATE TABLE country (country_id VARCHAR, country VARCHAR); CREATE TABLE city (country_id VARCHAR)
### ANSWER
SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'</s> | {
"answer": "SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'",
"context": "CREATE TABLE country (country_id VARCHAR, country VARCHAR); CREATE TABLE city (country_id VARCHAR)",
"question": "How many cities are in Australia?"
} |
### QUESTION
Name the result for ursinus college
### CONTEXT
CREATE TABLE table_21094951_1 (result VARCHAR, opponent VARCHAR)
### ANSWER
SELECT result FROM table_21094951_1 WHERE opponent = "Ursinus College"</s> | {
"answer": "SELECT result FROM table_21094951_1 WHERE opponent = \"Ursinus College\"",
"context": "CREATE TABLE table_21094951_1 (result VARCHAR, opponent VARCHAR)",
"question": "Name the result for ursinus college"
} |
### QUESTION
Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.
### CONTEXT
CREATE TABLE payment (payment_date VARCHAR, staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, first_name VARCHAR); CREATE TABLE payment (payment_date VARCHAR, amount INTEGER)
### ANSWER
SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'</s> | {
"answer": "SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'",
"context": "CREATE TABLE payment (payment_date VARCHAR, staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, first_name VARCHAR); CREATE TABLE payment (payment_date VARCHAR, amount INTEGER)",
"question": "Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa."
} |
### QUESTION
What was the score of the game with away team chelsea on 29 january 1983?
### CONTEXT
CREATE TABLE table_name_10 (score VARCHAR, date VARCHAR, away_team VARCHAR)
### ANSWER
SELECT score FROM table_name_10 WHERE date = "29 january 1983" AND away_team = "chelsea"</s> | {
"answer": "SELECT score FROM table_name_10 WHERE date = \"29 january 1983\" AND away_team = \"chelsea\"",
"context": "CREATE TABLE table_name_10 (score VARCHAR, date VARCHAR, away_team VARCHAR)",
"question": "What was the score of the game with away team chelsea on 29 january 1983?"
} |
### QUESTION
Which film has the most number of actors or actresses? List the film name, film id and description.
### CONTEXT
CREATE TABLE film_actor (film_id VARCHAR); CREATE TABLE film (title VARCHAR, film_id VARCHAR, description VARCHAR)
### ANSWER
SELECT T2.title, T2.film_id, T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY COUNT(*) DESC LIMIT 1</s> | {
"answer": "SELECT T2.title, T2.film_id, T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE film_actor (film_id VARCHAR); CREATE TABLE film (title VARCHAR, film_id VARCHAR, description VARCHAR)",
"question": "Which film has the most number of actors or actresses? List the film name, film id and description."
} |
### QUESTION
Which film actor (actress) starred the most films? List his or her first name, last name and actor id.
### CONTEXT
CREATE TABLE film_actor (actor_id VARCHAR); CREATE TABLE actor (first_name VARCHAR, last_name VARCHAR, actor_id VARCHAR)
### ANSWER
SELECT T2.first_name, T2.last_name, T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY COUNT(*) DESC LIMIT 1</s> | {
"answer": "SELECT T2.first_name, T2.last_name, T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE film_actor (actor_id VARCHAR); CREATE TABLE actor (first_name VARCHAR, last_name VARCHAR, actor_id VARCHAR)",
"question": "Which film actor (actress) starred the most films? List his or her first name, last name and actor id."
} |
### QUESTION
Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.
### CONTEXT
CREATE TABLE film_actor (actor_id VARCHAR); CREATE TABLE actor (first_name VARCHAR, last_name VARCHAR, actor_id VARCHAR)
### ANSWER
SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING COUNT(*) > 30</s> | {
"answer": "SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING COUNT(*) > 30",
"context": "CREATE TABLE film_actor (actor_id VARCHAR); CREATE TABLE actor (first_name VARCHAR, last_name VARCHAR, actor_id VARCHAR)",
"question": "Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name."
} |
### QUESTION
What date was the game that home team torquay united played?
### CONTEXT
CREATE TABLE table_name_76 (date VARCHAR, home_team VARCHAR)
### ANSWER
SELECT date FROM table_name_76 WHERE home_team = "torquay united"</s> | {
"answer": "SELECT date FROM table_name_76 WHERE home_team = \"torquay united\"",
"context": "CREATE TABLE table_name_76 (date VARCHAR, home_team VARCHAR)",
"question": "What date was the game that home team torquay united played?"
} |
### QUESTION
Which customer, who has made at least one payment, has spent the least money? List his or her first name, last name, and the id.
### CONTEXT
CREATE TABLE payment (customer_id VARCHAR); CREATE TABLE customer (first_name VARCHAR, last_name VARCHAR, customer_id VARCHAR)
### ANSWER
SELECT T1.first_name, T1.last_name, T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY SUM(amount) LIMIT 1</s> | {
"answer": "SELECT T1.first_name, T1.last_name, T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY SUM(amount) LIMIT 1",
"context": "CREATE TABLE payment (customer_id VARCHAR); CREATE TABLE customer (first_name VARCHAR, last_name VARCHAR, customer_id VARCHAR)",
"question": "Which customer, who has made at least one payment, has spent the least money? List his or her first name, last name, and the id."
} |
### QUESTION
What is the Place of the Player with a To par of –10 and a Score of 67-67-66=200?
### CONTEXT
CREATE TABLE table_name_89 (place VARCHAR, to_par VARCHAR, score VARCHAR)
### ANSWER
SELECT place FROM table_name_89 WHERE to_par = "–10" AND score = 67 - 67 - 66 = 200</s> | {
"answer": "SELECT place FROM table_name_89 WHERE to_par = \"–10\" AND score = 67 - 67 - 66 = 200",
"context": "CREATE TABLE table_name_89 (place VARCHAR, to_par VARCHAR, score VARCHAR)",
"question": "What is the Place of the Player with a To par of –10 and a Score of 67-67-66=200?"
} |
### QUESTION
How many films are there in each category? List the genre name, genre id and the count.
### CONTEXT
CREATE TABLE film_category (category_id VARCHAR); CREATE TABLE category (name VARCHAR, category_id VARCHAR)
### ANSWER
SELECT T2.name, T1.category_id, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id</s> | {
"answer": "SELECT T2.name, T1.category_id, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id",
"context": "CREATE TABLE film_category (category_id VARCHAR); CREATE TABLE category (name VARCHAR, category_id VARCHAR)",
"question": "How many films are there in each category? List the genre name, genre id and the count."
} |
### QUESTION
Which film has the most copies in the inventory? List both title and id.
### CONTEXT
CREATE TABLE film (title VARCHAR, film_id VARCHAR); CREATE TABLE inventory (film_id VARCHAR)
### ANSWER
SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY COUNT(*) DESC LIMIT 1</s> | {
"answer": "SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE film (title VARCHAR, film_id VARCHAR); CREATE TABLE inventory (film_id VARCHAR)",
"question": "Which film has the most copies in the inventory? List both title and id."
} |
### QUESTION
What is the film title and inventory id of the item in the inventory which was rented most frequently?
### CONTEXT
CREATE TABLE film (title VARCHAR, film_id VARCHAR); CREATE TABLE inventory (inventory_id VARCHAR, film_id VARCHAR); CREATE TABLE rental (inventory_id VARCHAR)
### ANSWER
SELECT T1.title, T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY COUNT(*) DESC LIMIT 1</s> | {
"answer": "SELECT T1.title, T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE film (title VARCHAR, film_id VARCHAR); CREATE TABLE inventory (inventory_id VARCHAR, film_id VARCHAR); CREATE TABLE rental (inventory_id VARCHAR)",
"question": "What is the film title and inventory id of the item in the inventory which was rented most frequently?"
} |
### QUESTION
where value world rank is 12, what is the quantity world rank?
### CONTEXT
CREATE TABLE table_21109892_1 (quantity_world_rank VARCHAR, value_world_rank VARCHAR)
### ANSWER
SELECT quantity_world_rank FROM table_21109892_1 WHERE value_world_rank = "12"</s> | {
"answer": "SELECT quantity_world_rank FROM table_21109892_1 WHERE value_world_rank = \"12\"",
"context": "CREATE TABLE table_21109892_1 (quantity_world_rank VARCHAR, value_world_rank VARCHAR)",
"question": "where value world rank is 12, what is the quantity world rank?"
} |
### QUESTION
What is the Craft used at Coniston Water?
### CONTEXT
CREATE TABLE table_name_15 (craft VARCHAR, location VARCHAR)
### ANSWER
SELECT craft FROM table_name_15 WHERE location = "coniston water"</s> | {
"answer": "SELECT craft FROM table_name_15 WHERE location = \"coniston water\"",
"context": "CREATE TABLE table_name_15 (craft VARCHAR, location VARCHAR)",
"question": "What is the Craft used at Coniston Water?"
} |
### QUESTION
Which movies have 'Deleted Scenes' as a substring in the special feature?
### CONTEXT
CREATE TABLE film (title VARCHAR, special_features VARCHAR)
### ANSWER
SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'</s> | {
"answer": "SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'",
"context": "CREATE TABLE film (title VARCHAR, special_features VARCHAR)",
"question": "Which movies have 'Deleted Scenes' as a substring in the special feature?"
} |
### QUESTION
What is the second party that has a conservative first party in the 1834 election?
### CONTEXT
CREATE TABLE table_name_71 (second_party VARCHAR, first_party VARCHAR, election VARCHAR)
### ANSWER
SELECT second_party FROM table_name_71 WHERE first_party = "conservative" AND election = "1834"</s> | {
"answer": "SELECT second_party FROM table_name_71 WHERE first_party = \"conservative\" AND election = \"1834\"",
"context": "CREATE TABLE table_name_71 (second_party VARCHAR, first_party VARCHAR, election VARCHAR)",
"question": "What is the second party that has a conservative first party in the 1834 election?"
} |
### QUESTION
Who is the second member with first member Sir Rowland Hill, BT, and a conservative second party?
### CONTEXT
CREATE TABLE table_name_3 (second_member VARCHAR, first_member VARCHAR, second_party VARCHAR)
### ANSWER
SELECT second_member FROM table_name_3 WHERE first_member = "sir rowland hill, bt" AND second_party = "conservative"</s> | {
"answer": "SELECT second_member FROM table_name_3 WHERE first_member = \"sir rowland hill, bt\" AND second_party = \"conservative\"",
"context": "CREATE TABLE table_name_3 (second_member VARCHAR, first_member VARCHAR, second_party VARCHAR)",
"question": "Who is the second member with first member Sir Rowland Hill, BT, and a conservative second party?"
} |
### QUESTION
What is the first name and the last name of the customer who made the earliest rental?
### CONTEXT
CREATE TABLE customer (first_name VARCHAR, last_name VARCHAR, customer_id VARCHAR); CREATE TABLE rental (customer_id VARCHAR, rental_date VARCHAR)
### ANSWER
SELECT T1.first_name, T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date LIMIT 1</s> | {
"answer": "SELECT T1.first_name, T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date LIMIT 1",
"context": "CREATE TABLE customer (first_name VARCHAR, last_name VARCHAR, customer_id VARCHAR); CREATE TABLE rental (customer_id VARCHAR, rental_date VARCHAR)",
"question": "What is the first name and the last name of the customer who made the earliest rental?"
} |
### QUESTION
What is the full name of the staff member who has rented a film to a customer with the first name April and the last name Burns?
### CONTEXT
CREATE TABLE customer (customer_id VARCHAR, first_name VARCHAR, last_name VARCHAR); CREATE TABLE rental (staff_id VARCHAR, customer_id VARCHAR); CREATE TABLE staff (first_name VARCHAR, last_name VARCHAR, staff_id VARCHAR)
### ANSWER
SELECT DISTINCT T1.first_name, T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'</s> | {
"answer": "SELECT DISTINCT T1.first_name, T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'",
"context": "CREATE TABLE customer (customer_id VARCHAR, first_name VARCHAR, last_name VARCHAR); CREATE TABLE rental (staff_id VARCHAR, customer_id VARCHAR); CREATE TABLE staff (first_name VARCHAR, last_name VARCHAR, staff_id VARCHAR)",
"question": "What is the full name of the staff member who has rented a film to a customer with the first name April and the last name Burns?"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.