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 \"competitions\" (\n \"competition\" text,\n \"current_position_round\" text,\n \"final_position_round\" text,\n \"first_match\" text,\n \"last_match\" text\n);\n\nQuestion: Which competition had a final position/round of 2?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"competitions\" WHERE \"final_position_round\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"competitions\" (\n \"competition\" text,\n \"current_position_round\" text,\n \"final_position_round\" text,\n \"first_match\" text,\n \"last_match\" text\n);\n\nQuestion: Which first match had a final position/round in the third qualifying round?" }, { "role": "assistant", "content": "SELECT \"first_match\" FROM \"competitions\" WHERE \"final_position_round\"='third qualifying round';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"multiple_asian_games_gold_medalists\" (\n \"athlete\" text,\n \"sport\" text,\n \"asian_games\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest number of bronze medals for nations with over 6 total and 2 golds?" }, { "role": "assistant", "content": "SELECT MIN(\"bronze\") FROM \"multiple_asian_games_gold_medalists\" WHERE \"gold\"=2 AND \"total\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"multiple_asian_games_gold_medalists\" (\n \"athlete\" text,\n \"sport\" text,\n \"asian_games\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of silver medals for karate athletes with over 2 golds?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"multiple_asian_games_gold_medalists\" WHERE \"sport\"='karate' AND \"gold\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is the 2009 value with a 1r in 2010 and A in 2011?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"doubles\" WHERE \"2010\"='1r' AND \"2011\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is the 2009 value with a 2010 A value?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"doubles\" WHERE \"2010\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is the 2010 value with A in 2008, A in 2011, and 2r in 2012?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"doubles\" WHERE \"2008\"='a' AND \"2011\"='a' AND \"2012\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the average attendance on april 24?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"game_log\" WHERE \"date\"='april 24';" } ]
[ { "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 of the away team when Richmond played?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_12\" WHERE \"away_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What company was Constructor when there were 16 laps and grid was 9?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"laps\"=16 AND \"grid\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the Time/Retired when lotus - ford was constructor and the laps were less than 17?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"race\" WHERE \"constructor\"='lotus - ford' AND \"laps\"<17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the number of the grid when there was a Time/Retired of engine and less than 9 laps?" }, { "role": "assistant", "content": "SELECT SUM(\"grid\") FROM \"race\" WHERE \"time_retired\"='engine' AND \"laps\"<9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_08_peterborough_united_f_c_season\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: what was the attendance for a home venue and a w 3-0 result?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"2007_08_peterborough_united_f_c_season\" WHERE \"venue\"='home' AND \"result\"='w 3-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_08_peterborough_united_f_c_season\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: what was the attendance at the home venue with result w 3-1?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"2007_08_peterborough_united_f_c_season\" WHERE \"venue\"='home' AND \"result\"='w 3-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_08_peterborough_united_f_c_season\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: where did rochdale play as opponent?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"2007_08_peterborough_united_f_c_season\" WHERE \"opponent\"='rochdale';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fixtures\" (\n \"round\" real,\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"crowd\" real,\n \"stadium\" text,\n \"match_details\" text\n);\n\nQuestion: Which home team played in front of 18,345 people in Adelaide Oval?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"fixtures\" WHERE \"crowd\">'18,345' AND \"stadium\"='adelaide oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fixtures\" (\n \"round\" real,\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"crowd\" real,\n \"stadium\" text,\n \"match_details\" text\n);\n\nQuestion: Which team was hosted at Adelaide Oval?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"fixtures\" WHERE \"stadium\"='adelaide oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_year\" (\n \"year\" text,\n \"driver\" text,\n \"constructor\" text,\n \"location\" text,\n \"report\" text\n);\n\nQuestion: When was a report not held?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"by_year\" WHERE \"report\"='not held';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the visitor when vancouver was at home?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"home\"='vancouver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the decision when new jersey was away?" }, { "role": "assistant", "content": "SELECT \"decision\" FROM \"game_log\" WHERE \"visitor\"='new jersey';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"message_format\" (\n \"subframe_num\" real,\n \"page_num\" text,\n \"name\" text,\n \"word_num\" real,\n \"bits\" text,\n \"scale\" text,\n \"signed\" text\n);\n\nQuestion: What is URA Index scale?" }, { "role": "assistant", "content": "SELECT \"scale\" FROM \"message_format\" WHERE \"name\"='ura index';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"message_format\" (\n \"subframe_num\" real,\n \"page_num\" text,\n \"name\" text,\n \"word_num\" real,\n \"bits\" text,\n \"scale\" text,\n \"signed\" text\n);\n\nQuestion: What is the scale of sv_health with a word number smaller than 4?" }, { "role": "assistant", "content": "SELECT \"scale\" FROM \"message_format\" WHERE \"word_num\"<4 AND \"name\"='sv_health';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_winners\" (\n \"year_of_award\" real,\n \"athlete\" text,\n \"nation_of_citizenship\" text,\n \"team\" text,\n \"competition_governing_body_or_league\" text,\n \"sport\" text\n);\n\nQuestion: Which tennis team is from the United States?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"list_of_winners\" WHERE \"sport\"='tennis' AND \"nation_of_citizenship\"='united states';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_winners\" (\n \"year_of_award\" real,\n \"athlete\" text,\n \"nation_of_citizenship\" text,\n \"team\" text,\n \"competition_governing_body_or_league\" text,\n \"sport\" text\n);\n\nQuestion: What is the nation of citizenship for athletes later than 2011 year of award?" }, { "role": "assistant", "content": "SELECT \"nation_of_citizenship\" FROM \"list_of_winners\" WHERE \"year_of_award\">2011;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What Constructor did Michael Schumacher have with a Grid smaller than 5?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"grid\"<5 AND \"driver\"='michael schumacher';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which driver has a Time/Retired of +1 lap?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"time_retired\"='+1 lap';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"detailed_olympic_results\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"score_final\" real,\n \"score_qualifying\" real\n);\n\nQuestion: Which apparatus had a final score that was more than 17.75?" }, { "role": "assistant", "content": "SELECT \"apparatus\" FROM \"detailed_olympic_results\" WHERE \"score_final\">17.75;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"detailed_olympic_results\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"score_final\" real,\n \"score_qualifying\" real\n);\n\nQuestion: Which competition description's apparatus was ribbon?" }, { "role": "assistant", "content": "SELECT \"competition_description\" FROM \"detailed_olympic_results\" WHERE \"apparatus\"='ribbon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"detailed_olympic_results\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"score_final\" real,\n \"score_qualifying\" real\n);\n\nQuestion: Which Qualifying score had hoop as an apparatus?" }, { "role": "assistant", "content": "SELECT \"score_qualifying\" FROM \"detailed_olympic_results\" WHERE \"apparatus\"='hoop';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"detailed_olympic_results\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"score_final\" real,\n \"score_qualifying\" real\n);\n\nQuestion: What is the sum of qualifying scores when the final score is 16.625?" }, { "role": "assistant", "content": "SELECT COUNT(\"score_qualifying\") FROM \"detailed_olympic_results\" WHERE \"score_final\"=16.625;" } ]
[ { "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: When was the game played at Princes Park?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_9\" WHERE \"venue\"='princes park';" } ]
[ { "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: What did Melbourne score as the home team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_9\" WHERE \"home_team\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"high_school_players_and_coaches_of_the_y\" (\n \"year\" real,\n \"player\" text,\n \"position\" text,\n \"high_school\" text,\n \"hometown\" text,\n \"mlb_draft\" text\n);\n\nQuestion: What position does the player from malvern prep play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"high_school_players_and_coaches_of_the_y\" WHERE \"high_school\"='malvern prep';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What team scored more than 572 points and had more than 29 games?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"points\" WHERE \"points\">572 AND \"games\">29;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What is the least amount of games for Luis scola with a rank greater than 1?" }, { "role": "assistant", "content": "SELECT MIN(\"games\") FROM \"points\" WHERE \"rank\">1 AND \"name\"='luis scola';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"steam_locomotives\" (\n \"identity\" text,\n \"builder\" text,\n \"built\" real,\n \"wheel_arrangement\" text,\n \"notes\" text\n);\n\nQuestion: What is the identity of the brighton works built train?" }, { "role": "assistant", "content": "SELECT \"identity\" FROM \"steam_locomotives\" WHERE \"builder\"='brighton works';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"smythe_division_final_vs_3\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: What was the attendance on May 13?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"smythe_division_final_vs_3\" WHERE \"date\"='may 13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives_of_the_great_western_railway\" (\n \"manufacturer\" text,\n \"type\" text,\n \"quantity\" real,\n \"ptrd_nos\" text,\n \"gwr_nos\" text\n);\n\nQuestion: What is the highest Quantity for PTRD Nos. 3, 15?" }, { "role": "assistant", "content": "SELECT MAX(\"quantity\") FROM \"locomotives_of_the_great_western_railway\" WHERE \"ptrd_nos\"='3, 15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_attendance\" (\n \"team\" text,\n \"hosted\" real,\n \"average\" real,\n \"highest\" real,\n \"lowest\" real,\n \"total\" real,\n \"last_year\" real,\n \"up_down\" text\n);\n\nQuestion: How many were hosted whene the average attendance was 27,638?" }, { "role": "assistant", "content": "SELECT COUNT(\"hosted\") FROM \"match_attendance\" WHERE \"average\"='27,638';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_attendance\" (\n \"team\" text,\n \"hosted\" real,\n \"average\" real,\n \"highest\" real,\n \"lowest\" real,\n \"total\" real,\n \"last_year\" real,\n \"up_down\" text\n);\n\nQuestion: What is the lowest attendance last year when more than 176 were hosted?" }, { "role": "assistant", "content": "SELECT MIN(\"last_year\") FROM \"match_attendance\" WHERE \"hosted\">176;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_growth_history\" (\n \"city\" text,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"2000\" real,\n \"2010_est\" real\n);\n\nQuestion: Of 2010 est. with less than 171,750 and 2000 less than 131,714, what is the 1970 population average?" }, { "role": "assistant", "content": "SELECT AVG(\"1970\") FROM \"population_growth_history\" WHERE \"2010_est\"='171,750' AND \"2000\"<'131,714';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_growth_history\" (\n \"city\" text,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"2000\" real,\n \"2010_est\" real\n);\n\nQuestion: With 1990 growth greater than 19,988 and 1970 growth less than 10,522, what is the 1980 average?" }, { "role": "assistant", "content": "SELECT AVG(\"1980\") FROM \"population_growth_history\" WHERE \"1990\">'19,988' AND \"1970\"<'10,522';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_growth_history\" (\n \"city\" text,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"2000\" real,\n \"2010_est\" real\n);\n\nQuestion: Of 2000 growth less than 32,093 and 1980 growth over 64,975, what is the 1970 total number?" }, { "role": "assistant", "content": "SELECT COUNT(\"1970\") FROM \"population_growth_history\" WHERE \"2000\"<'32,093' AND \"1980\">'64,975';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_growth_history\" (\n \"city\" text,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"2000\" real,\n \"2010_est\" real\n);\n\nQuestion: How many 1990 growth numbers had less than 10,522 in 1970?" }, { "role": "assistant", "content": "SELECT COUNT(\"1990\") FROM \"population_growth_history\" WHERE \"1970\"<'10,522';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_growth_history\" (\n \"city\" text,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"2000\" real,\n \"2010_est\" real\n);\n\nQuestion: Which is the lowest 1980 growth that had 2,610 in 1970?" }, { "role": "assistant", "content": "SELECT MIN(\"1980\") FROM \"population_growth_history\" WHERE \"1970\"='2,610';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the high lap total that has a grid of less than 4 and a Time/Retired of + 1 lap?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"grid\"<4 AND \"time_retired\"='+ 1 lap';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps associated with a Time/Retired of + 1:25.475?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"race\" WHERE \"time_retired\"='+ 1:25.475';" } ]
[ { "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: Where was the game played where the away team scored 12.15 (87)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_12\" WHERE \"away_team_score\"='12.15 (87)';" } ]
[ { "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: Which away team played a home team with the score of 13.12 (90)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_12\" WHERE \"home_team_score\"='13.12 (90)';" } ]
[ { "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 is the score for the away team when the home team scored 19.17 (131)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_12\" WHERE \"home_team_score\"='19.17 (131)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\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 when the VFL played Princes Park?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_14\" WHERE \"venue\"='princes park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\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 opponents score when Geelong played as home team?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_14\" WHERE \"home_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\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 when the VFL played at Kardinia Park?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_14\" WHERE \"venue\"='kardinia park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\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: When did Fitzroy play as the away team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_14\" WHERE \"away_team\"='fitzroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_top_scorers\" (\n \"rank\" real,\n \"player\" text,\n \"goals\" real,\n \"apps\" real,\n \"avg_game\" real\n);\n\nQuestion: What is the average number of goals of the player with 234 apps and a rank above 8?" }, { "role": "assistant", "content": "SELECT AVG(\"goals\") FROM \"all_time_top_scorers\" WHERE \"apps\"=234 AND \"rank\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_top_scorers\" (\n \"rank\" real,\n \"player\" text,\n \"goals\" real,\n \"apps\" real,\n \"avg_game\" real\n);\n\nQuestion: What is the average avg/game of the player with 97 goals and a rank above 7?" }, { "role": "assistant", "content": "SELECT AVG(\"avg_game\") FROM \"all_time_top_scorers\" WHERE \"goals\"=97 AND \"rank\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clausura_2007_standings\" (\n \"place_posici_n\" real,\n \"team_equipo\" text,\n \"played_pj\" real,\n \"won_pg\" real,\n \"draw_pe\" real,\n \"lost_pp\" real,\n \"goals_scored_gf\" real,\n \"goals_conceded_gc\" real,\n \"dif\" real,\n \"points_pts\" real\n);\n\nQuestion: What is the highest number of games won where less than 21 games were conceded and less than 18 games were actually played?" }, { "role": "assistant", "content": "SELECT MAX(\"won_pg\") FROM \"clausura_2007_standings\" WHERE \"goals_conceded_gc\"<21 AND \"played_pj\"<18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clausura_2007_standings\" (\n \"place_posici_n\" real,\n \"team_equipo\" text,\n \"played_pj\" real,\n \"won_pg\" real,\n \"draw_pe\" real,\n \"lost_pp\" real,\n \"goals_scored_gf\" real,\n \"goals_conceded_gc\" real,\n \"dif\" real,\n \"points_pts\" real\n);\n\nQuestion: What is the average number of goals conceded where more than 19 goals were scored, the team had 31 points, and more than 7 draws?" }, { "role": "assistant", "content": "SELECT AVG(\"goals_conceded_gc\") FROM \"clausura_2007_standings\" WHERE \"goals_scored_gf\">19 AND \"points_pts\"=31 AND \"draw_pe\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clausura_2007_standings\" (\n \"place_posici_n\" real,\n \"team_equipo\" text,\n \"played_pj\" real,\n \"won_pg\" real,\n \"draw_pe\" real,\n \"lost_pp\" real,\n \"goals_scored_gf\" real,\n \"goals_conceded_gc\" real,\n \"dif\" real,\n \"points_pts\" real\n);\n\nQuestion: How many goals were conceded against the Chepo F.C. team where they lost 7 games?" }, { "role": "assistant", "content": "SELECT \"goals_conceded_gc\" FROM \"clausura_2007_standings\" WHERE \"lost_pp\"=7 AND \"team_equipo\"='chepo f.c.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\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 smallest crowd at junction oval?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_15\" WHERE \"venue\"='junction oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: What state has Richard Foster as a member?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"notes\" WHERE \"member\"='richard foster';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: Which member has Cook as the electorate?" }, { "role": "assistant", "content": "SELECT \"member\" FROM \"notes\" WHERE \"electorate\"='cook';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who was the driver with chassis 625 553 500?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"teams_and_drivers\" WHERE \"chassis\"='625 553 500';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What was tyre that was made by cooper - bristol that was driven by bob gerard?" }, { "role": "assistant", "content": "SELECT \"tyre\" FROM \"teams_and_drivers\" WHERE \"constructor\"='cooper - bristol' AND \"driver\"='bob gerard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who was the constructor of the officine alfieri maserati that was driven by Sergio Mantovani?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"teams_and_drivers\" WHERE \"entrant\"='officine alfieri maserati' AND \"driver\"='sergio mantovani';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What tyre had Sergio Mantovani as a driver?" }, { "role": "assistant", "content": "SELECT \"tyre\" FROM \"teams_and_drivers\" WHERE \"driver\"='sergio mantovani';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Can you say what was the entrant of maserati built item with a Tyre of p with a chassis of 250f a6gcm that was driven by Luigi Villoresi?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"teams_and_drivers\" WHERE \"constructor\"='maserati' AND \"tyre\"='p' AND \"chassis\"='250f a6gcm' AND \"driver\"='luigi villoresi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vocabulary_comparison\" (\n \"english\" text,\n \"scots\" text,\n \"west_frisian\" text,\n \"afrikaans\" text,\n \"dutch\" text,\n \"dutch_limburgish\" text,\n \"low_german\" text,\n \"low_german_groningen\" text,\n \"middle_german_luxemburgish\" text,\n \"german\" text,\n \"yiddish\" text,\n \"gothic\" text\n);\n\nQuestion: What is the dutch word for one?" }, { "role": "assistant", "content": "SELECT \"dutch\" FROM \"vocabulary_comparison\" WHERE \"english\"='one';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vocabulary_comparison\" (\n \"english\" text,\n \"scots\" text,\n \"west_frisian\" text,\n \"afrikaans\" text,\n \"dutch\" text,\n \"dutch_limburgish\" text,\n \"low_german\" text,\n \"low_german_groningen\" text,\n \"middle_german_luxemburgish\" text,\n \"german\" text,\n \"yiddish\" text,\n \"gothic\" text\n);\n\nQuestion: What is the Middle German (Luxemburgish) word for ein?" }, { "role": "assistant", "content": "SELECT \"middle_german_luxemburgish\" FROM \"vocabulary_comparison\" WHERE \"dutch_limburgish\"='ein';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vocabulary_comparison\" (\n \"english\" text,\n \"scots\" text,\n \"west_frisian\" text,\n \"afrikaans\" text,\n \"dutch\" text,\n \"dutch_limburgish\" text,\n \"low_german\" text,\n \"low_german_groningen\" text,\n \"middle_german_luxemburgish\" text,\n \"german\" text,\n \"yiddish\" text,\n \"gothic\" text\n);\n\nQuestion: What is the Middle German (Luxemburgish) word for stone?" }, { "role": "assistant", "content": "SELECT \"middle_german_luxemburgish\" FROM \"vocabulary_comparison\" WHERE \"english\"='stone';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vocabulary_comparison\" (\n \"english\" text,\n \"scots\" text,\n \"west_frisian\" text,\n \"afrikaans\" text,\n \"dutch\" text,\n \"dutch_limburgish\" text,\n \"low_german\" text,\n \"low_german_groningen\" text,\n \"middle_german_luxemburgish\" text,\n \"german\" text,\n \"yiddish\" text,\n \"gothic\" text\n);\n\nQuestion: What is the Dutch waord for h\u00f8vd / h\u00f8vur?" }, { "role": "assistant", "content": "SELECT \"dutch\" FROM \"vocabulary_comparison\" WHERE \"low_german_groningen\"='h\u00f8vd / h\u00f8vur';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vocabulary_comparison\" (\n \"english\" text,\n \"scots\" text,\n \"west_frisian\" text,\n \"afrikaans\" text,\n \"dutch\" text,\n \"dutch_limburgish\" text,\n \"low_german\" text,\n \"low_german_groningen\" text,\n \"middle_german_luxemburgish\" text,\n \"german\" text,\n \"yiddish\" text,\n \"gothic\" text\n);\n\nQuestion: What is the English word for twie?" }, { "role": "assistant", "content": "SELECT \"english\" FROM \"vocabulary_comparison\" WHERE \"dutch_limburgish\"='twie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"constructor\" text,\n \"chassis\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What is the constructor on the team with 8 rounds and a chassis of 156 158 1512?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"teams_and_drivers\" WHERE \"rounds\"='8' AND \"chassis\"='156 158 1512';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"constructor\" text,\n \"chassis\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who is the driver of the team with tyre d, bt11 chassis, and 8 rounds?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"teams_and_drivers\" WHERE \"tyre\"='d' AND \"chassis\"='bt11' AND \"rounds\"='8';" } ]
[ { "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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the number of bronze that silver is smaller than 1 and gold bigger than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"silver\"<1 AND \"gold\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leading_points_scorers\" (\n \"name\" text,\n \"nation\" text,\n \"points\" real,\n \"games\" real,\n \"pts_game\" real\n);\n\nQuestion: what is the name when the nation is France, the pts/game is more than 3 and points is less than 33?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"leading_points_scorers\" WHERE \"nation\"='france' AND \"pts_game\">3 AND \"points\"<33;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leading_points_scorers\" (\n \"name\" text,\n \"nation\" text,\n \"points\" real,\n \"games\" real,\n \"pts_game\" real\n);\n\nQuestion: what is the pts/game for Charlotte barras and the games is 5?" }, { "role": "assistant", "content": "SELECT \"pts_game\" FROM \"leading_points_scorers\" WHERE \"games\"=5 AND \"name\"='charlotte barras';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leading_points_scorers\" (\n \"name\" text,\n \"nation\" text,\n \"points\" real,\n \"games\" real,\n \"pts_game\" real\n);\n\nQuestion: what is the average points when the nation is wales and the pts/game is more than 5?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"leading_points_scorers\" WHERE \"nation\"='wales' AND \"pts_game\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: When is the earliest year for it is in barcelona, spain?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"venue\"='barcelona, spain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is the average year they finished 5th in santiago, chile?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"achievements\" WHERE \"position\"='5th' AND \"venue\"='santiago, chile';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: Which pick was MIchael Holper?" }, { "role": "assistant", "content": "SELECT MIN(\"pick\") FROM \"round_1\" WHERE \"player\"='michael holper';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: Which country is Leo Najorda from?" }, { "role": "assistant", "content": "SELECT \"country_of_origin\" FROM \"round_1\" WHERE \"player\"='leo najorda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: Which United States player from Hawaii-Hilo had the lowest pick?" }, { "role": "assistant", "content": "SELECT MIN(\"pick\") FROM \"round_1\" WHERE \"country_of_origin\"='united states' AND \"college\"='hawaii-hilo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: Which United States player for Air21 Express had a pick smaller than 9?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_1\" WHERE \"pick\"<9 AND \"country_of_origin\"='united states' AND \"pba_team\"='air21 express';" } ]
[ { "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 is the average Gold where the Nation is Russia (rus) and the number of silver is less than 2?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"nation\"='russia (rus)' AND \"silver\"<2;" } ]
[ { "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 is the total where the nation is South Africa (rsa) and bronze is less than 1?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"medal_table\" WHERE \"nation\"='south africa (rsa)' AND \"bronze\"<1;" } ]
[ { "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: Which nation has 0 gold, a rank greater than 14, a total of 1, and silver less than 1?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"gold\"=0 AND \"rank\">14 AND \"total\"=1 AND \"silver\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_21\" (\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: Tell me the home team for vfl park venue" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_21\" WHERE \"venue\"='vfl park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_21\" (\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: Tell me the home team for venue of mcg" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_21\" 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_21\" (\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: Tell me the most crowd for arden street oval venue" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_21\" 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_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 away team's score when South Melbourne was the home team?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_7\" WHERE \"home_team\"='south melbourne';" } ]
[ { "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: Who was the home team that scored 19.18 (132)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_7\" WHERE \"home_team_score\"='19.18 (132)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ice_dancing\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"total_points\" real,\n \"placings\" real\n);\n\nQuestion: What was the placing of the nation of East Germany?" }, { "role": "assistant", "content": "SELECT COUNT(\"placings\") FROM \"ice_dancing\" WHERE \"nation\"='east germany';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"club_career_stats\" (\n \"season\" real,\n \"team\" text,\n \"country\" text,\n \"league\" text,\n \"level\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What's the highest level of team Astana since 2007?" }, { "role": "assistant", "content": "SELECT MAX(\"level\") FROM \"club_career_stats\" WHERE \"team\"='astana' AND \"season\">2007;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_points_for_the_club\" (\n \"points\" real,\n \"player\" text,\n \"tries\" real,\n \"goals\" real,\n \"field_goals\" real\n);\n\nQuestion: What is the average amount of goals that has a points smaller of 882, less than 5 field goals, and less than 85 tries all by Ty Williams." }, { "role": "assistant", "content": "SELECT AVG(\"goals\") FROM \"most_points_for_the_club\" WHERE \"points\"<882 AND \"field_goals\"<5 AND \"player\"='ty williams' AND \"tries\"<85;" } ]
[ { "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 away team at Western Oval?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_9\" WHERE \"venue\"='western oval';" } ]
[ { "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 that played against Collingwood?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_9\" WHERE \"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_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: What is the average crowd size for Richmond home games?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_9\" 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_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: What is the largest crowd for North Melbourne home games?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_9\" WHERE \"home_team\"='north melbourne';" } ]
[ { "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: In which venue does Melbourne play as the home team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_9\" WHERE \"home_team\"='melbourne';" } ]