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 \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many goals have more than 38 played and more than 9 draws?" }, { "role": "assistant", "content": "SELECT SUM(\"goals_for\") FROM \"final_table\" WHERE \"draws\">9 AND \"played\">38;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many losses has more than 59 goals against and more than 17 position?" }, { "role": "assistant", "content": "SELECT MIN(\"losses\") FROM \"final_table\" WHERE \"goals_against\">59 AND \"position\">17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: On what Date was the Meet of 2007 Pan American Games with a Time of 1:07.78?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"women\" WHERE \"meet\"='2007 pan american games' AND \"time\"='1:07.78';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What Nationality's time is 2:07.64?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"women\" WHERE \"time\"='2:07.64';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What Event's Time is 4:01.00?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"women\" WHERE \"time\"='4:01.00';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: In what Location in the United States the Time 2:25.62?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"women\" WHERE \"nationality\"='united states' AND \"time\"='2:25.62';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"outdoor\" (\n \"year\" real,\n \"record\" text,\n \"regular_season_finish\" text,\n \"playoffs\" text,\n \"avg_attendance\" real\n);\n\nQuestion: Year larger than 1975, and a Record of 13\u201311 is what playoffs?" }, { "role": "assistant", "content": "SELECT \"playoffs\" FROM \"outdoor\" WHERE \"year\">1975 AND \"record\"='13\u201311';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sunday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: Which 9:30 has a 10:30 of le journal weekend?" }, { "role": "assistant", "content": "SELECT \"9_30\" FROM \"sunday\" WHERE \"10_30\"='le journal weekend';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sunday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: Which 9:00 has an 8:00 behind the movies?" }, { "role": "assistant", "content": "SELECT \"9_00\" FROM \"sunday\" WHERE \"8_00\"='behind the movies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sunday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: What 10:00 has a 7:30 of da kink in my hair?" }, { "role": "assistant", "content": "SELECT \"10_00\" FROM \"sunday\" WHERE \"7_30\"='da kink in my hair';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sunday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: What 7:00 has a 9:30 of tout le monde en parle?" }, { "role": "assistant", "content": "SELECT \"7_00\" FROM \"sunday\" WHERE \"9_30\"='tout le monde en parle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sunday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: What 7:00 has a 10:00 of dirty sexy money?" }, { "role": "assistant", "content": "SELECT \"7_00\" FROM \"sunday\" WHERE \"10_00\"='dirty sexy money';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sunday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: What 10:00 has a 8:00 of movies?" }, { "role": "assistant", "content": "SELECT \"10_00\" FROM \"sunday\" WHERE \"8_00\"='movies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_titles\" (\n \"competition\" text,\n \"venue\" text,\n \"year\" real,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What are the venues prior to 2005 in the World Class category that resulted in a bronze?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"major_titles\" WHERE \"year\"<2005 AND \"category\"='world class' AND \"result\"='bronze';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_titles\" (\n \"competition\" text,\n \"venue\" text,\n \"year\" real,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What are the competitions that occurred before 2006 in SVK Nitra?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"major_titles\" WHERE \"year\"<2006 AND \"venue\"='svk nitra';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_titles\" (\n \"competition\" text,\n \"venue\" text,\n \"year\" real,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What are the categories of events that occurred after 2007 that were World Championships?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"major_titles\" WHERE \"year\">2007 AND \"competition\"='world championships';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_titles\" (\n \"competition\" text,\n \"venue\" text,\n \"year\" real,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What was the result of events held at Nor Elverum, prior to 2010?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"major_titles\" WHERE \"year\"<2010 AND \"venue\"='nor elverum';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_titles\" (\n \"competition\" text,\n \"venue\" text,\n \"year\" real,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What was the competition held in 2003?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"major_titles\" WHERE \"year\"=2003;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What chassis type does a scuderia ferrari with more than 1 point have?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='scuderia ferrari' AND \"points\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: A ferrari flat-12 engine with more than 1 point has what kind of chassis?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='ferrari flat-12' AND \"points\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the average year for a merzario a2 chassis?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='merzario a2';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: What was the team's record when they played visitor team Chicago Black Hawks on November 24?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"visitor\"='chicago black hawks' AND \"date\"='november 24';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: What is the name of the visitor team who played home team Chicago Black Hawks on March 20?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"regular_season\" WHERE \"home\"='chicago black hawks' AND \"date\"='march 20';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: What was the team's record on November 12?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"date\"='november 12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners_and_runners_up\" (\n \"year\" text,\n \"date_final\" text,\n \"venue\" text,\n \"prize_money\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"score_in_final\" text,\n \"commercial_name\" text\n);\n\nQuestion: What champion has 1981 as the year?" }, { "role": "assistant", "content": "SELECT \"champion\" FROM \"past_winners_and_runners_up\" WHERE \"year\"='1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners_and_runners_up\" (\n \"year\" text,\n \"date_final\" text,\n \"venue\" text,\n \"prize_money\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"score_in_final\" text,\n \"commercial_name\" text\n);\n\nQuestion: What date final has 1982 as the year?" }, { "role": "assistant", "content": "SELECT \"date_final\" FROM \"past_winners_and_runners_up\" WHERE \"year\"='1982';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners_and_runners_up\" (\n \"year\" text,\n \"date_final\" text,\n \"venue\" text,\n \"prize_money\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"score_in_final\" text,\n \"commercial_name\" text\n);\n\nQuestion: What prize money has michelob light challenge of champions as the commercial name?" }, { "role": "assistant", "content": "SELECT \"prize_money\" FROM \"past_winners_and_runners_up\" WHERE \"commercial_name\"='michelob light challenge of champions';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners_and_runners_up\" (\n \"year\" text,\n \"date_final\" text,\n \"venue\" text,\n \"prize_money\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"score_in_final\" text,\n \"commercial_name\" text\n);\n\nQuestion: What date final has 1989 as the year?" }, { "role": "assistant", "content": "SELECT \"date_final\" FROM \"past_winners_and_runners_up\" WHERE \"year\"='1989';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners_and_runners_up\" (\n \"year\" text,\n \"date_final\" text,\n \"venue\" text,\n \"prize_money\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"score_in_final\" text,\n \"commercial_name\" text\n);\n\nQuestion: What score in final has boris becker as the champion?" }, { "role": "assistant", "content": "SELECT \"score_in_final\" FROM \"past_winners_and_runners_up\" WHERE \"champion\"='boris becker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the greatest point of an Entrant of connaught engineering alta straight-4 engine before 1957" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"complete_world_championship_formula_one_\" WHERE \"engine\"='alta straight-4' AND \"entrant\"='connaught engineering' AND \"year\"<1957;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What 1957 engine has a Chassis of connaught type b?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"complete_world_championship_formula_one_\" WHERE \"chassis\"='connaught type b' AND \"year\">1957;" } ]
[ { "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 \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Name the least year for david eddy" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"winners\" WHERE \"men_s_singles\"='david eddy';" } ]
[ { "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 \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Name the mixed doubles for year before 1991 and men's doubles of david jepson buck ryan" }, { "role": "assistant", "content": "SELECT \"mixed_doubles\" FROM \"winners\" WHERE \"year\"<1991 AND \"men_s_doubles\"='david jepson buck ryan';" } ]
[ { "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 \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Name the women's doubles for year less than 1972" }, { "role": "assistant", "content": "SELECT \"women_s_doubles\" FROM \"winners\" WHERE \"year\"<1972;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_9\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: When was the winning score \u22129 (72-68-64-67=271)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"champions_tour_wins_9\" WHERE \"winning_score\"='\u22129 (72-68-64-67=271)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_9\" (\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 margin of victory for the Mississippi Gulf Resort Classic?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"champions_tour_wins_9\" WHERE \"tournament\"='mississippi gulf resort classic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_9\" (\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 margin of victory when Mark Calcavecchia was the runner-up?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"champions_tour_wins_9\" WHERE \"runner_s_up\"='mark calcavecchia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_9\" (\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 date of the Ace Group Classic tournament with a 1 stroke margin of victory?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"champions_tour_wins_9\" WHERE \"margin_of_victory\"='1 stroke' AND \"tournament\"='the ace group classic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_9\" (\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 margin of victory when the winning score was \u22129 (72-68-64-67=271)?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"champions_tour_wins_9\" WHERE \"winning_score\"='\u22129 (72-68-64-67=271)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1981_raiders_draft_selections\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the average round for te position?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"1981_raiders_draft_selections\" WHERE \"position\"='te';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1981_raiders_draft_selections\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the average overall for james davis" }, { "role": "assistant", "content": "SELECT AVG(\"overall\") FROM \"1981_raiders_draft_selections\" WHERE \"player\"='james davis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1981_raiders_draft_selections\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the most overall for james davis and round more than 5" }, { "role": "assistant", "content": "SELECT MAX(\"overall\") FROM \"1981_raiders_draft_selections\" WHERE \"player\"='james davis' AND \"round\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1981_raiders_draft_selections\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the total number of overall for villanova and round less than 2" }, { "role": "assistant", "content": "SELECT COUNT(\"overall\") FROM \"1981_raiders_draft_selections\" WHERE \"college\"='villanova' AND \"round\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_50_most_topographically_prominent_su\" (\n \"rank\" real,\n \"mountain_peak\" text,\n \"state\" text,\n \"mountain_range\" text,\n \"location\" text\n);\n\nQuestion: Which state is Mount Chiginagak located in?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"the_50_most_topographically_prominent_su\" WHERE \"mountain_peak\"='mount chiginagak';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"date\" text,\n \"location\" text,\n \"nature_of_incident\" text,\n \"circumstances\" text,\n \"casualties\" text\n);\n\nQuestion: What were the circumstances for the Baghlan location?" }, { "role": "assistant", "content": "SELECT \"circumstances\" FROM \"2008\" WHERE \"location\"='baghlan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"date\" text,\n \"location\" text,\n \"nature_of_incident\" text,\n \"circumstances\" text,\n \"casualties\" text\n);\n\nQuestion: What were the casualties in the Baghlan location?" }, { "role": "assistant", "content": "SELECT \"casualties\" FROM \"2008\" WHERE \"location\"='baghlan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"date\" text,\n \"location\" text,\n \"nature_of_incident\" text,\n \"circumstances\" text,\n \"casualties\" text\n);\n\nQuestion: What was the date of natural cause situation?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"2008\" WHERE \"circumstances\"='natural cause';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Which Gold Coast has a Perth of no, a Sydney of yes, and an Auckland of yes?" }, { "role": "assistant", "content": "SELECT \"gold_coast\" FROM \"2008\" WHERE \"perth\"='no' AND \"sydney\"='yes' AND \"auckland\"='yes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Which Melbourne has an Auckland of no, and a Gold Coast of no?" }, { "role": "assistant", "content": "SELECT \"melbourne\" FROM \"2008\" WHERE \"auckland\"='no' AND \"gold_coast\"='no';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Which Adelaide has a Melbourne of yes, an Auckland of yes, and a Perth of yes?" }, { "role": "assistant", "content": "SELECT \"adelaide\" FROM \"2008\" WHERE \"melbourne\"='yes' AND \"auckland\"='yes' AND \"perth\"='yes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Which Sydney has a Perth of no, a Melbourne of yes, and a Gold Coast of no?" }, { "role": "assistant", "content": "SELECT \"sydney\" FROM \"2008\" WHERE \"perth\"='no' AND \"melbourne\"='yes' AND \"gold_coast\"='no';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Which Auckland has an Adelaide of no, a Melbourne of yes, and a Sydney of yes?" }, { "role": "assistant", "content": "SELECT \"auckland\" FROM \"2008\" WHERE \"adelaide\"='no' AND \"melbourne\"='yes' AND \"sydney\"='yes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Which Adelaide has an Auckland of yes, a Melbourne of yes, a Perth of yes, and a Sydney of cancelled?" }, { "role": "assistant", "content": "SELECT \"adelaide\" FROM \"2008\" WHERE \"auckland\"='yes' AND \"melbourne\"='yes' AND \"perth\"='yes' AND \"sydney\"='cancelled';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_time_teams\" (\n \"team\" text,\n \"truck_s\" text,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Who is the owner of RSS Racing that driver Ryan Sieg belongs to?" }, { "role": "assistant", "content": "SELECT \"owner_s\" FROM \"full_time_teams\" WHERE \"team\"='rss racing' AND \"driver_s\"='ryan sieg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_time_teams\" (\n \"team\" text,\n \"truck_s\" text,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Parts Plus sponsors what driver?" }, { "role": "assistant", "content": "SELECT \"driver_s\" FROM \"full_time_teams\" WHERE \"primary_sponsor_s\"='parts plus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_time_teams\" (\n \"team\" text,\n \"truck_s\" text,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Who is the owner of NTS Motorsports sponsored by Qore-24?" }, { "role": "assistant", "content": "SELECT \"owner_s\" FROM \"full_time_teams\" WHERE \"team\"='nts motorsports' AND \"primary_sponsor_s\"='qore-24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_time_teams\" (\n \"team\" text,\n \"truck_s\" text,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Who is the crew chief, of driver Matt kurzejewski?" }, { "role": "assistant", "content": "SELECT \"crew_chief\" FROM \"full_time_teams\" WHERE \"driver_s\"='matt kurzejewski';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_time_teams\" (\n \"team\" text,\n \"truck_s\" text,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Who is the driver that has a crew chief Gary Ritter?" }, { "role": "assistant", "content": "SELECT \"driver_s\" FROM \"full_time_teams\" WHERE \"crew_chief\"='gary ritter';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"others_awards_and_nominations\" (\n \"year\" real,\n \"result\" text,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text\n);\n\nQuestion: what is the award for the 2009 songwriter of the year?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"others_awards_and_nominations\" WHERE \"year\"=2009 AND \"category\"='songwriter of the year';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"others_awards_and_nominations\" (\n \"year\" real,\n \"result\" text,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text\n);\n\nQuestion: what is the category that has the people's choice awards?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"others_awards_and_nominations\" WHERE \"award\"='people''s choice awards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"others_awards_and_nominations\" (\n \"year\" real,\n \"result\" text,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text\n);\n\nQuestion: what year has general nominated in the category or choice breakthrough artist?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"others_awards_and_nominations\" WHERE \"nominated_work\"='general' AND \"category\"='choice breakthrough artist';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score on 6 February 2008?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"national_team\" WHERE \"date\"='6 february 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which competition was held on 14 November 2012?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"national_team\" WHERE \"date\"='14 november 2012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What competition took place on 10 August 2011?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"national_team\" WHERE \"date\"='10 august 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the average Year with Chassis equalling cooper t60?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='cooper t60';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which Chassis has an Entrant of cooper car company, and a Year of 1963?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='cooper car company' AND \"year\"=1963;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which Entrant has an Engine of climax straight-4, and Points larger than 0?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='climax straight-4' AND \"points\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_18_itf\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which tournament has hard as the surface and apr. 12, 1998 as the date?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_18_itf\" WHERE \"surface\"='hard' AND \"date\"='apr. 12, 1998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_18_itf\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which surface has wynne prakusya as the opponent in the final?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_18_itf\" WHERE \"opponent_in_the_final\"='wynne prakusya';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_18_itf\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What score has wynne prakusya as the opponent in the final?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_18_itf\" WHERE \"opponent_in_the_final\"='wynne prakusya';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_18_itf\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What tournament has nov. 21, 1999 as the date?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_18_itf\" WHERE \"date\"='nov. 21, 1999';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"masterton_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real\n);\n\nQuestion: Name the authority for coed gender and chanel college" }, { "role": "assistant", "content": "SELECT \"authority\" FROM \"masterton_district\" WHERE \"gender\"='coed' AND \"name\"='chanel college';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"masterton_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real\n);\n\nQuestion: Name the average decile for state authority and area of fernridge" }, { "role": "assistant", "content": "SELECT AVG(\"decile\") FROM \"masterton_district\" WHERE \"authority\"='state' AND \"area\"='fernridge';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What was the week on October 11, 1998?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"date\"='october 11, 1998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What is the location of the game with attendance of 63,336?" }, { "role": "assistant", "content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"attendance\"='63,336';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What was the date of the week 13 game?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_regular_season_football_standings\" (\n \"school\" text,\n \"team\" text,\n \"division_record\" text,\n \"overall_record\" text,\n \"season_outcome\" text\n);\n\nQuestion: What is the Panthers' Division Record?" }, { "role": "assistant", "content": "SELECT \"division_record\" FROM \"2007_regular_season_football_standings\" WHERE \"team\"='panthers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_regular_season_football_standings\" (\n \"school\" text,\n \"team\" text,\n \"division_record\" text,\n \"overall_record\" text,\n \"season_outcome\" text\n);\n\nQuestion: What is the Senators' division record?" }, { "role": "assistant", "content": "SELECT \"division_record\" FROM \"2007_regular_season_football_standings\" WHERE \"team\"='senators';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: What was the record after the January 18 game?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"date\"='january 18';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: What was the record after the January 6 game?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"date\"='january 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"settlements_with_population_below_100\" (\n \"rank\" real,\n \"population\" real,\n \"name\" text,\n \"former_name\" text,\n \"municipality\" text\n);\n\nQuestion: Name the total number of ranks for kujalleq with former name of brattahl\u00ed\u00f0 and population less than 47" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"settlements_with_population_below_100\" WHERE \"municipality\"='kujalleq' AND \"former_name\"='brattahl\u00ed\u00f0' AND \"population\"<47;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"settlements_with_population_below_100\" (\n \"rank\" real,\n \"population\" real,\n \"name\" text,\n \"former_name\" text,\n \"municipality\" text\n);\n\nQuestion: Name the former name for 49 rank" }, { "role": "assistant", "content": "SELECT \"former_name\" FROM \"settlements_with_population_below_100\" WHERE \"rank\"=49;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_six\" (\n \"pick_num\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which NHL team has left wing listed as the position?" }, { "role": "assistant", "content": "SELECT \"nhl_team\" FROM \"round_six\" WHERE \"position\"='left wing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ruapehu_district\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What years does Kakahi school, with a decile of 3, have?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"ruapehu_district\" WHERE \"decile\"=3 AND \"name\"='kakahi school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ruapehu_district\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the average decile of Ruapehu college, which has a state authority?" }, { "role": "assistant", "content": "SELECT AVG(\"decile\") FROM \"ruapehu_district\" WHERE \"authority\"='state' AND \"name\"='ruapehu college';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ruapehu_district\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the roll number of Orautoha school in Raetihi, which has a decile smaller than 8?" }, { "role": "assistant", "content": "SELECT SUM(\"roll\") FROM \"ruapehu_district\" WHERE \"area\"='raetihi' AND \"name\"='orautoha school' AND \"decile\"<8;" } ]
[ { "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 \"home_away_game\" text,\n \"result\" text\n);\n\nQuestion: On what day was Utah Blaze the opponent?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"opponent\"='utah blaze';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1999\" text,\n \"2002\" text,\n \"2004\" text,\n \"2006\" text,\n \"2007\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the 2006 value with a 1r in 2011?" }, { "role": "assistant", "content": "SELECT \"2006\" FROM \"doubles_performance_timeline\" WHERE \"2011\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1999\" text,\n \"2002\" text,\n \"2004\" text,\n \"2006\" text,\n \"2007\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the 2010 value with a 2r in 200r and a 3r in 2011?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"doubles_performance_timeline\" WHERE \"2004\"='2r' AND \"2011\"='3r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1999\" text,\n \"2002\" text,\n \"2004\" text,\n \"2006\" text,\n \"2007\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the 2007 value with a 2r in 2012 and 1r in 2002?" }, { "role": "assistant", "content": "SELECT \"2007\" FROM \"doubles_performance_timeline\" WHERE \"2012\"='2r' AND \"2002\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1999\" text,\n \"2002\" text,\n \"2004\" text,\n \"2006\" text,\n \"2007\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the 2004 value in the 2011 Grand Slam Tournaments?" }, { "role": "assistant", "content": "SELECT \"2004\" FROM \"doubles_performance_timeline\" WHERE \"2011\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1999\" text,\n \"2002\" text,\n \"2004\" text,\n \"2006\" text,\n \"2007\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the 2004 value with a sf in 2010?" }, { "role": "assistant", "content": "SELECT \"2004\" FROM \"doubles_performance_timeline\" WHERE \"2010\"='sf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canadian_open\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who played women's singles in 2002?" }, { "role": "assistant", "content": "SELECT \"women_s_singles\" FROM \"canadian_open\" WHERE \"year\"='2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canadian_open\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who played men's doubles in 1963?" }, { "role": "assistant", "content": "SELECT \"men_s_doubles\" FROM \"canadian_open\" WHERE \"year\"='1963';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal_num\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Name the score for 30 january 2013" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"date\"='30 january 2013';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal_num\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Name the result for goal # more than 4" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"international_goals\" WHERE \"goal_num\">4;" } ]
[ { "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 is Fred Couples to par?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"player\"='fred couples';" } ]
[ { "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 has a score under 68?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"first_round\" WHERE \"score\"<68;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Which driver won when o.m. was the winning constructor ?" }, { "role": "assistant", "content": "SELECT \"winning_driver\" FROM \"other_grands_prix\" WHERE \"winning_constructor\"='o.m.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Which driver won when the winning constructor was bugatti at the Boulogne Grand Prix ?" }, { "role": "assistant", "content": "SELECT \"winning_driver\" FROM \"other_grands_prix\" WHERE \"winning_constructor\"='bugatti' AND \"name\"='boulogne grand prix';" } ]