chat_prompt
stringlengths
438
1.53k
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"p\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"from\" text,\n \"school_country\" text\n);\n\nQuestion: What position does the player from arkansas play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"p\" WHERE \"school_country\"='arkansas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the away side at glenferrie oval?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_11\" WHERE \"venue\"='glenferrie oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the away side's score when richmond is at home?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_11\" WHERE \"home_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: WHAT WAS THE HOME TEAM'S SCORE WHEN THEY HAD A CROWD GREATER THAN 20,000 AND PLAYED AGAINST COLLINGWOOD?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_7\" WHERE \"crowd\">'20,000' AND \"away_team\"='collingwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: AT WHAT VENUE DID THE HOME TEAM SCORE 10.11 (71)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_7\" WHERE \"home_team_score\"='10.11 (71)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: AT WHAT VENUE DID THE HOME TEAM SCORE 10.9 (69)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_7\" WHERE \"home_team_score\"='10.9 (69)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: WHAT HOME TEAM SCORED 9.11 (65)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_7\" WHERE \"home_team_score\"='9.11 (65)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the crowd size at Collingwood's match?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_6\" WHERE \"home_team\"='collingwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the crowd size at Arden Street Oval?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_6\" WHERE \"venue\"='arden street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_matches_between_the_home_n\" (\n \"date\" text,\n \"stadium\" text,\n \"fixture\" text,\n \"status_of_match\" text,\n \"score\" text\n);\n\nQuestion: What is the status of the match between Scotland v Northern Ireland?" }, { "role": "assistant", "content": "SELECT \"status_of_match\" FROM \"international_matches_between_the_home_n\" WHERE \"fixture\"='scotland v northern ireland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"exhibition_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: In what week was the game on August 10, 1956 played?" }, { "role": "assistant", "content": "SELECT AVG(\"week\") FROM \"exhibition_schedule\" WHERE \"date\"='august 10, 1956';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"exhibition_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance of the game in week 6?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"exhibition_schedule\" WHERE \"week\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"exhibition_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: In what week was the game on August 24, 1956 played in front of 40,175 fans?" }, { "role": "assistant", "content": "SELECT MAX(\"week\") FROM \"exhibition_schedule\" WHERE \"date\"='august 24, 1956' AND \"attendance\">'40,175';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"media\" (\n \"translator_call_letters\" text,\n \"b_mountain_channel\" text,\n \"laurel_mountain_channel\" text,\n \"psip\" text,\n \"station_call_letters\" text,\n \"network_affiliation_id\" text,\n \"original_channel\" text,\n \"signal_quality\" text\n);\n\nQuestion: What signal quality does the KCAL-DT channel have?" }, { "role": "assistant", "content": "SELECT \"signal_quality\" FROM \"media\" WHERE \"station_call_letters\"='kcal-dt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"media\" (\n \"translator_call_letters\" text,\n \"b_mountain_channel\" text,\n \"laurel_mountain_channel\" text,\n \"psip\" text,\n \"station_call_letters\" text,\n \"network_affiliation_id\" text,\n \"original_channel\" text,\n \"signal_quality\" text\n);\n\nQuestion: What original channel is associated with B Mountain Channel 9?" }, { "role": "assistant", "content": "SELECT \"original_channel\" FROM \"media\" WHERE \"b_mountain_channel\"='9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"media\" (\n \"translator_call_letters\" text,\n \"b_mountain_channel\" text,\n \"laurel_mountain_channel\" text,\n \"psip\" text,\n \"station_call_letters\" text,\n \"network_affiliation_id\" text,\n \"original_channel\" text,\n \"signal_quality\" text\n);\n\nQuestion: What B Mountain Channel has station call letters of k41go?" }, { "role": "assistant", "content": "SELECT \"b_mountain_channel\" FROM \"media\" WHERE \"station_call_letters\"='k41go';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"media\" (\n \"translator_call_letters\" text,\n \"b_mountain_channel\" text,\n \"laurel_mountain_channel\" text,\n \"psip\" text,\n \"station_call_letters\" text,\n \"network_affiliation_id\" text,\n \"original_channel\" text,\n \"signal_quality\" text\n);\n\nQuestion: What Laurel Mountain Channel is associated with B Mountain Channel of 7?" }, { "role": "assistant", "content": "SELECT \"laurel_mountain_channel\" FROM \"media\" WHERE \"b_mountain_channel\"='7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"media\" (\n \"translator_call_letters\" text,\n \"b_mountain_channel\" text,\n \"laurel_mountain_channel\" text,\n \"psip\" text,\n \"station_call_letters\" text,\n \"network_affiliation_id\" text,\n \"original_channel\" text,\n \"signal_quality\" text\n);\n\nQuestion: What are the translator call letters for station call letters of KCOP-DT?" }, { "role": "assistant", "content": "SELECT \"translator_call_letters\" FROM \"media\" WHERE \"station_call_letters\"='kcop-dt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What team was the away team with a score of 9.11 (65)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_12\" WHERE \"away_team_score\"='9.11 (65)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What date was fitzroy the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_12\" WHERE \"home_team\"='fitzroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score for the away team when the home team was richmond?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_12\" WHERE \"home_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the away team at the game at Arden Street Oval?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_6\" WHERE \"venue\"='arden street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the venue where the home team is Footscray?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_6\" WHERE \"home_team\"='footscray';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the venue for the game on 1 June 1929 where Richmond was the away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_6\" WHERE \"date\"='1 june 1929' AND \"away_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1971_isle_of_man_senior_tt_500cc_final_s\" (\n \"place\" real,\n \"rider\" text,\n \"country\" text,\n \"machine\" text,\n \"speed\" text,\n \"time\" text,\n \"points\" real\n);\n\nQuestion: What was the speed of the rider that earned 1 point?" }, { "role": "assistant", "content": "SELECT \"speed\" FROM \"1971_isle_of_man_senior_tt_500cc_final_s\" WHERE \"points\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"blue_team\" (\n \"learner_driver\" text,\n \"partner\" text,\n \"driver_s_age\" real,\n \"years_on_learners\" real,\n \"licence_test_attempts\" real,\n \"passed_yet\" text\n);\n\nQuestion: Which partner has fewer than 17 years on learners and a driver's age over 32?" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"blue_team\" WHERE \"years_on_learners\"<17 AND \"driver_s_age\">32;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What away team is playing at the Brunswick Street Oval Venue?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_16\" WHERE \"venue\"='brunswick street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What date does the Home team of Richmond have?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_16\" WHERE \"home_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the home team at Victoria Park on 20 April 1957?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_1\" WHERE \"date\"='20 april 1957' AND \"venue\"='victoria park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the home team at the game where the away team scored 6.14 (50)?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_1\" WHERE \"away_team_score\"='6.14 (50)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_stations\" (\n \"station\" text,\n \"municipality\" text,\n \"county\" text,\n \"former_railroad\" text,\n \"closed\" real\n);\n\nQuestion: What municipality is the Harmon Cove station located in?" }, { "role": "assistant", "content": "SELECT \"municipality\" FROM \"former_stations\" WHERE \"station\"='harmon cove';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_stations\" (\n \"station\" text,\n \"municipality\" text,\n \"county\" text,\n \"former_railroad\" text,\n \"closed\" real\n);\n\nQuestion: What municipality is the Benson Street station located in?" }, { "role": "assistant", "content": "SELECT \"municipality\" FROM \"former_stations\" WHERE \"station\"='benson street';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_30_12_18\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text\n);\n\nQuestion: What date shows corrado barazzutti's partner?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"doubles_30_12_18\" WHERE \"partner\"='corrado barazzutti';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_30_12_18\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text\n);\n\nQuestion: Which date has the tom gullikson butch walts final, and who was the runner-up?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"doubles_30_12_18\" WHERE \"outcome\"='runner-up' AND \"opponents_in_the_final\"='tom gullikson butch walts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the home team of the game against Essendon?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_6\" WHERE \"away_team\"='essendon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"sideline_reporter_s\" text\n);\n\nQuestion: Who is the color commentator for ESPN from 1990 to 1992?" }, { "role": "assistant", "content": "SELECT \"color_commentator_s\" FROM \"1990s\" WHERE \"network\"='espn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"sideline_reporter_s\" text\n);\n\nQuestion: Who was the sideline reporter prior to 1993?" }, { "role": "assistant", "content": "SELECT \"sideline_reporter_s\" FROM \"1990s\" WHERE \"year\"<1993;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"sideline_reporter_s\" text\n);\n\nQuestion: Who was the play by play commentator for ABC after 1998?" }, { "role": "assistant", "content": "SELECT \"play_by_play\" FROM \"1990s\" WHERE \"network\"='abc' AND \"year\">1998;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"sideline_reporter_s\" text\n);\n\nQuestion: What's the earliest year that Al Michaels was the play-by-play commentator, in which Lesley Visser and Dan Fouts were also sideline reporters?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"1990s\" WHERE \"play_by_play\"='al michaels' AND \"sideline_reporter_s\"='lesley visser and dan fouts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"sideline_reporter_s\" text\n);\n\nQuestion: For how many years combined were Frank Gifford and Dan Dierdorf color commentators?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"1990s\" WHERE \"color_commentator_s\"='frank gifford and dan dierdorf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"sideline_reporter_s\" text\n);\n\nQuestion: Which sideline reporters worked alongside Frank Gifford and Dan Dierdorf?" }, { "role": "assistant", "content": "SELECT \"sideline_reporter_s\" FROM \"1990s\" WHERE \"color_commentator_s\"='frank gifford and dan dierdorf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"southern_railway_batch\" (\n \"br_no\" real,\n \"sr_no\" text,\n \"name\" text,\n \"builder\" text,\n \"whenbuilt\" text,\n \"withdrawn\" text\n);\n\nQuestion: When was the Lundy withdrawn?" }, { "role": "assistant", "content": "SELECT \"withdrawn\" FROM \"southern_railway_batch\" WHERE \"name\"='lundy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"southern_railway_batch\" (\n \"br_no\" real,\n \"sr_no\" text,\n \"name\" text,\n \"builder\" text,\n \"whenbuilt\" text,\n \"withdrawn\" text\n);\n\nQuestion: When was the locomotive named fighter command built?" }, { "role": "assistant", "content": "SELECT \"whenbuilt\" FROM \"southern_railway_batch\" WHERE \"name\"='fighter command';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which country has a rand of 2 and a silver less than 6?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"medal_table\" WHERE \"rank\"='2' AND \"silver\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest total of medals that has a gold of 3 and a silver less than 3?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"gold\"=3 AND \"silver\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the average size of the crowd for games where the home team had a score of 10.10 (70)?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_17\" WHERE \"home_team_score\"='10.10 (70)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team score for the game played at MCG?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_17\" WHERE \"venue\"='mcg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: For the game played at Windy Hill, who was the away team?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_17\" WHERE \"venue\"='windy hill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: For the game where the away team was North Melbourne, what was the venue?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_17\" WHERE \"away_team\"='north melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_squad\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"2012_club\" text\n);\n\nQuestion: What is the Weight for the 2012 club, Victorian Tigers?" }, { "role": "assistant", "content": "SELECT \"weight\" FROM \"current_squad\" WHERE \"2012_club\"='victorian tigers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_squad\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"2012_club\" text\n);\n\nQuestion: What is the Weight for the Name Billy Miller Category:Articles with hcards?" }, { "role": "assistant", "content": "SELECT \"weight\" FROM \"current_squad\" WHERE \"name\"='billy miller category:articles with hcards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_squad\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"2012_club\" text\n);\n\nQuestion: What is the 2012 club for the Billy Miller Category:Articles with hcards (Name)?" }, { "role": "assistant", "content": "SELECT \"2012_club\" FROM \"current_squad\" WHERE \"name\"='billy miller category:articles with hcards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many medals did China receive?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"medals_table\" WHERE \"nation\"='china';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"general_election\" real,\n \"num_of_candidates\" real,\n \"num_of_seats_won\" real,\n \"pct_of_popular_vote\" text,\n \"result\" text\n);\n\nQuestion: What is the # of candidates that have a popular vote of 41.37%?" }, { "role": "assistant", "content": "SELECT AVG(\"num_of_candidates\") FROM \"general_election_results\" WHERE \"pct_of_popular_vote\"='41.37%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"general_election\" real,\n \"num_of_candidates\" real,\n \"num_of_seats_won\" real,\n \"pct_of_popular_vote\" text,\n \"result\" text\n);\n\nQuestion: What is the # of candidates of liberal majority with 51 wins and larger number of 2008 in general elections?" }, { "role": "assistant", "content": "SELECT AVG(\"num_of_candidates\") FROM \"general_election_results\" WHERE \"result\"='liberal majority' AND \"num_of_seats_won\"=51 AND \"general_election\">2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"general_election\" real,\n \"num_of_candidates\" real,\n \"num_of_seats_won\" real,\n \"pct_of_popular_vote\" text,\n \"result\" text\n);\n\nQuestion: How many general elections that have won smaller than 23 with candidates larger than 108?" }, { "role": "assistant", "content": "SELECT COUNT(\"general_election\") FROM \"general_election_results\" WHERE \"num_of_seats_won\"<23 AND \"num_of_candidates\">108;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue did melbourne play at as the away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_17\" WHERE \"away_team\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the essendon score when they were at home?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_17\" WHERE \"home_team\"='essendon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the date of the game where the home team score was 7.11 (53)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_17\" WHERE \"home_team_score\"='7.11 (53)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue did melbourne play at as the away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_17\" WHERE \"away_team\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"nationality\" text,\n \"position\" text,\n \"apps\" real,\n \"goals\" real,\n \"years\" text\n);\n\nQuestion: What Years have a Goal of 82?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"references\" WHERE \"goals\"=82;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_new_england_patriots_draft_selectio\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the total of overall values with a safety position in a round greater than 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"overall\") FROM \"1998_new_england_patriots_draft_selectio\" WHERE \"position\"='safety' AND \"round\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_new_england_patriots_draft_selectio\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the average overall value for a round less than 4 associated with the College of Georgia?" }, { "role": "assistant", "content": "SELECT AVG(\"overall\") FROM \"1998_new_england_patriots_draft_selectio\" WHERE \"round\"<4 AND \"college\"='georgia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the average attendance in weeks after 16?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"week\">16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011\" (\n \"incident_no\" text,\n \"date\" text,\n \"place\" text,\n \"killed\" real,\n \"injured\" real\n);\n\nQuestion: What is the highest number killed in incident #14?" }, { "role": "assistant", "content": "SELECT MAX(\"killed\") FROM \"2011\" WHERE \"incident_no\"='14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the crowd size when the away team scored 7.19 (61)?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_10\" WHERE \"away_team_score\"='7.19 (61)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the largest crowd at Arden Street Oval?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_10\" WHERE \"venue\"='arden street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home teams score at Arden Street Oval?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_10\" WHERE \"venue\"='arden street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the lowest crowd size when the away team scored 7.19 (61)?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_10\" WHERE \"away_team_score\"='7.19 (61)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the venue where the home team scored 11.12 (78)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_10\" WHERE \"home_team_score\"='11.12 (78)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What was the gold medal total for a total of 44 medals?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"total\">44;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silver medals were won with a total medal of 3 and a rank above 9?" }, { "role": "assistant", "content": "SELECT AVG(\"silver\") FROM \"medal_table\" WHERE \"total\"<3 AND \"rank\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"exhibition_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many weeks had an attendance of over 68,000?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"exhibition_schedule\" WHERE \"attendance\">'68,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" text,\n \"finish\" text,\n \"team\" text\n);\n\nQuestion: What engine was used by the team the finished 2nd?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"indy_500_results\" WHERE \"finish\"='2nd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" text,\n \"finish\" text,\n \"team\" text\n);\n\nQuestion: What chassis was used with the Chevrolet engine in 1991?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"indy_500_results\" WHERE \"engine\"='chevrolet' AND \"year\"=1991;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" text,\n \"finish\" text,\n \"team\" text\n);\n\nQuestion: What was the most recent year when a g-force chassis started in 1st?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"indy_500_results\" WHERE \"start\"='1st' AND \"chassis\"='g-force';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" text,\n \"finish\" text,\n \"team\" text\n);\n\nQuestion: What was the starting position in the year before 1986?" }, { "role": "assistant", "content": "SELECT \"start\" FROM \"indy_500_results\" WHERE \"year\"<1986;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fleet\" (\n \"vessel_name\" text,\n \"type\" text,\n \"built\" real,\n \"class\" text,\n \"flag\" text\n);\n\nQuestion: What is the name of the Malta vessel built after 2010 that is a GL class Panamax vessel?" }, { "role": "assistant", "content": "SELECT \"vessel_name\" FROM \"fleet\" WHERE \"flag\"='malta' AND \"type\"='panamax' AND \"class\"='gl' AND \"built\">2010;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fleet\" (\n \"vessel_name\" text,\n \"type\" text,\n \"built\" real,\n \"class\" text,\n \"flag\" text\n);\n\nQuestion: Which year was the vessel Deva built as a Panamax DNV class ship?" }, { "role": "assistant", "content": "SELECT SUM(\"built\") FROM \"fleet\" WHERE \"class\"='dnv' AND \"type\"='panamax' AND \"vessel_name\"='deva';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fleet\" (\n \"vessel_name\" text,\n \"type\" text,\n \"built\" real,\n \"class\" text,\n \"flag\" text\n);\n\nQuestion: What is the class of vessel of the ship Hyundai Smart?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"fleet\" WHERE \"vessel_name\"='hyundai smart';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fleet\" (\n \"vessel_name\" text,\n \"type\" text,\n \"built\" real,\n \"class\" text,\n \"flag\" text\n);\n\nQuestion: In which class would the vessel Hyundai Tenacity be placed?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"fleet\" WHERE \"vessel_name\"='hyundai tenacity';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the result for week 14?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the home team when the away team scored 5.9 (39)?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_9\" WHERE \"away_team_score\"='5.9 (39)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"reb_avg\" real,\n \"total_rebounds\" real\n);\n\nQuestion: Which lowest rank(player) has a rebound average larger than 9, out of 920 rebounds, and who played more than 79 games?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"rebounds\" WHERE \"reb_avg\">9 AND \"total_rebounds\"=920 AND \"games\">79;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"reb_avg\" real,\n \"total_rebounds\" real\n);\n\nQuestion: How many ranks have a rebound average smaller than 6.1?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"rebounds\" WHERE \"reb_avg\"<6.1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which player was drafted higher than 374 and went to the school Stephen F. Austin?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"overall\"<374 AND \"school_club_team\"='stephen f. austin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the lowest round Trinity school was drafted with an overall higher than 21?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"nfl_draft\" WHERE \"school_club_team\"='trinity' AND \"overall\"<21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"swimmer\" text,\n \"nationality\" text,\n \"100m\" real,\n \"200m\" text,\n \"300m\" text,\n \"400m\" text,\n \"500m\" text,\n \"600m\" text,\n \"700m\" text,\n \"time\" text\n);\n\nQuestion: Who got the time of 7:52.04?" }, { "role": "assistant", "content": "SELECT \"swimmer\" FROM \"final\" WHERE \"time\"='7:52.04';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"swimmer\" text,\n \"nationality\" text,\n \"100m\" real,\n \"200m\" text,\n \"300m\" text,\n \"400m\" text,\n \"500m\" text,\n \"600m\" text,\n \"700m\" text,\n \"time\" text\n);\n\nQuestion: Which swimmer completed the 700m within 6:57.69?" }, { "role": "assistant", "content": "SELECT \"swimmer\" FROM \"final\" WHERE \"700m\"='6:57.69';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"swimmer\" text,\n \"nationality\" text,\n \"100m\" real,\n \"200m\" text,\n \"300m\" text,\n \"400m\" text,\n \"500m\" text,\n \"600m\" text,\n \"700m\" text,\n \"time\" text\n);\n\nQuestion: Which swimmer has a 100m time longer than 57.34 and a 600m of 5:54.45?" }, { "role": "assistant", "content": "SELECT \"200m\" FROM \"final\" WHERE \"100m\">57.34 AND \"600m\"='5:54.45';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"stadium\" text,\n \"record\" text,\n \"box_scores\" text,\n \"attendance\" text\n);\n\nQuestion: Which of the opponents has bye as their box score?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"box_scores\"='bye';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"stadium\" text,\n \"record\" text,\n \"box_scores\" text,\n \"attendance\" text\n);\n\nQuestion: How many people attended the game against the pittsburgh steelers?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"opponent\"='pittsburgh steelers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"stadium\" text,\n \"record\" text,\n \"box_scores\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result of the game on September 25 with a box score of box?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"box_scores\"='box' AND \"date\"='september 25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"stadium\" text,\n \"record\" text,\n \"box_scores\" text,\n \"attendance\" text\n);\n\nQuestion: What is the date of the game later than week 13 and 41,862 people attended?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\">13 AND \"attendance\"='41,862';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_caps\" (\n \"rank\" real,\n \"player\" text,\n \"nation\" text,\n \"caps\" real,\n \"goals\" real,\n \"years\" text\n);\n\nQuestion: What is the sum of caps for players with less than 9 goals ranked below 8?" }, { "role": "assistant", "content": "SELECT SUM(\"caps\") FROM \"most_caps\" WHERE \"goals\"<9 AND \"rank\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_judges\" (\n \"state\" text,\n \"born_died\" text,\n \"active_service\" text,\n \"chief_judge\" text,\n \"senior_status\" text,\n \"appointed_by\" text,\n \"reason_for_termination\" text\n);\n\nQuestion: What were the years of senior status for active service in 1972\u20131995?" }, { "role": "assistant", "content": "SELECT \"senior_status\" FROM \"former_judges\" WHERE \"active_service\"='1972\u20131995';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_judges\" (\n \"state\" text,\n \"born_died\" text,\n \"active_service\" text,\n \"chief_judge\" text,\n \"senior_status\" text,\n \"appointed_by\" text,\n \"reason_for_termination\" text\n);\n\nQuestion: What were the birth and death years when active service was 1972\u20131995?" }, { "role": "assistant", "content": "SELECT \"born_died\" FROM \"former_judges\" WHERE \"active_service\"='1972\u20131995';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_judges\" (\n \"state\" text,\n \"born_died\" text,\n \"active_service\" text,\n \"chief_judge\" text,\n \"senior_status\" text,\n \"appointed_by\" text,\n \"reason_for_termination\" text\n);\n\nQuestion: Which active services years ended in death and had senior status in 1972\u20132005?" }, { "role": "assistant", "content": "SELECT \"active_service\" FROM \"former_judges\" WHERE \"reason_for_termination\"='death' AND \"senior_status\"='1972\u20132005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Which date featured the Boston Patriots as the opponent?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"opponent\"='boston patriots';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent during week 8?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=8;" } ]