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 \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What round of the draft was Stan Adams selected?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"draft_picks\" WHERE \"player\"='stan adams';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the attendance for the t7-7 result?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"result\"='t7-7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the date for 45,000 in attendance?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='45,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: How many strokes under par was the player who scored 71?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"score\"=71;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What place is Jay Hebert?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"first_round\" WHERE \"player\"='jay hebert';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"games_played\" real,\n \"games_won\" real,\n \"games_drawn\" real,\n \"games_lost\" real,\n \"points_for\" real,\n \"points_against\" real,\n \"points_difference\" real,\n \"bonus_points\" real,\n \"table_points\" real\n);\n\nQuestion: Which Games lost has Points against of 61, and Points difference smaller than 42?" }, { "role": "assistant", "content": "SELECT SUM(\"games_lost\") FROM \"winners\" WHERE \"points_against\"=61 AND \"points_difference\"<42;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"games_played\" real,\n \"games_won\" real,\n \"games_drawn\" real,\n \"games_lost\" real,\n \"points_for\" real,\n \"points_against\" real,\n \"points_difference\" real,\n \"bonus_points\" real,\n \"table_points\" real\n);\n\nQuestion: Which Games won has Bonus points larger than 1, a Points difference smaller than 50, Points against of 106, and Points for smaller than 152?" }, { "role": "assistant", "content": "SELECT COUNT(\"games_won\") FROM \"winners\" WHERE \"bonus_points\">1 AND \"points_difference\"<50 AND \"points_against\"=106 AND \"points_for\"<152;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stanley_cup_playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which Score has a Record of 1-2?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"stanley_cup_playoffs\" WHERE \"record\"='1-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stanley_cup_playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Record for April 15?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"stanley_cup_playoffs\" WHERE \"date\"='april 15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stanley_cup_playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Record for April 13?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"stanley_cup_playoffs\" WHERE \"date\"='april 13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stanley_cup_playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: On April 15 who is the Home team?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"stanley_cup_playoffs\" WHERE \"date\"='april 15';" } ]
[ { "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: Which Attendance has a Date of december 22, 1985, and a Week smaller than 16?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"schedule\" WHERE \"date\"='december 22, 1985' AND \"week\"<16;" } ]
[ { "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: Which Attendance has a Result of w 23-21, and a Week smaller than 5?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"result\"='w 23-21' AND \"week\"<5;" } ]
[ { "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: Which Week has a Result of w 20-13?" }, { "role": "assistant", "content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"result\"='w 20-13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"examples_of_chinese_loanwords_in_japanes\" (\n \"japanese\" text,\n \"r_maji\" text,\n \"meaning\" text,\n \"chinese\" text,\n \"romanization\" text,\n \"source_language\" text\n);\n\nQuestion: What are the Japanese characters for the Chinese word \u53c9\u713c?" }, { "role": "assistant", "content": "SELECT \"japanese\" FROM \"examples_of_chinese_loanwords_in_japanes\" WHERE \"chinese\"='\u53c9\u713c';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"examples_of_chinese_loanwords_in_japanes\" (\n \"japanese\" text,\n \"r_maji\" text,\n \"meaning\" text,\n \"chinese\" text,\n \"romanization\" text,\n \"source_language\" text\n);\n\nQuestion: What language did the word that means mahjong first come from?" }, { "role": "assistant", "content": "SELECT \"source_language\" FROM \"examples_of_chinese_loanwords_in_japanes\" WHERE \"meaning\"='mahjong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"examples_of_chinese_loanwords_in_japanes\" (\n \"japanese\" text,\n \"r_maji\" text,\n \"meaning\" text,\n \"chinese\" text,\n \"romanization\" text,\n \"source_language\" text\n);\n\nQuestion: What is the Romanization of the Mandarin word whose R\u014dmaji is \u016broncha" }, { "role": "assistant", "content": "SELECT \"romanization\" FROM \"examples_of_chinese_loanwords_in_japanes\" WHERE \"source_language\"='mandarin' AND \"r_maji\"='\u016broncha';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"examples_of_chinese_loanwords_in_japanes\" (\n \"japanese\" text,\n \"r_maji\" text,\n \"meaning\" text,\n \"chinese\" text,\n \"romanization\" text,\n \"source_language\" text\n);\n\nQuestion: What language did the word mahjong originate from?" }, { "role": "assistant", "content": "SELECT \"source_language\" FROM \"examples_of_chinese_loanwords_in_japanes\" WHERE \"meaning\"='mahjong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"examples_of_chinese_loanwords_in_japanes\" (\n \"japanese\" text,\n \"r_maji\" text,\n \"meaning\" text,\n \"chinese\" text,\n \"romanization\" text,\n \"source_language\" text\n);\n\nQuestion: What are the Chinese characters for the word that has a R\u014dmaji of ch\u0101sh\u016b?" }, { "role": "assistant", "content": "SELECT \"chinese\" FROM \"examples_of_chinese_loanwords_in_japanes\" WHERE \"r_maji\"='ch\u0101sh\u016b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"academy_awards_actual_presidents\" (\n \"year\" real,\n \"category\" text,\n \"president\" text,\n \"nominee\" text,\n \"film\" text,\n \"result\" text\n);\n\nQuestion: What was the category of Richard Nixon as President in a year prior to 2009?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"academy_awards_actual_presidents\" WHERE \"president\"='richard nixon' AND \"year\"<2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"academy_awards_actual_presidents\" (\n \"year\" real,\n \"category\" text,\n \"president\" text,\n \"nominee\" text,\n \"film\" text,\n \"result\" text\n);\n\nQuestion: What is the film that Raymond Massey was nominated for?" }, { "role": "assistant", "content": "SELECT \"film\" FROM \"academy_awards_actual_presidents\" WHERE \"nominee\"='raymond massey';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"academy_awards_actual_presidents\" (\n \"year\" real,\n \"category\" text,\n \"president\" text,\n \"nominee\" text,\n \"film\" text,\n \"result\" text\n);\n\nQuestion: What was the film of Richard Nixon as President in a year newer than 1996?" }, { "role": "assistant", "content": "SELECT \"film\" FROM \"academy_awards_actual_presidents\" WHERE \"president\"='richard nixon' AND \"year\">1996;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_champion_12\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: WHich Partner has a Outcome of winner, and a Opponents in the final of rick leach jim pugh?" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"doubles_champion_12\" WHERE \"outcome\"='winner' AND \"opponents_in_the_final\"='rick leach jim pugh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_champion_12\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which Score in the final has a Surface of hard on august 20, 1989?" }, { "role": "assistant", "content": "SELECT \"score_in_the_final\" FROM \"doubles_champion_12\" WHERE \"surface\"='hard' AND \"date\"='august 20, 1989';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_champion_12\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Name the Outcome which has a Score in the final of 4\u20136, 4\u20136 on october 21, 1990?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_champion_12\" WHERE \"score_in_the_final\"='4\u20136, 4\u20136' AND \"date\"='october 21, 1990';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_champion_12\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which Tournament has a Score in the final of 7\u20135, 6\u20134?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles_champion_12\" WHERE \"score_in_the_final\"='7\u20135, 6\u20134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_champion_12\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Name the Score which has a Partner of jorge lozano, an Outcome of runner-up, and Opponents in the final of udo riglewski michael stich?" }, { "role": "assistant", "content": "SELECT \"score_in_the_final\" FROM \"doubles_champion_12\" WHERE \"partner\"='jorge lozano' AND \"outcome\"='runner-up' AND \"opponents_in_the_final\"='udo riglewski michael stich';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_champion_12\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Name the Date which has Opponents in the final of patrick mcenroe tim wilkison?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"doubles_champion_12\" WHERE \"opponents_in_the_final\"='patrick mcenroe tim wilkison';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_who_made_their_afl_debut_during_\" (\n \"name\" text,\n \"club\" text,\n \"age_at_debut\" text,\n \"debut_round\" real,\n \"games_2008\" real,\n \"goals_2008\" real\n);\n\nQuestion: What is the total number of goals that have games under 11, debut round over 15, and age of 20 years, 71 days?" }, { "role": "assistant", "content": "SELECT COUNT(\"goals_2008\") FROM \"players_who_made_their_afl_debut_during_\" WHERE \"games_2008\"<11 AND \"debut_round\">15 AND \"age_at_debut\"='20 years, 71 days';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_who_made_their_afl_debut_during_\" (\n \"name\" text,\n \"club\" text,\n \"age_at_debut\" text,\n \"debut_round\" real,\n \"games_2008\" real,\n \"goals_2008\" real\n);\n\nQuestion: What is the name that has a debut round over 14, games under 2, and a club of Melbourne?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"players_who_made_their_afl_debut_during_\" WHERE \"debut_round\">14 AND \"games_2008\"<2 AND \"club\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" text,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: What is the name of team 2 that has 1-2 as the score?" }, { "role": "assistant", "content": "SELECT \"team_2\" FROM \"results\" WHERE \"score\"='1-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" text,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: In the 2005 season with a score of 0-4 what is the team 1?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"results\" WHERE \"season\"='2005' AND \"score\"='0-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" text,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: Team 2 of Yokohama F. Marinos in the n/a venue had what score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"results\" WHERE \"venue\"='n/a' AND \"team_2\"='yokohama f. marinos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" text,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: Team 2 Al-Ain played in what venue?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"results\" WHERE \"team_2\"='al-ain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"super_league_tries\" (\n \"date\" text,\n \"venue\" text,\n \"opponent\" text,\n \"result\" text,\n \"tournament\" text,\n \"scored\" real\n);\n\nQuestion: What is the scored figure when the result is 40-22?" }, { "role": "assistant", "content": "SELECT SUM(\"scored\") FROM \"super_league_tries\" WHERE \"result\"='40-22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"super_league_tries\" (\n \"date\" text,\n \"venue\" text,\n \"opponent\" text,\n \"result\" text,\n \"tournament\" text,\n \"scored\" real\n);\n\nQuestion: In what tournament is there a result of 46-18?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"super_league_tries\" WHERE \"result\"='46-18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"super_league_tries\" (\n \"date\" text,\n \"venue\" text,\n \"opponent\" text,\n \"result\" text,\n \"tournament\" text,\n \"scored\" real\n);\n\nQuestion: What is the smallest scored with a result of 46-18?" }, { "role": "assistant", "content": "SELECT MIN(\"scored\") FROM \"super_league_tries\" WHERE \"result\"='46-18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_who_made_their_club_debut_during\" (\n \"name\" text,\n \"club\" text,\n \"debut_round\" real,\n \"games_2008\" real,\n \"goals_2008\" real,\n \"previous_club_s\" text\n);\n\nQuestion: What is the average number of goals with 21 games for a debut round less than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"goals_2008\") FROM \"players_who_made_their_club_debut_during\" WHERE \"games_2008\"=21 AND \"debut_round\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"g\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" real,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What is the Nationality of the Player with Jersey Number 6?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"g\" WHERE \"jersey_number_s\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"g\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" real,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What is the Jersey Number of the Player from Clemson?" }, { "role": "assistant", "content": "SELECT SUM(\"jersey_number_s\") FROM \"g\" WHERE \"from\"='clemson';" } ]
[ { "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 \"at_vs\" text,\n \"opponent\" text,\n \"score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the at/vs against the New York Saints with over 16,042 in attendance?" }, { "role": "assistant", "content": "SELECT \"at_vs\" FROM \"game_log\" WHERE \"opponent\"='new york saints' AND \"attendance\">'16,042';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What day was the visitor Cleveland when the record was 34-26?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"march\" WHERE \"visitor\"='cleveland' AND \"record\"='34-26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the attendance when the score was 88-98?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"march\" WHERE \"score\"='88-98';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the record when the visitor was Cleveland in Dallas?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"march\" WHERE \"visitor\"='cleveland' AND \"home\"='dallas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What is the littlest round that has Matt Delahey, and a greater than 112 pick?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"draft_picks\" WHERE \"player\"='matt delahey' AND \"pick\">112;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_ranking_of_chemical_engineering_sc\" (\n \"school\" text,\n \"location\" text,\n \"pubs_2010\" real,\n \"totals_06_10\" real,\n \"rank_06_10\" real,\n \"pubs_2011\" real,\n \"totals_07_11\" real,\n \"rank_07_11\" real,\n \"world_ranking\" text\n);\n\nQuestion: What is the average PUBS 11 value in Mumbai, which has a 07-11 totals less than 1025?" }, { "role": "assistant", "content": "SELECT AVG(\"pubs_2011\") FROM \"world_ranking_of_chemical_engineering_sc\" WHERE \"location\"='mumbai' AND \"totals_07_11\"<1025;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_ranking_of_chemical_engineering_sc\" (\n \"school\" text,\n \"location\" text,\n \"pubs_2010\" real,\n \"totals_06_10\" real,\n \"rank_06_10\" real,\n \"pubs_2011\" real,\n \"totals_07_11\" real,\n \"rank_07_11\" real,\n \"world_ranking\" text\n);\n\nQuestion: What is the lowest 06-10 totals with a pubs 2010 of 68 and a 07-11 totals larger than 305?" }, { "role": "assistant", "content": "SELECT MIN(\"totals_06_10\") FROM \"world_ranking_of_chemical_engineering_sc\" WHERE \"pubs_2010\"=68 AND \"totals_07_11\">305;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is Team, when Date of Appointment is \"10 November 2008\"?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"date_of_appointment\"='10 november 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is Replaced By, when Outgoing Manager is \"\u00dcnal Karaman\"?" }, { "role": "assistant", "content": "SELECT \"replaced_by\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='\u00fcnal karaman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is Outgoing Manager, when Date of Vacancy is \"25 September 2008\"?" }, { "role": "assistant", "content": "SELECT \"outgoing_manager\" FROM \"managerial_changes\" WHERE \"date_of_vacancy\"='25 september 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is Date of Appointment, when Outgoing Manager is \"Hakan Kutlu\"?" }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='hakan kutlu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is Date of Appointment, when Outgoing Manager is \"Giray Bulak\"?" }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='giray bulak';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is Replaced By, when Date of Vacancy is \"23 February 2009\"?" }, { "role": "assistant", "content": "SELECT \"replaced_by\" FROM \"managerial_changes\" WHERE \"date_of_vacancy\"='23 february 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: WHAT IS THE TEAM FOR DECEMBER 30?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"game_log\" WHERE \"date\"='december 30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_appearances_in_tour_de_france\" (\n \"year\" real,\n \"stage\" real,\n \"category\" text,\n \"start\" text,\n \"finish\" text,\n \"leader_at_the_summit\" text\n);\n\nQuestion: Which category had an orange finish?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"other_appearances_in_tour_de_france\" WHERE \"finish\"='orange';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_appearances_in_tour_de_france\" (\n \"year\" real,\n \"stage\" real,\n \"category\" text,\n \"start\" text,\n \"finish\" text,\n \"leader_at_the_summit\" text\n);\n\nQuestion: What is the lowest year for stage 12, category 1?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"other_appearances_in_tour_de_france\" WHERE \"category\"='1' AND \"stage\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_appearances_in_tour_de_france\" (\n \"year\" real,\n \"stage\" real,\n \"category\" text,\n \"start\" text,\n \"finish\" text,\n \"leader_at_the_summit\" text\n);\n\nQuestion: What is the start of stage 11?" }, { "role": "assistant", "content": "SELECT \"start\" FROM \"other_appearances_in_tour_de_france\" WHERE \"stage\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cole_model_overview_1908_1925\" (\n \"year\" text,\n \"model\" text,\n \"engine_type_cyl\" text,\n \"power_bhp_k_w\" text,\n \"wheelbase_in\" text\n);\n\nQuestion: Which model had a wheelbase of 136 inches?" }, { "role": "assistant", "content": "SELECT \"model\" FROM \"cole_model_overview_1908_1925\" WHERE \"wheelbase_in\"='136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cole_model_overview_1908_1925\" (\n \"year\" text,\n \"model\" text,\n \"engine_type_cyl\" text,\n \"power_bhp_k_w\" text,\n \"wheelbase_in\" text\n);\n\nQuestion: What is the engine type with a wheelbase of 127 inches in 1915?" }, { "role": "assistant", "content": "SELECT \"engine_type_cyl\" FROM \"cole_model_overview_1908_1925\" WHERE \"wheelbase_in\"='127' AND \"year\"='1915';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What was the record on January 4?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"season_schedule\" WHERE \"date\"='january 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Streak has a Game larger than 49?" }, { "role": "assistant", "content": "SELECT \"streak\" FROM \"season_schedule\" WHERE \"game\">49;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Streak has a Date of january 7?" }, { "role": "assistant", "content": "SELECT \"streak\" FROM \"season_schedule\" WHERE \"date\"='january 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"repeat_winners\" (\n \"rank\" real,\n \"name\" text,\n \"country\" text,\n \"wins\" real,\n \"years\" text\n);\n\nQuestion: Which Country has Wins larger than 2, and a Rank of 2, and a Name of federico bahamontes?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"repeat_winners\" WHERE \"wins\">2 AND \"rank\"=2 AND \"name\"='federico bahamontes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"repeat_winners\" (\n \"rank\" real,\n \"name\" text,\n \"country\" text,\n \"wins\" real,\n \"years\" text\n);\n\nQuestion: What is richard virenque's lowest rank?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"repeat_winners\" WHERE \"name\"='richard virenque';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"repeat_winners\" (\n \"rank\" real,\n \"name\" text,\n \"country\" text,\n \"wins\" real,\n \"years\" text\n);\n\nQuestion: Which Years have a Rank larger than 2, and Wins of 2, and a Country of france?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"repeat_winners\" WHERE \"rank\">2 AND \"wins\"=2 AND \"country\"='france';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\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 home team with the ny rangers as the visitor team?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"regular_season\" WHERE \"visitor\"='ny rangers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\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 record on October 13, when philadelphia was the home team?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"home\"='philadelphia' AND \"date\"='october 13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_figures_in_an_innings\" (\n \"rank\" text,\n \"figures\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What is Season, when Opponent is source: . last updated: 28 june 2007.?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"best_figures_in_an_innings\" WHERE \"opponent\"='source: . last updated: 28 june 2007.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_figures_in_an_innings\" (\n \"rank\" text,\n \"figures\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What is Venue, when Figures is 5/29?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"best_figures_in_an_innings\" WHERE \"figures\"='5/29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_figures_in_an_innings\" (\n \"rank\" text,\n \"figures\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What is Opponent, when Rank is 3?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"best_figures_in_an_innings\" WHERE \"rank\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_figures_in_an_innings\" (\n \"rank\" text,\n \"figures\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What is Player, when Figures is source: . last updated: 28 june 2007.?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"best_figures_in_an_innings\" WHERE \"figures\"='source: . last updated: 28 june 2007.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_figures_in_an_innings\" (\n \"rank\" text,\n \"figures\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What is Player, when Opponent is source: . last updated: 28 june 2007.?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"best_figures_in_an_innings\" WHERE \"opponent\"='source: . last updated: 28 june 2007.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: For the match played on 7 January 1956, with away team of Accrington Stanley, who was the home team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"third_round_proper\" WHERE \"date\"='7 january 1956' AND \"away_team\"='accrington stanley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Which Tie number had Fulham as the away team?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"third_round_proper\" WHERE \"away_team\"='fulham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Which Tie number had Middlesbrough as the away team?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"third_round_proper\" WHERE \"away_team\"='middlesbrough';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: On what day was Tie #29 played?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"third_round_proper\" WHERE \"tie_no\"='29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Which Tie number was played on 9 January 1956?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"third_round_proper\" WHERE \"date\"='9 january 1956';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Tie number for the match that had away team of Scunthorpe & Lindsey United?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"third_round_proper\" WHERE \"away_team\"='scunthorpe & lindsey united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: WHAT IS THE PLACE WITH A SCORE OF 76-69-64-70=279?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_round\" WHERE \"score\"='76-69-64-70=279';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: WHAT IS THE PLACE WITH A SCORE OF 73-65-73-71=282?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_round\" WHERE \"score\"='73-65-73-71=282';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: WHAT IS THE TO PAR FOR ERNIE ELS?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"player\"='ernie els';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: WHAT IS THE PLACE WITH THE SCORE 69-71-66-73=279?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_round\" WHERE \"score\"='69-71-66-73=279';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_24\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the winning score at Burdine's Invitational?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"lpga_tour_wins_24\" WHERE \"tournament\"='burdine''s invitational';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_24\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who was the runner-up when the winning score is +3 (69-70-71-77=287)?" }, { "role": "assistant", "content": "SELECT \"runner_s_up\" FROM \"lpga_tour_wins_24\" WHERE \"winning_score\"='+3 (69-70-71-77=287)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_24\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which tournament has a winning score at \u20137 (66-72-69-74=281)?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"lpga_tour_wins_24\" WHERE \"winning_score\"='\u20137 (66-72-69-74=281)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_24\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: On what date is Jerilyn Britz the runner-up?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"lpga_tour_wins_24\" WHERE \"runner_s_up\"='jerilyn britz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_24\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: On what date is the winning score \u20138 (70-71-67=208)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"lpga_tour_wins_24\" WHERE \"winning_score\"='\u20138 (70-71-67=208)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_cup_record\" (\n \"year\" text,\n \"result\" text,\n \"matches\" text,\n \"wins\" text,\n \"draws\" text,\n \"losses\" text\n);\n\nQuestion: What is Matches, when Year is \"2003\"?" }, { "role": "assistant", "content": "SELECT \"matches\" FROM \"world_cup_record\" WHERE \"year\"='2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_cup_record\" (\n \"year\" text,\n \"result\" text,\n \"matches\" text,\n \"wins\" text,\n \"draws\" text,\n \"losses\" text\n);\n\nQuestion: What is Draws, when Losses is \"Did Not Qualify\"?" }, { "role": "assistant", "content": "SELECT \"draws\" FROM \"world_cup_record\" WHERE \"losses\"='did not qualify';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_cup_record\" (\n \"year\" text,\n \"result\" text,\n \"matches\" text,\n \"wins\" text,\n \"draws\" text,\n \"losses\" text\n);\n\nQuestion: What is Result, when Losses is \"Did Not Qualify\"?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"world_cup_record\" WHERE \"losses\"='did not qualify';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_cup_record\" (\n \"year\" text,\n \"result\" text,\n \"matches\" text,\n \"wins\" text,\n \"draws\" text,\n \"losses\" text\n);\n\nQuestion: What is Year, when Wins is \"0\"?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"world_cup_record\" WHERE \"wins\"='0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_cup_record\" (\n \"year\" text,\n \"result\" text,\n \"matches\" text,\n \"wins\" text,\n \"draws\" text,\n \"losses\" text\n);\n\nQuestion: What is Draws, when Wins is \"Did Not Qualify\"?" }, { "role": "assistant", "content": "SELECT \"draws\" FROM \"world_cup_record\" WHERE \"wins\"='did not qualify';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_cup_record\" (\n \"year\" text,\n \"result\" text,\n \"matches\" text,\n \"wins\" text,\n \"draws\" text,\n \"losses\" text\n);\n\nQuestion: What is Matches, when Draws is \"Did Not Qualify\", and when Year is \"1995\"?" }, { "role": "assistant", "content": "SELECT \"matches\" FROM \"world_cup_record\" WHERE \"draws\"='did not qualify' AND \"year\"='1995';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Date has a Score of 112\u2013118?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_schedule\" WHERE \"score\"='112\u2013118';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Record has a Score of 111\u2013101?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"season_schedule\" WHERE \"score\"='111\u2013101';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Game has a Score of 122\u2013125?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"season_schedule\" WHERE \"score\"='122\u2013125';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Streak has a Game of 3?" }, { "role": "assistant", "content": "SELECT \"streak\" FROM \"season_schedule\" WHERE \"game\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Score has a Record of 1\u20133?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"season_schedule\" WHERE \"record\"='1\u20133';" } ]
[ { "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: How many totals had a silver larger than 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"medal_table\" WHERE \"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\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What was the average bronze when gold was larger than 1 and silver was larger than 2?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"gold\">1 AND \"silver\">2;" } ]