text
stringlengths
150
1.06k
source
dict
### QUESTION Show the id and details of the investor that has the largest number of transactions. ### CONTEXT CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) ### ANSWER SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR)", "question": "Show the id and details of the investor that has the largest number of transactions." }
### QUESTION Show the id and details for the investors who have the top 3 number of transactions. ### CONTEXT CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) ### ANSWER SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 3</s>
{ "answer": "SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 3", "context": "CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR)", "question": "Show the id and details for the investors who have the top 3 number of transactions." }
### QUESTION Gary Barnett who has been in 0 FA Cups plays what position? ### CONTEXT CREATE TABLE table_name_7 (position VARCHAR, fa_cup_apps VARCHAR, name VARCHAR) ### ANSWER SELECT position FROM table_name_7 WHERE fa_cup_apps = "0" AND name = "gary barnett"</s>
{ "answer": "SELECT position FROM table_name_7 WHERE fa_cup_apps = \"0\" AND name = \"gary barnett\"", "context": "CREATE TABLE table_name_7 (position VARCHAR, fa_cup_apps VARCHAR, name VARCHAR)", "question": "Gary Barnett who has been in 0 FA Cups plays what position?" }
### QUESTION Show the ids and details of the investors who have at least two transactions with type code "SALE". ### CONTEXT CREATE TABLE TRANSACTIONS (investor_id VARCHAR, transaction_type_code VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) ### ANSWER SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = "SALE" GROUP BY T2.investor_id HAVING COUNT(*) >= 2</s>
{ "answer": "SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = \"SALE\" GROUP BY T2.investor_id HAVING COUNT(*) >= 2", "context": "CREATE TABLE TRANSACTIONS (investor_id VARCHAR, transaction_type_code VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR)", "question": "Show the ids and details of the investors who have at least two transactions with type code \"SALE\"." }
### QUESTION What are the details of the lots which are not used in any transactions? ### CONTEXT CREATE TABLE Lots (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE Lots (lot_details VARCHAR); CREATE TABLE transactions_lots (lot_id VARCHAR) ### ANSWER SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id</s>
{ "answer": "SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id", "context": "CREATE TABLE Lots (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE Lots (lot_details VARCHAR); CREATE TABLE transactions_lots (lot_id VARCHAR)", "question": "What are the details of the lots which are not used in any transactions?" }
### QUESTION What is the portfolio attachment of the Undersecretary appointed at age 48 with a Chinese name of 撁鳳儀? ### CONTEXT CREATE TABLE table_name_47 (portfolio_attachment VARCHAR, age_at_appointment VARCHAR, chinese_name VARCHAR) ### ANSWER SELECT portfolio_attachment FROM table_name_47 WHERE age_at_appointment = 48 AND chinese_name = "撁鳳儀"</s>
{ "answer": "SELECT portfolio_attachment FROM table_name_47 WHERE age_at_appointment = 48 AND chinese_name = \"撁鳳儀\"", "context": "CREATE TABLE table_name_47 (portfolio_attachment VARCHAR, age_at_appointment VARCHAR, chinese_name VARCHAR)", "question": "What is the portfolio attachment of the Undersecretary appointed at age 48 with a Chinese name of 撁鳳儀?" }
### QUESTION What is the transfer fee of assoumani, who has a summer transfer window? ### CONTEXT CREATE TABLE table_name_70 (transfer_fee VARCHAR, transfer_window VARCHAR, name VARCHAR) ### ANSWER SELECT transfer_fee FROM table_name_70 WHERE transfer_window = "summer" AND name = "assoumani"</s>
{ "answer": "SELECT transfer_fee FROM table_name_70 WHERE transfer_window = \"summer\" AND name = \"assoumani\"", "context": "CREATE TABLE table_name_70 (transfer_fee VARCHAR, transfer_window VARCHAR, name VARCHAR)", "question": "What is the transfer fee of assoumani, who has a summer transfer window?" }
### QUESTION Name least series number for writers david e. kelley & jill goldsmith ### CONTEXT CREATE TABLE table_23286722_1 (series__number INTEGER, written_by VARCHAR) ### ANSWER SELECT MIN(series__number) FROM table_23286722_1 WHERE written_by = "David E. Kelley & Jill Goldsmith"</s>
{ "answer": "SELECT MIN(series__number) FROM table_23286722_1 WHERE written_by = \"David E. Kelley & Jill Goldsmith\"", "context": "CREATE TABLE table_23286722_1 (series__number INTEGER, written_by VARCHAR)", "question": "Name least series number for writers david e. kelley & jill goldsmith" }
### QUESTION What is the ends with a free transfer fee and was moved from middlesbrough? ### CONTEXT CREATE TABLE table_name_5 (ends VARCHAR, transfer_fee VARCHAR, moving_from VARCHAR) ### ANSWER SELECT ends FROM table_name_5 WHERE transfer_fee = "free" AND moving_from = "middlesbrough"</s>
{ "answer": "SELECT ends FROM table_name_5 WHERE transfer_fee = \"free\" AND moving_from = \"middlesbrough\"", "context": "CREATE TABLE table_name_5 (ends VARCHAR, transfer_fee VARCHAR, moving_from VARCHAR)", "question": "What is the ends with a free transfer fee and was moved from middlesbrough?" }
### QUESTION Which location has a method of decision and Nikos Tsoukalas for an opponent? ### CONTEXT CREATE TABLE table_name_97 (location VARCHAR, method VARCHAR, opponent VARCHAR) ### ANSWER SELECT location FROM table_name_97 WHERE method = "decision" AND opponent = "nikos tsoukalas"</s>
{ "answer": "SELECT location FROM table_name_97 WHERE method = \"decision\" AND opponent = \"nikos tsoukalas\"", "context": "CREATE TABLE table_name_97 (location VARCHAR, method VARCHAR, opponent VARCHAR)", "question": "Which location has a method of decision and Nikos Tsoukalas for an opponent?" }
### QUESTION What is the first broadcast date of the episode in which Dave's team is made up of Dave Johns and Sally Lindsay? ### CONTEXT CREATE TABLE table_23292220_3 (first_broadcast VARCHAR, daves_team VARCHAR) ### ANSWER SELECT first_broadcast FROM table_23292220_3 WHERE daves_team = "Dave Johns and Sally Lindsay"</s>
{ "answer": "SELECT first_broadcast FROM table_23292220_3 WHERE daves_team = \"Dave Johns and Sally Lindsay\"", "context": "CREATE TABLE table_23292220_3 (first_broadcast VARCHAR, daves_team VARCHAR)", "question": "What is the first broadcast date of the episode in which Dave's team is made up of Dave Johns and Sally Lindsay?" }
### QUESTION What are the details and opening hours of the museums? ### CONTEXT CREATE TABLE TOURIST_ATTRACTIONS (Opening_Hours VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE MUSEUMS (Museum_Details VARCHAR, Museum_ID VARCHAR) ### ANSWER SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID</s>
{ "answer": "SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID", "context": "CREATE TABLE TOURIST_ATTRACTIONS (Opening_Hours VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE MUSEUMS (Museum_Details VARCHAR, Museum_ID VARCHAR)", "question": "What are the details and opening hours of the museums?" }
### QUESTION In how many episodes was Dave's team made up of David Walliams and Louis Walsh? ### CONTEXT CREATE TABLE table_23292220_3 (episode VARCHAR, daves_team VARCHAR) ### ANSWER SELECT COUNT(episode) FROM table_23292220_3 WHERE daves_team = "David Walliams and Louis Walsh"</s>
{ "answer": "SELECT COUNT(episode) FROM table_23292220_3 WHERE daves_team = \"David Walliams and Louis Walsh\"", "context": "CREATE TABLE table_23292220_3 (episode VARCHAR, daves_team VARCHAR)", "question": "In how many episodes was Dave's team made up of David Walliams and Louis Walsh?" }
### QUESTION What are the names and descriptions of the photos taken at the tourist attraction "film festival"? ### CONTEXT CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, Name VARCHAR); CREATE TABLE PHOTOS (Name VARCHAR, Description VARCHAR, Tourist_Attraction_ID VARCHAR) ### ANSWER SELECT T1.Name, T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = "film festival"</s>
{ "answer": "SELECT T1.Name, T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = \"film festival\"", "context": "CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, Name VARCHAR); CREATE TABLE PHOTOS (Name VARCHAR, Description VARCHAR, Tourist_Attraction_ID VARCHAR)", "question": "What are the names and descriptions of the photos taken at the tourist attraction \"film festival\"?" }
### QUESTION Which episode has boy george and lee mack on dave's team? ### CONTEXT CREATE TABLE table_23292220_4 (episode VARCHAR, daves_team VARCHAR) ### ANSWER SELECT episode FROM table_23292220_4 WHERE daves_team = "Boy George and Lee Mack"</s>
{ "answer": "SELECT episode FROM table_23292220_4 WHERE daves_team = \"Boy George and Lee Mack\"", "context": "CREATE TABLE table_23292220_4 (episode VARCHAR, daves_team VARCHAR)", "question": "Which episode has boy george and lee mack on dave's team?" }
### QUESTION What are the details and ways to get to tourist attractions related to royal family? ### CONTEXT CREATE TABLE TOURIST_ATTRACTIONS (How_to_Get_There VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE ROYAL_FAMILY (Royal_Family_Details VARCHAR, Royal_Family_ID VARCHAR) ### ANSWER SELECT T1.Royal_Family_Details, T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID</s>
{ "answer": "SELECT T1.Royal_Family_Details, T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID", "context": "CREATE TABLE TOURIST_ATTRACTIONS (How_to_Get_There VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE ROYAL_FAMILY (Royal_Family_Details VARCHAR, Royal_Family_ID VARCHAR)", "question": "What are the details and ways to get to tourist attractions related to royal family?" }
### QUESTION What is the name of the tourist attraction that is associated with the photo "game1"? ### CONTEXT CREATE TABLE TOURIST_ATTRACTIONS (Name VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE PHOTOS (Tourist_Attraction_ID VARCHAR, Name VARCHAR) ### ANSWER SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = "game1"</s>
{ "answer": "SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = \"game1\"", "context": "CREATE TABLE TOURIST_ATTRACTIONS (Name VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE PHOTOS (Tourist_Attraction_ID VARCHAR, Name VARCHAR)", "question": "What is the name of the tourist attraction that is associated with the photo \"game1\"?" }
### QUESTION What are the details of the markets that can be accessed by walk or bus? ### CONTEXT CREATE TABLE Street_Markets (Market_Details VARCHAR, Market_ID VARCHAR); CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, How_to_Get_There VARCHAR) ### ANSWER SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "walk" OR T2.How_to_Get_There = "bus"</s>
{ "answer": "SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = \"walk\" OR T2.How_to_Get_There = \"bus\"", "context": "CREATE TABLE Street_Markets (Market_Details VARCHAR, Market_ID VARCHAR); CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, How_to_Get_There VARCHAR)", "question": "What are the details of the markets that can be accessed by walk or bus?" }
### QUESTION What was the score in the episode with john barrowman and vic reeves on sean's team? ### CONTEXT CREATE TABLE table_23292220_4 (scores VARCHAR, seans_team VARCHAR) ### ANSWER SELECT scores FROM table_23292220_4 WHERE seans_team = "John Barrowman and Vic Reeves"</s>
{ "answer": "SELECT scores FROM table_23292220_4 WHERE seans_team = \"John Barrowman and Vic Reeves\"", "context": "CREATE TABLE table_23292220_4 (scores VARCHAR, seans_team VARCHAR)", "question": "What was the score in the episode with john barrowman and vic reeves on sean's team?" }
### QUESTION Which tourist attractions does the visitor with detail 'Vincent' visit? ### CONTEXT CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE VISITORS (Tourist_ID VARCHAR, Tourist_Details VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) ### ANSWER SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = "Vincent"</s>
{ "answer": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = \"Vincent\"", "context": "CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE VISITORS (Tourist_ID VARCHAR, Tourist_Details VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR)", "question": "Which tourist attractions does the visitor with detail 'Vincent' visit?" }
### QUESTION What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there? ### CONTEXT CREATE TABLE VISITORS (Tourist_ID VARCHAR, Tourist_Details VARCHAR); CREATE TABLE VISITS (Visit_Date VARCHAR, Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) ### ANSWER SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Vincent" OR T2.Tourist_Details = "Vivian"</s>
{ "answer": "SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Vincent\" OR T2.Tourist_Details = \"Vivian\"", "context": "CREATE TABLE VISITORS (Tourist_ID VARCHAR, Tourist_Details VARCHAR); CREATE TABLE VISITS (Visit_Date VARCHAR, Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR)", "question": "What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there?" }
### QUESTION Name the first broadcast for tina malone and joe wilkinson ### CONTEXT CREATE TABLE table_23292220_17 (first_broadcast VARCHAR, seans_team VARCHAR) ### ANSWER SELECT first_broadcast FROM table_23292220_17 WHERE seans_team = "Tina Malone and Joe Wilkinson"</s>
{ "answer": "SELECT first_broadcast FROM table_23292220_17 WHERE seans_team = \"Tina Malone and Joe Wilkinson\"", "context": "CREATE TABLE table_23292220_17 (first_broadcast VARCHAR, seans_team VARCHAR)", "question": "Name the first broadcast for tina malone and joe wilkinson" }
### QUESTION What fourth-place has 2 (1999, 2005) as the runner(s)-up? ### CONTEXT CREATE TABLE table_name_26 (fourth_place VARCHAR, runners_up VARCHAR) ### ANSWER SELECT fourth_place FROM table_name_26 WHERE runners_up = "2 (1999, 2005)"</s>
{ "answer": "SELECT fourth_place FROM table_name_26 WHERE runners_up = \"2 (1999, 2005)\"", "context": "CREATE TABLE table_name_26 (fourth_place VARCHAR, runners_up VARCHAR)", "question": "What fourth-place has 2 (1999, 2005) as the runner(s)-up?" }
### QUESTION Show the details and star ratings of the 3 least expensive hotels. ### CONTEXT CREATE TABLE HOTELS (other_hotel_details VARCHAR, star_rating_code VARCHAR, price_range VARCHAR) ### ANSWER SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range LIMIT 3</s>
{ "answer": "SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range LIMIT 3", "context": "CREATE TABLE HOTELS (other_hotel_details VARCHAR, star_rating_code VARCHAR, price_range VARCHAR)", "question": "Show the details and star ratings of the 3 least expensive hotels." }
### QUESTION In how many episodes were Vanessa Feltz and Lee Mack the team for Sean? ### CONTEXT CREATE TABLE table_23292220_6 (episode VARCHAR, seans_team VARCHAR) ### ANSWER SELECT COUNT(episode) FROM table_23292220_6 WHERE seans_team = "Vanessa Feltz and Lee Mack"</s>
{ "answer": "SELECT COUNT(episode) FROM table_23292220_6 WHERE seans_team = \"Vanessa Feltz and Lee Mack\"", "context": "CREATE TABLE table_23292220_6 (episode VARCHAR, seans_team VARCHAR)", "question": "In how many episodes were Vanessa Feltz and Lee Mack the team for Sean? " }
### QUESTION Show the description and code of the attraction type most tourist attractions belong to. ### CONTEXT CREATE TABLE Ref_Attraction_Types (Attraction_Type_Description VARCHAR, Attraction_Type_Code VARCHAR); CREATE TABLE Tourist_Attractions (Attraction_Type_Code VARCHAR) ### ANSWER SELECT T1.Attraction_Type_Description, T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT T1.Attraction_Type_Description, T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE Ref_Attraction_Types (Attraction_Type_Description VARCHAR, Attraction_Type_Code VARCHAR); CREATE TABLE Tourist_Attractions (Attraction_Type_Code VARCHAR)", "question": "Show the description and code of the attraction type most tourist attractions belong to." }
### QUESTION Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way. ### CONTEXT CREATE TABLE Tourist_Attractions (How_to_Get_There VARCHAR) ### ANSWER SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There</s>
{ "answer": "SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There", "context": "CREATE TABLE Tourist_Attractions (How_to_Get_There VARCHAR)", "question": "Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way." }
### QUESTION Show different tourist attractions' names, ids, and the corresponding number of visits. ### CONTEXT CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) ### ANSWER SELECT T1.Name, T2.Tourist_Attraction_ID, COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID</s>
{ "answer": "SELECT T1.Name, T2.Tourist_Attraction_ID, COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID", "context": "CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR)", "question": "Show different tourist attractions' names, ids, and the corresponding number of visits." }
### QUESTION Show the names and ids of tourist attractions that are visited at least two times. ### CONTEXT CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) ### ANSWER SELECT T1.Name, T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) >= 2</s>
{ "answer": "SELECT T1.Name, T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) >= 2", "context": "CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR)", "question": "Show the names and ids of tourist attractions that are visited at least two times." }
### QUESTION Show the names and ids of tourist attractions that are visited at most once. ### CONTEXT CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) ### ANSWER SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) <= 1</s>
{ "answer": "SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) <= 1", "context": "CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR)", "question": "Show the names and ids of tourist attractions that are visited at most once." }
### QUESTION What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent? ### CONTEXT CREATE TABLE Tourist_Attractions (Name VARCHAR, Location_ID VARCHAR, How_to_Get_There VARCHAR); CREATE TABLE Locations (Location_ID VARCHAR, Address VARCHAR) ### ANSWER SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = "660 Shea Crescent" OR T2.How_to_Get_There = "walk"</s>
{ "answer": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = \"660 Shea Crescent\" OR T2.How_to_Get_There = \"walk\"", "context": "CREATE TABLE Tourist_Attractions (Name VARCHAR, Location_ID VARCHAR, How_to_Get_There VARCHAR); CREATE TABLE Locations (Location_ID VARCHAR, Address VARCHAR)", "question": "What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?" }
### QUESTION What are the names of the tourist attractions that have parking or shopping as their feature details? ### CONTEXT CREATE TABLE Tourist_Attraction_Features (tourist_attraction_id VARCHAR, Feature_ID VARCHAR); CREATE TABLE Features (Feature_ID VARCHAR, feature_Details VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, tourist_attraction_id VARCHAR) ### ANSWER SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping'</s>
{ "answer": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping'", "context": "CREATE TABLE Tourist_Attraction_Features (tourist_attraction_id VARCHAR, Feature_ID VARCHAR); CREATE TABLE Features (Feature_ID VARCHAR, feature_Details VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, tourist_attraction_id VARCHAR)", "question": "What are the names of the tourist attractions that have parking or shopping as their feature details?" }
### QUESTION What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction? ### CONTEXT CREATE TABLE Tourist_Attractions (Name VARCHAR, Location_ID VARCHAR, How_to_Get_There VARCHAR); CREATE TABLE Locations (Location_ID VARCHAR, Address VARCHAR) ### ANSWER SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = "254 Ottilie Junction" OR T2.How_to_Get_There = "bus"</s>
{ "answer": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = \"254 Ottilie Junction\" OR T2.How_to_Get_There = \"bus\"", "context": "CREATE TABLE Tourist_Attractions (Name VARCHAR, Location_ID VARCHAR, How_to_Get_There VARCHAR); CREATE TABLE Locations (Location_ID VARCHAR, Address VARCHAR)", "question": "What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?" }
### QUESTION What are the names of the tourist attractions Vincent and Marcelle visit? ### CONTEXT CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE VISITORS (Tourist_Details VARCHAR, Tourist_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) ### ANSWER SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Vincent" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Marcelle"</s>
{ "answer": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Vincent\" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Marcelle\"", "context": "CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE VISITORS (Tourist_Details VARCHAR, Tourist_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR)", "question": "What are the names of the tourist attractions Vincent and Marcelle visit?" }
### QUESTION What are the names of tourist attraction that Alison visited but Rosalind did not visit? ### CONTEXT CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE VISITORS (Tourist_Details VARCHAR, Tourist_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) ### ANSWER SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Alison" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Rosalind"</s>
{ "answer": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Alison\" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Rosalind\"", "context": "CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE VISITORS (Tourist_Details VARCHAR, Tourist_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR)", "question": "What are the names of tourist attraction that Alison visited but Rosalind did not visit?" }
### QUESTION What school year is vaucluse public school? ### CONTEXT CREATE TABLE table_name_10 (years VARCHAR, school VARCHAR) ### ANSWER SELECT years FROM table_name_10 WHERE school = "vaucluse public school"</s>
{ "answer": "SELECT years FROM table_name_10 WHERE school = \"vaucluse public school\"", "context": "CREATE TABLE table_name_10 (years VARCHAR, school VARCHAR)", "question": "What school year is vaucluse public school?" }
### QUESTION What was the surface later than 1979, for the Melbourne Indoor, Australia, and the score was 2–6, 6–2, 6–2? ### CONTEXT CREATE TABLE table_name_75 (surface VARCHAR, score VARCHAR, date VARCHAR, championship VARCHAR) ### ANSWER SELECT surface FROM table_name_75 WHERE date > 1979 AND championship = "melbourne indoor, australia" AND score = "2–6, 6–2, 6–2"</s>
{ "answer": "SELECT surface FROM table_name_75 WHERE date > 1979 AND championship = \"melbourne indoor, australia\" AND score = \"2–6, 6–2, 6–2\"", "context": "CREATE TABLE table_name_75 (surface VARCHAR, score VARCHAR, date VARCHAR, championship VARCHAR)", "question": "What was the surface later than 1979, for the Melbourne Indoor, Australia, and the score was 2–6, 6–2, 6–2?" }
### QUESTION What was the original title for the film used in nomination of street days? ### CONTEXT CREATE TABLE table_name_91 (original_title VARCHAR, film_title_used_in_nomination VARCHAR) ### ANSWER SELECT original_title FROM table_name_91 WHERE film_title_used_in_nomination = "street days"</s>
{ "answer": "SELECT original_title FROM table_name_91 WHERE film_title_used_in_nomination = \"street days\"", "context": "CREATE TABLE table_name_91 (original_title VARCHAR, film_title_used_in_nomination VARCHAR)", "question": "What was the original title for the film used in nomination of street days?" }
### QUESTION Which Production in 2009 had a Result of Nominated at the Helpmann awards Award Ceremony? ### CONTEXT CREATE TABLE table_name_67 (production VARCHAR, award_ceremony VARCHAR, result VARCHAR, year VARCHAR) ### ANSWER SELECT production FROM table_name_67 WHERE result = "nominated" AND year = 2009 AND award_ceremony = "helpmann awards"</s>
{ "answer": "SELECT production FROM table_name_67 WHERE result = \"nominated\" AND year = 2009 AND award_ceremony = \"helpmann awards\"", "context": "CREATE TABLE table_name_67 (production VARCHAR, award_ceremony VARCHAR, result VARCHAR, year VARCHAR)", "question": "Which Production in 2009 had a Result of Nominated at the Helpmann awards Award Ceremony?" }
### QUESTION Who was the rider riding the Kawasaki ZX-6r, that rode less than 22 laps, and the grid was greater than 19, and retirement was the time? ### CONTEXT CREATE TABLE table_name_64 (rider VARCHAR, bike VARCHAR, time VARCHAR, laps VARCHAR, grid VARCHAR) ### ANSWER SELECT rider FROM table_name_64 WHERE laps < 22 AND grid > 19 AND time = "retirement" AND bike = "kawasaki zx-6r"</s>
{ "answer": "SELECT rider FROM table_name_64 WHERE laps < 22 AND grid > 19 AND time = \"retirement\" AND bike = \"kawasaki zx-6r\"", "context": "CREATE TABLE table_name_64 (rider VARCHAR, bike VARCHAR, time VARCHAR, laps VARCHAR, grid VARCHAR)", "question": "Who was the rider riding the Kawasaki ZX-6r, that rode less than 22 laps, and the grid was greater than 19, and retirement was the time?" }
### QUESTION How many points were there scored on October 27? ### CONTEXT CREATE TABLE table_23308178_4 (points INTEGER, date VARCHAR) ### ANSWER SELECT MAX(points) FROM table_23308178_4 WHERE date = "October 27"</s>
{ "answer": "SELECT MAX(points) FROM table_23308178_4 WHERE date = \"October 27\"", "context": "CREATE TABLE table_23308178_4 (points INTEGER, date VARCHAR)", "question": "How many points were there scored on October 27?" }
### QUESTION How many different scores are there for the game with 10-3-4 record? ### CONTEXT CREATE TABLE table_23308178_5 (score VARCHAR, record VARCHAR) ### ANSWER SELECT COUNT(score) FROM table_23308178_5 WHERE record = "10-3-4"</s>
{ "answer": "SELECT COUNT(score) FROM table_23308178_5 WHERE record = \"10-3-4\"", "context": "CREATE TABLE table_23308178_5 (score VARCHAR, record VARCHAR)", "question": "How many different scores are there for the game with 10-3-4 record?" }
### QUESTION Which exaltation has a fall of moon? ### CONTEXT CREATE TABLE table_name_21 (exaltation VARCHAR, fall VARCHAR) ### ANSWER SELECT exaltation FROM table_name_21 WHERE fall = "moon"</s>
{ "answer": "SELECT exaltation FROM table_name_21 WHERE fall = \"moon\"", "context": "CREATE TABLE table_name_21 (exaltation VARCHAR, fall VARCHAR)", "question": "Which exaltation has a fall of moon?" }
### QUESTION Show last names for all student who are on scholarship. ### CONTEXT CREATE TABLE Student (Lname VARCHAR, StuID VARCHAR); CREATE TABLE Sportsinfo (StuID VARCHAR, onscholarship VARCHAR) ### ANSWER SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'</s>
{ "answer": "SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'", "context": "CREATE TABLE Student (Lname VARCHAR, StuID VARCHAR); CREATE TABLE Sportsinfo (StuID VARCHAR, onscholarship VARCHAR)", "question": "Show last names for all student who are on scholarship." }
### QUESTION Which Nationality has a Previous team of new york knicks, and more than 3 Years of NBA experience? ### CONTEXT CREATE TABLE table_name_30 (nationality VARCHAR, previous_team VARCHAR, years_of_nba_experience_ VARCHAR, a_ VARCHAR) ### ANSWER SELECT nationality FROM table_name_30 WHERE previous_team = "new york knicks" AND years_of_nba_experience_[a_] > 3</s>
{ "answer": "SELECT nationality FROM table_name_30 WHERE previous_team = \"new york knicks\" AND years_of_nba_experience_[a_] > 3", "context": "CREATE TABLE table_name_30 (nationality VARCHAR, previous_team VARCHAR, years_of_nba_experience_ VARCHAR, a_ VARCHAR)", "question": "Which Nationality has a Previous team of new york knicks, and more than 3 Years of NBA experience?" }
### QUESTION What is the first name and last name of the student who have most number of sports? ### CONTEXT CREATE TABLE Student (Fname VARCHAR, Lname VARCHAR, StuID VARCHAR); CREATE TABLE Sportsinfo (StuID VARCHAR) ### ANSWER SELECT T2.Fname, T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT T2.Fname, T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE Student (Fname VARCHAR, Lname VARCHAR, StuID VARCHAR); CREATE TABLE Sportsinfo (StuID VARCHAR)", "question": "What is the first name and last name of the student who have most number of sports?" }
### QUESTION Which sport has most number of students on scholarship? ### CONTEXT CREATE TABLE Sportsinfo (sportname VARCHAR, onscholarship VARCHAR) ### ANSWER SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE Sportsinfo (sportname VARCHAR, onscholarship VARCHAR)", "question": "Which sport has most number of students on scholarship?" }
### QUESTION Who were the champions in years where michigan technological university was in third place? ### CONTEXT CREATE TABLE table_2331549_1 (champion VARCHAR, third_place VARCHAR) ### ANSWER SELECT champion FROM table_2331549_1 WHERE third_place = "Michigan Technological University"</s>
{ "answer": "SELECT champion FROM table_2331549_1 WHERE third_place = \"Michigan Technological University\"", "context": "CREATE TABLE table_2331549_1 (champion VARCHAR, third_place VARCHAR)", "question": "Who were the champions in years where michigan technological university was in third place?" }
### QUESTION Show all male student ids who don't play football. ### CONTEXT CREATE TABLE Sportsinfo (StuID VARCHAR, sex VARCHAR, sportname VARCHAR); CREATE TABLE Student (StuID VARCHAR, sex VARCHAR, sportname VARCHAR) ### ANSWER SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = "Football"</s>
{ "answer": "SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = \"Football\"", "context": "CREATE TABLE Sportsinfo (StuID VARCHAR, sex VARCHAR, sportname VARCHAR); CREATE TABLE Student (StuID VARCHAR, sex VARCHAR, sportname VARCHAR)", "question": "Show all male student ids who don't play football." }
### QUESTION Show total hours per week and number of games played for student David Shieber. ### CONTEXT CREATE TABLE Student (StuID VARCHAR, Fname VARCHAR, Lname VARCHAR); CREATE TABLE Sportsinfo (StuID VARCHAR) ### ANSWER SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = "David" AND T2.Lname = "Shieber"</s>
{ "answer": "SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = \"David\" AND T2.Lname = \"Shieber\"", "context": "CREATE TABLE Student (StuID VARCHAR, Fname VARCHAR, Lname VARCHAR); CREATE TABLE Sportsinfo (StuID VARCHAR)", "question": "Show total hours per week and number of games played for student David Shieber." }
### QUESTION What is 2011, when 2012 is "1R"? ### CONTEXT CREATE TABLE table_name_73 (Id VARCHAR) ### ANSWER SELECT 2011 FROM table_name_73 WHERE 2012 = "1r"</s>
{ "answer": "SELECT 2011 FROM table_name_73 WHERE 2012 = \"1r\"", "context": "CREATE TABLE table_name_73 (Id VARCHAR)", "question": "What is 2011, when 2012 is \"1R\"?" }
### QUESTION Show all game names played by Linda Smith ### CONTEXT CREATE TABLE Student (Stuid VARCHAR, Lname VARCHAR, Fname VARCHAR); CREATE TABLE Plays_games (gameid VARCHAR, Stuid VARCHAR); CREATE TABLE Video_games (gameid VARCHAR) ### ANSWER SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = "Smith" AND T3.Fname = "Linda"</s>
{ "answer": "SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = \"Smith\" AND T3.Fname = \"Linda\"", "context": "CREATE TABLE Student (Stuid VARCHAR, Lname VARCHAR, Fname VARCHAR); CREATE TABLE Plays_games (gameid VARCHAR, Stuid VARCHAR); CREATE TABLE Video_games (gameid VARCHAR)", "question": "Show all game names played by Linda Smith" }
### QUESTION Find the last and first name of students who are playing Football or Lacrosse. ### CONTEXT CREATE TABLE SportsInfo (StuID VARCHAR, SportName VARCHAR); CREATE TABLE Student (lname VARCHAR, fname VARCHAR, StuID VARCHAR) ### ANSWER SELECT T2.lname, T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = "Football" OR T1.SportName = "Lacrosse"</s>
{ "answer": "SELECT T2.lname, T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = \"Football\" OR T1.SportName = \"Lacrosse\"", "context": "CREATE TABLE SportsInfo (StuID VARCHAR, SportName VARCHAR); CREATE TABLE Student (lname VARCHAR, fname VARCHAR, StuID VARCHAR)", "question": "Find the last and first name of students who are playing Football or Lacrosse." }
### QUESTION Find the first name and age of the students who are playing both Football and Lacrosse. ### CONTEXT CREATE TABLE Student (fname VARCHAR, age VARCHAR, StuID VARCHAR, SportName VARCHAR); CREATE TABLE Sportsinfo (fname VARCHAR, age VARCHAR, StuID VARCHAR, SportName VARCHAR) ### ANSWER SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = "Football" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = "Lacrosse")</s>
{ "answer": "SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = \"Football\" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = \"Lacrosse\")", "context": "CREATE TABLE Student (fname VARCHAR, age VARCHAR, StuID VARCHAR, SportName VARCHAR); CREATE TABLE Sportsinfo (fname VARCHAR, age VARCHAR, StuID VARCHAR, SportName VARCHAR)", "question": "Find the first name and age of the students who are playing both Football and Lacrosse." }
### QUESTION Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games. ### CONTEXT CREATE TABLE Plays_games (StuID VARCHAR, GameID VARCHAR); CREATE TABLE Student (lname VARCHAR, sex VARCHAR, StuID VARCHAR); CREATE TABLE Video_games (GameID VARCHAR, Gname VARCHAR) ### ANSWER SELECT lname, sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = "Call of Destiny" INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = "Works of Widenius")</s>
{ "answer": "SELECT lname, sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = \"Call of Destiny\" INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = \"Works of Widenius\")", "context": "CREATE TABLE Plays_games (StuID VARCHAR, GameID VARCHAR); CREATE TABLE Student (lname VARCHAR, sex VARCHAR, StuID VARCHAR); CREATE TABLE Video_games (GameID VARCHAR, Gname VARCHAR)", "question": "Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games." }
### QUESTION How many seasons have motopark team? ### CONTEXT CREATE TABLE table_23338693_1 (season VARCHAR, team VARCHAR) ### ANSWER SELECT COUNT(season) FROM table_23338693_1 WHERE team = "Motopark"</s>
{ "answer": "SELECT COUNT(season) FROM table_23338693_1 WHERE team = \"Motopark\"", "context": "CREATE TABLE table_23338693_1 (season VARCHAR, team VARCHAR)", "question": "How many seasons have motopark team?" }
### QUESTION What are the names of customers using the most popular payment method? ### CONTEXT CREATE TABLE customers (customer_name VARCHAR, payment_method VARCHAR) ### ANSWER SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1)</s>
{ "answer": "SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1)", "context": "CREATE TABLE customers (customer_name VARCHAR, payment_method VARCHAR)", "question": "What are the names of customers using the most popular payment method?" }
### QUESTION What Colors has a School of zeigler high school? ### CONTEXT CREATE TABLE table_name_17 (colors VARCHAR, school VARCHAR) ### ANSWER SELECT colors FROM table_name_17 WHERE school = "zeigler high school"</s>
{ "answer": "SELECT colors FROM table_name_17 WHERE school = \"zeigler high school\"", "context": "CREATE TABLE table_name_17 (colors VARCHAR, school VARCHAR)", "question": "What Colors has a School of zeigler high school?" }
### QUESTION How many games did janae stokes play? ### CONTEXT CREATE TABLE table_23346303_4 (games_played INTEGER, player VARCHAR) ### ANSWER SELECT MAX(games_played) FROM table_23346303_4 WHERE player = "Janae Stokes"</s>
{ "answer": "SELECT MAX(games_played) FROM table_23346303_4 WHERE player = \"Janae Stokes\"", "context": "CREATE TABLE table_23346303_4 (games_played INTEGER, player VARCHAR)", "question": "How many games did janae stokes play?" }
### QUESTION What is the address content of the customer named "Maudie Kertzmann"? ### CONTEXT CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE addresses (address_content VARCHAR, address_id VARCHAR) ### ANSWER SELECT t3.address_content 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 t1.customer_name = "Maudie Kertzmann"</s>
{ "answer": "SELECT t3.address_content 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 t1.customer_name = \"Maudie Kertzmann\"", "context": "CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE addresses (address_content VARCHAR, address_id VARCHAR)", "question": "What is the address content of the customer named \"Maudie Kertzmann\"?" }
### QUESTION How many customers are living in city "Lake Geovannyton"? ### CONTEXT CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (address_id VARCHAR, city VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR) ### ANSWER SELECT COUNT(*) 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.city = "Lake Geovannyton"</s>
{ "answer": "SELECT COUNT(*) 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.city = \"Lake Geovannyton\"", "context": "CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (address_id VARCHAR, city VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR)", "question": "How many customers are living in city \"Lake Geovannyton\"?" }
### QUESTION Find the name of customers who are living in Colorado? ### CONTEXT CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE addresses (address_id VARCHAR, state_province_county VARCHAR) ### ANSWER 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 = "Colorado"</s>
{ "answer": "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 = \"Colorado\"", "context": "CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE addresses (address_id VARCHAR, state_province_county VARCHAR)", "question": "Find the name of customers who are living in Colorado?" }
### QUESTION Find the list of cities that no customer is living in. ### CONTEXT CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (city VARCHAR, address_id VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE addresses (city VARCHAR) ### ANSWER SELECT city FROM addresses WHERE NOT city IN (SELECT DISTINCT t3.city 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)</s>
{ "answer": "SELECT city FROM addresses WHERE NOT city IN (SELECT DISTINCT t3.city 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)", "context": "CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (city VARCHAR, address_id VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE addresses (city VARCHAR)", "question": "Find the list of cities that no customer is living in." }
### QUESTION Which city has the most customers living in? ### CONTEXT CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (city VARCHAR, address_id VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR) ### ANSWER SELECT t3.city 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 GROUP BY t3.city ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT t3.city 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 GROUP BY t3.city ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (city VARCHAR, address_id VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR)", "question": "Which city has the most customers living in?" }
### QUESTION What is 18-49, when Weekly Winner is "Youth Counselor Justin Meece"? ### CONTEXT CREATE TABLE table_name_45 (weekly_winner VARCHAR) ### ANSWER SELECT 18 AS _49 FROM table_name_45 WHERE weekly_winner = "youth counselor justin meece"</s>
{ "answer": "SELECT 18 AS _49 FROM table_name_45 WHERE weekly_winner = \"youth counselor justin meece\"", "context": "CREATE TABLE table_name_45 (weekly_winner VARCHAR)", "question": "What is 18-49, when Weekly Winner is \"Youth Counselor Justin Meece\"?" }
### QUESTION Which contact channel has been used by the customer with name "Tillman Ernser"? ### CONTEXT CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE customer_contact_channels (customer_id VARCHAR) ### ANSWER SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Tillman Ernser"</s>
{ "answer": "SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Tillman Ernser\"", "context": "CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE customer_contact_channels (customer_id VARCHAR)", "question": "Which contact channel has been used by the customer with name \"Tillman Ernser\"?" }
### QUESTION What is the "active to date" of the latest contact channel used by "Tillman Ernser"? ### CONTEXT CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE customer_contact_channels (active_to_date INTEGER, customer_id VARCHAR) ### ANSWER SELECT MAX(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Tillman Ernser"</s>
{ "answer": "SELECT MAX(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Tillman Ernser\"", "context": "CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE customer_contact_channels (active_to_date INTEGER, customer_id VARCHAR)", "question": "What is the \"active to date\" of the latest contact channel used by \"Tillman Ernser\"?" }
### QUESTION List all the results for mahmoud ahmadinejad when candidate mir-hossein mousavi obtained 218481 votes. ### CONTEXT CREATE TABLE table_23390604_1 (mahmoud_ahmadinejad VARCHAR, mir_hossein_mousavi VARCHAR) ### ANSWER SELECT mahmoud_ahmadinejad FROM table_23390604_1 WHERE mir_hossein_mousavi = 218481</s>
{ "answer": "SELECT mahmoud_ahmadinejad FROM table_23390604_1 WHERE mir_hossein_mousavi = 218481", "context": "CREATE TABLE table_23390604_1 (mahmoud_ahmadinejad VARCHAR, mir_hossein_mousavi VARCHAR)", "question": "List all the results for mahmoud ahmadinejad when candidate mir-hossein mousavi obtained 218481 votes." }
### QUESTION What is the channel code and contact number of the customer contact channel that was active for the longest time? ### CONTEXT CREATE TABLE customer_contact_channels (channel_code VARCHAR, contact_number VARCHAR, active_to_date VARCHAR, active_from_date VARCHAR) ### ANSWER SELECT channel_code, contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1)</s>
{ "answer": "SELECT channel_code, contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1)", "context": "CREATE TABLE customer_contact_channels (channel_code VARCHAR, contact_number VARCHAR, active_to_date VARCHAR, active_from_date VARCHAR)", "question": "What is the channel code and contact number of the customer contact channel that was active for the longest time?" }
### QUESTION Find the name and active date of the customer that use email as the contact channel. ### CONTEXT CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_contact_channels (active_from_date VARCHAR, customer_id VARCHAR, channel_code VARCHAR) ### ANSWER SELECT t1.customer_name, t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email'</s>
{ "answer": "SELECT t1.customer_name, t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email'", "context": "CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_contact_channels (active_from_date VARCHAR, customer_id VARCHAR, channel_code VARCHAR)", "question": "Find the name and active date of the customer that use email as the contact channel." }
### QUESTION What is the name of the customer that made the order with the largest quantity? ### CONTEXT CREATE TABLE order_items (order_id VARCHAR, order_quantity INTEGER); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE order_items (order_quantity INTEGER); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR) ### ANSWER SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = (SELECT MAX(order_quantity) FROM order_items)</s>
{ "answer": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = (SELECT MAX(order_quantity) FROM order_items)", "context": "CREATE TABLE order_items (order_id VARCHAR, order_quantity INTEGER); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE order_items (order_quantity INTEGER); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)", "question": "What is the name of the customer that made the order with the largest quantity?" }
### QUESTION What is the name of the customer that has purchased the most items? ### CONTEXT CREATE TABLE order_items (order_id VARCHAR, order_quantity INTEGER); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR) ### ANSWER SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) DESC LIMIT 1</s>
{ "answer": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) DESC LIMIT 1", "context": "CREATE TABLE order_items (order_id VARCHAR, order_quantity INTEGER); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)", "question": "What is the name of the customer that has purchased the most items?" }
### QUESTION What is the payment method of the customer that has purchased the least quantity of items? ### CONTEXT CREATE TABLE order_items (order_id VARCHAR, order_quantity INTEGER); CREATE TABLE customers (payment_method VARCHAR, customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR) ### ANSWER SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) LIMIT 1</s>
{ "answer": "SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) LIMIT 1", "context": "CREATE TABLE order_items (order_id VARCHAR, order_quantity INTEGER); CREATE TABLE customers (payment_method VARCHAR, customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)", "question": "What is the payment method of the customer that has purchased the least quantity of items?" }
### QUESTION How many types of products have Rodrick Heaney bought in total? ### CONTEXT CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE order_items (product_id VARCHAR, order_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR) ### ANSWER SELECT COUNT(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = "Rodrick Heaney"</s>
{ "answer": "SELECT COUNT(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = \"Rodrick Heaney\"", "context": "CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE order_items (product_id VARCHAR, order_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)", "question": "How many types of products have Rodrick Heaney bought in total?" }
### QUESTION What is the total quantity of products purchased by "Rodrick Heaney"? ### CONTEXT CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE order_items (order_quantity INTEGER, order_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR) ### ANSWER SELECT SUM(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = "Rodrick Heaney"</s>
{ "answer": "SELECT SUM(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = \"Rodrick Heaney\"", "context": "CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE order_items (order_quantity INTEGER, order_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)", "question": "What is the total quantity of products purchased by \"Rodrick Heaney\"?" }
### QUESTION What was the highest number of votes for mir-hossein mousavi when the number of invalid votes is 5683 ### CONTEXT CREATE TABLE table_23390604_1 (mir_hossein_mousavi INTEGER, spoiled_ballots VARCHAR) ### ANSWER SELECT MAX(mir_hossein_mousavi) FROM table_23390604_1 WHERE spoiled_ballots = 5683</s>
{ "answer": "SELECT MAX(mir_hossein_mousavi) FROM table_23390604_1 WHERE spoiled_ballots = 5683", "context": "CREATE TABLE table_23390604_1 (mir_hossein_mousavi INTEGER, spoiled_ballots VARCHAR)", "question": "What was the highest number of votes for mir-hossein mousavi when the number of invalid votes is 5683" }
### QUESTION When relay is the station type and 5kw is the power kw what is the branding? ### CONTEXT CREATE TABLE table_23394920_1 (branding VARCHAR, power_kw VARCHAR, station_type VARCHAR) ### ANSWER SELECT branding FROM table_23394920_1 WHERE power_kw = "5kW" AND station_type = "Relay"</s>
{ "answer": "SELECT branding FROM table_23394920_1 WHERE power_kw = \"5kW\" AND station_type = \"Relay\"", "context": "CREATE TABLE table_23394920_1 (branding VARCHAR, power_kw VARCHAR, station_type VARCHAR)", "question": "When relay is the station type and 5kw is the power kw what is the branding?" }
### QUESTION Find the customer name and date of the orders that have the status "Delivered". ### CONTEXT CREATE TABLE customer_orders (order_date VARCHAR, customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR) ### ANSWER SELECT t1.customer_name, t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = "Delivered"</s>
{ "answer": "SELECT t1.customer_name, t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = \"Delivered\"", "context": "CREATE TABLE customer_orders (order_date VARCHAR, customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR)", "question": "Find the customer name and date of the orders that have the status \"Delivered\"." }
### QUESTION What is the total number of products that are in orders with status "Cancelled"? ### CONTEXT CREATE TABLE customer_orders (order_id VARCHAR, order_status VARCHAR); CREATE TABLE order_items (order_quantity INTEGER, order_id VARCHAR) ### ANSWER SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = "Cancelled"</s>
{ "answer": "SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = \"Cancelled\"", "context": "CREATE TABLE customer_orders (order_id VARCHAR, order_status VARCHAR); CREATE TABLE order_items (order_quantity INTEGER, order_id VARCHAR)", "question": "What is the total number of products that are in orders with status \"Cancelled\"?" }
### QUESTION Find the total amount of products ordered before 2018-03-17 07:13:53. ### CONTEXT CREATE TABLE customer_orders (order_id VARCHAR, order_date INTEGER); CREATE TABLE order_items (order_quantity INTEGER, order_id VARCHAR) ### ANSWER SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < "2018-03-17 07:13:53"</s>
{ "answer": "SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < \"2018-03-17 07:13:53\"", "context": "CREATE TABLE customer_orders (order_id VARCHAR, order_date INTEGER); CREATE TABLE order_items (order_quantity INTEGER, order_id VARCHAR)", "question": "Find the total amount of products ordered before 2018-03-17 07:13:53." }
### QUESTION What is the score when the attendance is less than 83 and Raunds Town is the away team? ### CONTEXT CREATE TABLE table_name_91 (score VARCHAR, attendance VARCHAR, away_team VARCHAR) ### ANSWER SELECT score FROM table_name_91 WHERE attendance < 83 AND away_team = "raunds town"</s>
{ "answer": "SELECT score FROM table_name_91 WHERE attendance < 83 AND away_team = \"raunds town\"", "context": "CREATE TABLE table_name_91 (score VARCHAR, attendance VARCHAR, away_team VARCHAR)", "question": "What is the score when the attendance is less than 83 and Raunds Town is the away team?" }
### QUESTION Which product has been ordered most number of times? ### CONTEXT CREATE TABLE products (product_details VARCHAR, product_id VARCHAR); CREATE TABLE order_items (product_id VARCHAR) ### ANSWER SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE products (product_details VARCHAR, product_id VARCHAR); CREATE TABLE order_items (product_id VARCHAR)", "question": "Which product has been ordered most number of times?" }
### QUESTION Find the name and ID of the product whose total order quantity is the largest. ### CONTEXT CREATE TABLE order_items (product_id VARCHAR, order_quantity INTEGER); CREATE TABLE products (product_details VARCHAR, product_id VARCHAR) ### ANSWER SELECT t2.product_details, t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY SUM(t1.order_quantity) LIMIT 1</s>
{ "answer": "SELECT t2.product_details, t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY SUM(t1.order_quantity) LIMIT 1", "context": "CREATE TABLE order_items (product_id VARCHAR, order_quantity INTEGER); CREATE TABLE products (product_details VARCHAR, product_id VARCHAR)", "question": "Find the name and ID of the product whose total order quantity is the largest." }
### QUESTION Find all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona. ### CONTEXT CREATE TABLE addresses (address_content VARCHAR, city VARCHAR, state_province_county VARCHAR) ### ANSWER SELECT address_content FROM addresses WHERE city = "East Julianaside" AND state_province_county = "Texas" UNION SELECT address_content FROM addresses WHERE city = "Gleasonmouth" AND state_province_county = "Arizona"</s>
{ "answer": "SELECT address_content FROM addresses WHERE city = \"East Julianaside\" AND state_province_county = \"Texas\" UNION SELECT address_content FROM addresses WHERE city = \"Gleasonmouth\" AND state_province_county = \"Arizona\"", "context": "CREATE TABLE addresses (address_content VARCHAR, city VARCHAR, state_province_county VARCHAR)", "question": "Find all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona." }
### QUESTION What date did Episode 22 originally air? ### CONTEXT CREATE TABLE table_23392257_4 (original_airdate VARCHAR, _number VARCHAR) ### ANSWER SELECT COUNT(original_airdate) FROM table_23392257_4 WHERE _number = 22</s>
{ "answer": "SELECT COUNT(original_airdate) FROM table_23392257_4 WHERE _number = 22", "context": "CREATE TABLE table_23392257_4 (original_airdate VARCHAR, _number VARCHAR)", "question": "What date did Episode 22 originally air?" }
### QUESTION Find the names of customers who never ordered product Latte. ### CONTEXT CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_details VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR) ### ANSWER SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte'</s>
{ "answer": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte'", "context": "CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_details VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR)", "question": "Find the names of customers who never ordered product Latte." }
### QUESTION Find the names of customers who never placed an order. ### CONTEXT CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR) ### ANSWER SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id</s>
{ "answer": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id", "context": "CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR)", "question": "Find the names of customers who never placed an order." }
### QUESTION Find the names of customers who ordered both products Latte and Americano. ### CONTEXT CREATE TABLE products (product_id VARCHAR, product_details VARCHAR); CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR) ### ANSWER SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Americano'</s>
{ "answer": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Americano'", "context": "CREATE TABLE products (product_id VARCHAR, product_details VARCHAR); CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)", "question": "Find the names of customers who ordered both products Latte and Americano." }
### QUESTION WHAT IS THE POSITION WITH BOSTON RED SOX FOR COREY JENKINS? ### CONTEXT CREATE TABLE table_name_44 (position VARCHAR, team VARCHAR, player VARCHAR) ### ANSWER SELECT position FROM table_name_44 WHERE team = "boston red sox" AND player = "corey jenkins"</s>
{ "answer": "SELECT position FROM table_name_44 WHERE team = \"boston red sox\" AND player = \"corey jenkins\"", "context": "CREATE TABLE table_name_44 (position VARCHAR, team VARCHAR, player VARCHAR)", "question": "WHAT IS THE POSITION WITH BOSTON RED SOX FOR COREY JENKINS?" }
### QUESTION When dwhr-tv is the call sign how many station types are there? ### CONTEXT CREATE TABLE table_23394920_1 (station_type VARCHAR, callsign VARCHAR) ### ANSWER SELECT COUNT(station_type) FROM table_23394920_1 WHERE callsign = "DWHR-TV"</s>
{ "answer": "SELECT COUNT(station_type) FROM table_23394920_1 WHERE callsign = \"DWHR-TV\"", "context": "CREATE TABLE table_23394920_1 (station_type VARCHAR, callsign VARCHAR)", "question": "When dwhr-tv is the call sign how many station types are there?" }
### QUESTION Please show the date of ceremony of the volumes that last more than 2 weeks on top. ### CONTEXT CREATE TABLE music_festival (Date_of_ceremony VARCHAR, Volume VARCHAR); CREATE TABLE volume (Volume_ID VARCHAR, Weeks_on_Top INTEGER) ### ANSWER SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2</s>
{ "answer": "SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2", "context": "CREATE TABLE music_festival (Date_of_ceremony VARCHAR, Volume VARCHAR); CREATE TABLE volume (Volume_ID VARCHAR, Weeks_on_Top INTEGER)", "question": "Please show the date of ceremony of the volumes that last more than 2 weeks on top." }
### QUESTION How many values when the bearing or degrees is 67.6 - 82.5 82.6 - 97.5 97.6 - 112.5? ### CONTEXT CREATE TABLE table_23406517_2 (bearing___degrees VARCHAR) ### ANSWER SELECT COUNT(*) FROM table_23406517_2 WHERE bearing___degrees = "67.6 - 82.5 82.6 - 97.5 97.6 - 112.5"</s>
{ "answer": "SELECT COUNT(*) FROM table_23406517_2 WHERE bearing___degrees = \"67.6 - 82.5 82.6 - 97.5 97.6 - 112.5\"", "context": "CREATE TABLE table_23406517_2 (bearing___degrees VARCHAR)", "question": "How many values when the bearing or degrees is 67.6 - 82.5 82.6 - 97.5 97.6 - 112.5?" }
### QUESTION What is every trigram when direction is Northwest? ### CONTEXT CREATE TABLE table_23406517_2 (trigram VARCHAR, direction VARCHAR) ### ANSWER SELECT trigram FROM table_23406517_2 WHERE direction = "Northwest"</s>
{ "answer": "SELECT trigram FROM table_23406517_2 WHERE direction = \"Northwest\"", "context": "CREATE TABLE table_23406517_2 (trigram VARCHAR, direction VARCHAR)", "question": "What is every trigram when direction is Northwest?" }
### QUESTION What are the songs in volumes associated with the artist aged 32 or older? ### CONTEXT CREATE TABLE volume (Song VARCHAR, Artist_ID VARCHAR); CREATE TABLE artist (Artist_ID VARCHAR, age VARCHAR) ### ANSWER SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32</s>
{ "answer": "SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32", "context": "CREATE TABLE volume (Song VARCHAR, Artist_ID VARCHAR); CREATE TABLE artist (Artist_ID VARCHAR, age VARCHAR)", "question": "What are the songs in volumes associated with the artist aged 32 or older?" }
### QUESTION Count the lowest Year which has gas explosion, Colliery of tylorstown colliery, and a Death toll larger than 57? ### CONTEXT CREATE TABLE table_name_15 (year INTEGER, death_toll VARCHAR, cause VARCHAR, colliery VARCHAR) ### ANSWER SELECT MIN(year) FROM table_name_15 WHERE cause = "gas explosion" AND colliery = "tylorstown colliery" AND death_toll > 57</s>
{ "answer": "SELECT MIN(year) FROM table_name_15 WHERE cause = \"gas explosion\" AND colliery = \"tylorstown colliery\" AND death_toll > 57", "context": "CREATE TABLE table_name_15 (year INTEGER, death_toll VARCHAR, cause VARCHAR, colliery VARCHAR)", "question": "Count the lowest Year which has gas explosion, Colliery of tylorstown colliery, and a Death toll larger than 57?" }
### QUESTION What are the famous title of the artists associated with volumes with more than 2 weeks on top? ### CONTEXT CREATE TABLE artist (Famous_Title VARCHAR, Artist_ID VARCHAR); CREATE TABLE volume (Artist_ID VARCHAR, Weeks_on_Top INTEGER) ### ANSWER SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2</s>
{ "answer": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2", "context": "CREATE TABLE artist (Famous_Title VARCHAR, Artist_ID VARCHAR); CREATE TABLE volume (Artist_ID VARCHAR, Weeks_on_Top INTEGER)", "question": "What are the famous title of the artists associated with volumes with more than 2 weeks on top?" }
### QUESTION How many career titles does roy emerson have? ### CONTEXT CREATE TABLE table_23408094_14 (total_career_titles VARCHAR, player VARCHAR) ### ANSWER SELECT total_career_titles FROM table_23408094_14 WHERE player = "Roy Emerson"</s>
{ "answer": "SELECT total_career_titles FROM table_23408094_14 WHERE player = \"Roy Emerson\"", "context": "CREATE TABLE table_23408094_14 (total_career_titles VARCHAR, player VARCHAR)", "question": "How many career titles does roy emerson have?" }
### QUESTION When has a cause of gas explosion, a Death toll smaller than 63, and a Location of penygraig? ### CONTEXT CREATE TABLE table_name_60 (date VARCHAR, location VARCHAR, cause VARCHAR, death_toll VARCHAR) ### ANSWER SELECT date FROM table_name_60 WHERE cause = "gas explosion" AND death_toll < 63 AND location = "penygraig"</s>
{ "answer": "SELECT date FROM table_name_60 WHERE cause = \"gas explosion\" AND death_toll < 63 AND location = \"penygraig\"", "context": "CREATE TABLE table_name_60 (date VARCHAR, location VARCHAR, cause VARCHAR, death_toll VARCHAR)", "question": "When has a cause of gas explosion, a Death toll smaller than 63, and a Location of penygraig?" }
### QUESTION What is the highest episode# with the writer Paul West? ### CONTEXT CREATE TABLE table_2342078_2 (episode__number INTEGER, written_by VARCHAR) ### ANSWER SELECT MAX(episode__number) FROM table_2342078_2 WHERE written_by = "Paul West"</s>
{ "answer": "SELECT MAX(episode__number) FROM table_2342078_2 WHERE written_by = \"Paul West\"", "context": "CREATE TABLE table_2342078_2 (episode__number INTEGER, written_by VARCHAR)", "question": "What is the highest episode# with the writer Paul West?" }
### QUESTION Show the famous titles of the artists with both volumes that lasted more than 2 weeks on top and volumes that lasted less than 2 weeks on top. ### CONTEXT CREATE TABLE artist (Famous_Title VARCHAR, Artist_ID VARCHAR); CREATE TABLE volume (Artist_ID VARCHAR, Weeks_on_Top INTEGER) ### ANSWER SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2</s>
{ "answer": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2", "context": "CREATE TABLE artist (Famous_Title VARCHAR, Artist_ID VARCHAR); CREATE TABLE volume (Artist_ID VARCHAR, Weeks_on_Top INTEGER)", "question": "Show the famous titles of the artists with both volumes that lasted more than 2 weeks on top and volumes that lasted less than 2 weeks on top." }