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 \"1988\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: When was Shannon Long the Centerfold model?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"1988\" WHERE \"centerfold_model\"='shannon long';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1988\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: Who was the Centerfold model on 5-88?" }, { "role": "assistant", "content": "SELECT \"centerfold_model\" FROM \"1988\" WHERE \"date\"='5-88';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1988\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: On which date was the interview subject 20 Questions of Judge Reinhold?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"1988\" WHERE \"20_questions\"='judge reinhold';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1988\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: Who was the Centerfild model that used Bruce Willis as her Interview subject?" }, { "role": "assistant", "content": "SELECT \"centerfold_model\" FROM \"1988\" WHERE \"interview_subject\"='bruce willis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_details\" (\n \"series\" text,\n \"host\" text,\n \"launch_date\" text,\n \"finale_date\" text,\n \"days\" real,\n \"winner\" text,\n \"prize\" text\n);\n\nQuestion: What is Series, when Launch Date is 23 February 2013?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"series_details\" WHERE \"launch_date\"='23 february 2013';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_details\" (\n \"series\" text,\n \"host\" text,\n \"launch_date\" text,\n \"finale_date\" text,\n \"days\" real,\n \"winner\" text,\n \"prize\" text\n);\n\nQuestion: What is Series, when Days is greater than 99, and when Prize is \u20ac50,000?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"series_details\" WHERE \"days\">99 AND \"prize\"='\u20ac50,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_details\" (\n \"series\" text,\n \"host\" text,\n \"launch_date\" text,\n \"finale_date\" text,\n \"days\" real,\n \"winner\" text,\n \"prize\" text\n);\n\nQuestion: What is Series, when Winner is Jetmir Salaj?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"series_details\" WHERE \"winner\"='jetmir salaj';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_details\" (\n \"series\" text,\n \"host\" text,\n \"launch_date\" text,\n \"finale_date\" text,\n \"days\" real,\n \"winner\" text,\n \"prize\" text\n);\n\nQuestion: What is Highest Days, when Launch Date is 23 January 2010?" }, { "role": "assistant", "content": "SELECT MAX(\"days\") FROM \"series_details\" WHERE \"launch_date\"='23 january 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest Rank, when Name is Jeremiah Massey, and when Games is less than 20?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"points\" WHERE \"name\"='jeremiah massey' AND \"games\"<20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest Games, when Name is Jeremiah Massey, and when Points is less than 340?" }, { "role": "assistant", "content": "SELECT MIN(\"games\") FROM \"points\" WHERE \"name\"='jeremiah massey' AND \"points\"<340;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest Points, when Games is greater than 20, and when Team is Partizan Belgrade?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"points\" WHERE \"games\">20 AND \"team\"='partizan belgrade';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What is Games, when Points is less than 340, and when Rank is greater than 3?" }, { "role": "assistant", "content": "SELECT \"games\" FROM \"points\" WHERE \"points\"<340 AND \"rank\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What is the sum of Rank, when Name is Will Solomon, and when Games is greater than 21?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"points\" WHERE \"name\"='will solomon' AND \"games\">21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"borussia_m_nchengladbach\" (\n \"round\" text,\n \"opposition\" text,\n \"first_leg\" text,\n \"second_leg\" text,\n \"aggregate_score\" text\n);\n\nQuestion: What was the first leg score in the match against Twente?" }, { "role": "assistant", "content": "SELECT \"first_leg\" FROM \"borussia_m_nchengladbach\" WHERE \"opposition\"='twente';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"borussia_m_nchengladbach\" (\n \"round\" text,\n \"opposition\" text,\n \"first_leg\" text,\n \"second_leg\" text,\n \"aggregate_score\" text\n);\n\nQuestion: What was the first leg score in the 2nd round?" }, { "role": "assistant", "content": "SELECT \"first_leg\" FROM \"borussia_m_nchengladbach\" WHERE \"round\"='2nd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"bills_points\" real,\n \"opponents\" real,\n \"bills_first_downs\" real,\n \"record\" text\n);\n\nQuestion: What were the Bills points on Nov. 11?" }, { "role": "assistant", "content": "SELECT SUM(\"bills_points\") FROM \"schedule\" WHERE \"date\"='nov. 11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"bills_points\" real,\n \"opponents\" real,\n \"bills_first_downs\" real,\n \"record\" text\n);\n\nQuestion: What was the Bills first downs on Oct. 29 with more the 23 Bills points?" }, { "role": "assistant", "content": "SELECT MIN(\"bills_first_downs\") FROM \"schedule\" WHERE \"date\"='oct. 29' AND \"bills_points\">23;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the Bill's attendance on December 6?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"season_schedule\" WHERE \"date\"='december 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: On what date did the Bills play the Houston Oilers before week 12?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_schedule\" WHERE \"week\"<12 AND \"opponent\"='houston oilers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Which team won on the day when attendance was 42,308?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"season_schedule\" WHERE \"attendance\"='42,308';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What week of the season was December 13?" }, { "role": "assistant", "content": "SELECT \"week\" FROM \"season_schedule\" WHERE \"date\"='december 13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest Points in Position 2 with more than 3 Drawn games?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"campeonato_paulista\" WHERE \"position\"=2 AND \"drawn\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the goal Difference at Position 5?" }, { "role": "assistant", "content": "SELECT \"difference\" FROM \"campeonato_paulista\" WHERE \"position\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the average games Played with positions higher than 3 that have goals Against less than 27 and a Lost games smaller than 6?" }, { "role": "assistant", "content": "SELECT AVG(\"played\") FROM \"campeonato_paulista\" WHERE \"position\">3 AND \"against\"<27 AND \"lost\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest Points with a Lost total of 8?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"campeonato_paulista\" WHERE \"lost\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which average Points has a Lost higher than 20?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"campeonato_paulista\" WHERE \"lost\">20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What are the Cuts made with a Top-10 smaller than 2?" }, { "role": "assistant", "content": "SELECT SUM(\"cuts_made\") FROM \"summary\" WHERE \"top_10\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the Top-25 with a Top-10 of 8, and an Events of 45?" }, { "role": "assistant", "content": "SELECT AVG(\"top_25\") FROM \"summary\" WHERE \"top_10\"=8 AND \"events\"=45;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the Top-25 with an Events of 20, and a Wins larger than 2?" }, { "role": "assistant", "content": "SELECT AVG(\"top_25\") FROM \"summary\" WHERE \"events\"=20 AND \"wins\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Which Top-10 has a Top-25 smaller than 18, and a Top-5 of 6, and a Cuts made smaller than 20?" }, { "role": "assistant", "content": "SELECT MAX(\"top_10\") FROM \"summary\" WHERE \"top_25\"<18 AND \"top_5\"=6 AND \"cuts_made\"<20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_thursday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is Top Par, when Score is less than 68, and when Country is England?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"first_round_thursday\" WHERE \"score\"<68 AND \"country\"='england';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_thursday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is Sum of Score, when Player is Vijay Singh?" }, { "role": "assistant", "content": "SELECT SUM(\"score\") FROM \"first_round_thursday\" WHERE \"player\"='vijay singh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_thursday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is Sum of Score, when Place is T2, and when Player is Justin Leonard?" }, { "role": "assistant", "content": "SELECT SUM(\"score\") FROM \"first_round_thursday\" WHERE \"place\"='t2' AND \"player\"='justin leonard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_thursday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is Place, when Score is less than 67, and when Country is South Africa?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"first_round_thursday\" WHERE \"score\"<67 AND \"country\"='south africa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tuesday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What show was on at 8:00 when american idol was on at 9:00?" }, { "role": "assistant", "content": "SELECT \"8_00\" FROM \"tuesday\" WHERE \"9_00\"='american idol';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tuesday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What was on at 8:30 when dancing with the stars: the results was on at 9:30?" }, { "role": "assistant", "content": "SELECT \"8_30\" FROM \"tuesday\" WHERE \"9_30\"='dancing with the stars: the results';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tuesday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What was on at 8:30 when dancing with the stars: the results was on at 9:30?" }, { "role": "assistant", "content": "SELECT \"8_30\" FROM \"tuesday\" WHERE \"9_00\"='dancing with the stars: the results';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tuesday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What was on at 10:00 when ncis was on at 8:00?" }, { "role": "assistant", "content": "SELECT \"10_00\" FROM \"tuesday\" WHERE \"8_00\"='ncis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Can you tell me the Team that has the Laps of 379?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"24_hours_of_le_mans_results\" WHERE \"laps\"=379;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_21\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text\n);\n\nQuestion: What is the Tournament with a Margin of victory that was 4 strokes?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"pga_tour_wins_21\" WHERE \"margin_of_victory\"='4 strokes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text\n);\n\nQuestion: What is 1999, when 1998 is 2R?" }, { "role": "assistant", "content": "SELECT \"1999\" FROM \"singles_performance_timeline\" WHERE \"1998\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text\n);\n\nQuestion: What is 1998, when 1994 is Grand Slam Tournaments?" }, { "role": "assistant", "content": "SELECT \"1998\" FROM \"singles_performance_timeline\" WHERE \"1994\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text\n);\n\nQuestion: What is 2009, when 2000 is 1R, and when 1998 is 3R?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"2000\"='1r' AND \"1998\"='3r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text\n);\n\nQuestion: What is 2009, when 2008 is 1R, and when Tournament is French Open?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"2008\"='1r' AND \"tournament\"='french open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text\n);\n\nQuestion: What is 2009, when 2004 is 2R, and when 1993 is A?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"2004\"='2r' AND \"1993\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average amount of gold medals for a country with more than 12 total medals?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"medals_table\" WHERE \"total\">12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: Who were the Visitor when the Nets were the Home team?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"november\" WHERE \"home\"='nets';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: What Leading scorer had a Score of 80\u2013112?" }, { "role": "assistant", "content": "SELECT \"leading_scorer\" FROM \"november\" WHERE \"score\"='80\u2013112';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_16\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the name of the tournament played on Sep 20, 1981, ending with a margin of vicroty of 2 strokes?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"pga_tour_wins_16\" WHERE \"margin_of_victory\"='2 strokes' AND \"date\"='sep 20, 1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_16\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: For the tournament played on Jul 4, 1982, what was the winning score?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"pga_tour_wins_16\" WHERE \"date\"='jul 4, 1982';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_16\" (\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 for the Andy Williams-San Diego Open Invitational tournament?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"pga_tour_wins_16\" WHERE \"tournament\"='andy williams-san diego open invitational';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_16\" (\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(s)-up for the tournament played on Jun 3, 1973?" }, { "role": "assistant", "content": "SELECT \"runner_s_up\" FROM \"pga_tour_wins_16\" WHERE \"date\"='jun 3, 1973';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_16\" (\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 for the tournament played on Jul 14, 1973?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"pga_tour_wins_16\" WHERE \"date\"='jul 14, 1973';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_16\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: In which tournament was Gil Morgan the runner-up?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"pga_tour_wins_16\" WHERE \"runner_s_up\"='gil morgan';" } ]
[ { "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 \"tv_time\" text,\n \"attendance\" real\n);\n\nQuestion: What was the highest attendance when the Atlanta Falcons played for a week smaller than 10?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='atlanta falcons' AND \"week\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What is the Result when the Theme was by Dolly Parton?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"performances_results\" WHERE \"theme\"='dolly parton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What is the Order # when the song choice was \" you're so vain \"?" }, { "role": "assistant", "content": "SELECT \"order_num\" FROM \"performances_results\" WHERE \"song_choice\"='\\\" you''re so vain \\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What is the Theme when the Original artist was carole king, and a Week # shows hollywood?" }, { "role": "assistant", "content": "SELECT \"theme\" FROM \"performances_results\" WHERE \"original_artist\"='carole king' AND \"week_num\"='hollywood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What is the Result when the Song choice was \"beautiful\"?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"performances_results\" WHERE \"song_choice\"='\\\"beautiful\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What Week # that is there an Order # of 7, and the Song choice was \" let it be \"?" }, { "role": "assistant", "content": "SELECT \"week_num\" FROM \"performances_results\" WHERE \"order_num\"='7' AND \"song_choice\"='\\\" let it be \\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What is the Song choice when there is an Order # of 4?" }, { "role": "assistant", "content": "SELECT \"song_choice\" FROM \"performances_results\" WHERE \"order_num\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"animals\" (\n \"animal\" text,\n \"proto_austronesian\" text,\n \"proto_malayo_polynesian\" text,\n \"proto_oceanic\" text,\n \"proto_polynesian\" text\n);\n\nQuestion: What proto-oceanic has louse as the animal?" }, { "role": "assistant", "content": "SELECT \"proto_oceanic\" FROM \"animals\" WHERE \"animal\"='louse';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"96pct_of_precincts_reporting\" (\n \"candidate\" text,\n \"state_delegate\" real,\n \"percentage\" text,\n \"delegates\" real,\n \"counties_carries\" real\n);\n\nQuestion: What is the total number of delegate that have 4 counties carries and more than 1,903 state delegates?" }, { "role": "assistant", "content": "SELECT SUM(\"delegates\") FROM \"96pct_of_precincts_reporting\" WHERE \"counties_carries\"=4 AND \"state_delegate\">'1,903';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Home team with an Away team that is oxford united?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"first_round_proper\" WHERE \"away_team\"='oxford united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Home team with an Away team that is wrexham?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"first_round_proper\" WHERE \"away_team\"='wrexham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Gold has a Silver of 7, and a Bronze smaller than 7?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"silver\"=7 AND \"bronze\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Bronze has a Silver of 15, and a Gold smaller than 20?" }, { "role": "assistant", "content": "SELECT SUM(\"bronze\") FROM \"medal_table\" WHERE \"silver\"=15 AND \"gold\"<20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Bronze has a Silver of 7, and a Total larger than 25?" }, { "role": "assistant", "content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"silver\"=7 AND \"total\">25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Gold has a Bronze larger than 1, and a Total larger than 80?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"bronze\">1 AND \"total\">80;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Total has a Silver larger than 8, and a Bronze of 20, and a Gold smaller than 20?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"medal_table\" WHERE \"silver\">8 AND \"bronze\"=20 AND \"gold\"<20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_c\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is the total of NA for set 4, a score of 3-0 and a 26-24 for set 2?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"results_pool_c\" WHERE \"set_4\"='na' AND \"score\"='3-0' AND \"set_2\"='26-24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_c\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is the total of the 3-0 score with a set 2 of 25-12 and a set 3 of 25-18?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"results_pool_c\" WHERE \"score\"='3-0' AND \"set_3\"='25-18' AND \"set_2\"='25-12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_c\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is the set 5 of the match with a set 2 of 26-24 and a set 1 of 27-25?" }, { "role": "assistant", "content": "SELECT \"set_5\" FROM \"results_pool_c\" WHERE \"set_2\"='26-24' AND \"set_1\"='27-25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Who has a total number of 76 silver medals?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"overall\" WHERE \"total\"=76;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What score has ipswich town as the home team, and replay as the tie no.?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"home_team\"='ipswich town' AND \"tie_no\"='replay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What score has grays athletic as the home team?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"home_team\"='grays athletic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date has 6 as the tie no.?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"first_round_proper\" WHERE \"tie_no\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"round\" text,\n \"race\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: What is Fastest Lap, when Winning Team is Team BRM, when Race is 1, when Pole Position is Leanne Tander, and when Circuit is Phillip Island?" }, { "role": "assistant", "content": "SELECT \"fastest_lap\" FROM \"race_calendar\" WHERE \"winning_team\"='team brm' AND \"race\"=1 AND \"pole_position\"='leanne tander' AND \"circuit\"='phillip island';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"round\" text,\n \"race\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: What is Fastest Lap, when Round is 5, and when Winning Driver is James Winslow?" }, { "role": "assistant", "content": "SELECT \"fastest_lap\" FROM \"race_calendar\" WHERE \"round\"='5' AND \"winning_driver\"='james winslow';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"round\" text,\n \"race\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: What is Date, when Fastest Lap is James Winslow, when Race is 1, and when Winning Driver is Leanne Tander?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"race_calendar\" WHERE \"fastest_lap\"='james winslow' AND \"race\"=1 AND \"winning_driver\"='leanne tander';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"round\" text,\n \"race\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: What is Pole Position, when Circuit is Adelaide Street Circuit, and when Winning Team is Piccola Scuderia Corse?" }, { "role": "assistant", "content": "SELECT \"pole_position\" FROM \"race_calendar\" WHERE \"circuit\"='adelaide street circuit' AND \"winning_team\"='piccola scuderia corse';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"date\" text,\n \"location\" text,\n \"country\" text,\n \"event\" text,\n \"winner\" text,\n \"runner_up\" text\n);\n\nQuestion: What country was the game played in when the location was trestles?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"tournaments\" WHERE \"location\"='trestles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"date\" text,\n \"location\" text,\n \"country\" text,\n \"event\" text,\n \"winner\" text,\n \"runner_up\" text\n);\n\nQuestion: What date was the game played when it was located at bells beach?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"tournaments\" WHERE \"location\"='bells beach';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"date\" text,\n \"location\" text,\n \"country\" text,\n \"event\" text,\n \"winner\" text,\n \"runner_up\" text\n);\n\nQuestion: What country was the game played when it was played from April 11-April 21?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"tournaments\" WHERE \"date\"='april 11-april 21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"date\" text,\n \"location\" text,\n \"country\" text,\n \"event\" text,\n \"winner\" text,\n \"runner_up\" text\n);\n\nQuestion: Who was the Runner-up when the game was played at Bells Beach?" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"tournaments\" WHERE \"location\"='bells beach';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"reception\" (\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" text\n);\n\nQuestion: Which Accolade had a publication of Under the Radar?" }, { "role": "assistant", "content": "SELECT \"accolade\" FROM \"reception\" WHERE \"publication\"='under the radar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"reception\" (\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" text\n);\n\nQuestion: Which year had a publication of Pazz & Jop?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"reception\" WHERE \"publication\"='pazz & jop';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_up_summary\" (\n \"district\" real,\n \"incumbent\" text,\n \"2008_status\" text,\n \"democratic\" text,\n \"republican\" text\n);\n\nQuestion: How many districts featured the democrat nicholas von stein?" }, { "role": "assistant", "content": "SELECT COUNT(\"district\") FROM \"match_up_summary\" WHERE \"democratic\"='nicholas von stein';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_up_summary\" (\n \"district\" real,\n \"incumbent\" text,\n \"2008_status\" text,\n \"democratic\" text,\n \"republican\" text\n);\n\nQuestion: Which incumbent's democratic candidate was mike carroll?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"match_up_summary\" WHERE \"democratic\"='mike carroll';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1962_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"liberal_ticket\" text,\n \"conservative_ticket\" text,\n \"socialist_workers_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: Who ran under the Democratic ticket when Edward R. Dudley ran under the Liberal ticket?" }, { "role": "assistant", "content": "SELECT \"democratic_ticket\" FROM \"1962_state_election_results\" WHERE \"liberal_ticket\"='edward r. dudley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1962_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"liberal_ticket\" text,\n \"conservative_ticket\" text,\n \"socialist_workers_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: When John Emanuel ran under the Socialist Labor ticket who ran under the Democratic ticket?" }, { "role": "assistant", "content": "SELECT \"democratic_ticket\" FROM \"1962_state_election_results\" WHERE \"socialist_labor_ticket\"='john emanuel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1962_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"liberal_ticket\" text,\n \"conservative_ticket\" text,\n \"socialist_workers_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: What was the office up for election when Sylvia Weinstein ran under the Socialist Workers ticket?" }, { "role": "assistant", "content": "SELECT \"office\" FROM \"1962_state_election_results\" WHERE \"socialist_workers_ticket\"='sylvia weinstein';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1962_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"liberal_ticket\" text,\n \"conservative_ticket\" text,\n \"socialist_workers_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: Who ran under the Socialist Labor ticket when Robert M. Morgenthau ran for the Democratic ticket?" }, { "role": "assistant", "content": "SELECT \"socialist_labor_ticket\" FROM \"1962_state_election_results\" WHERE \"democratic_ticket\"='robert m. morgenthau';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1962_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"liberal_ticket\" text,\n \"conservative_ticket\" text,\n \"socialist_workers_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: When Republican ticket was John P. Lomenzo who ran for the Socialist Workers ticket?" }, { "role": "assistant", "content": "SELECT \"socialist_workers_ticket\" FROM \"1962_state_election_results\" WHERE \"republican_ticket\"='john p. lomenzo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"area_and_population\" (\n \"member_state\" text,\n \"population_in_millions\" real,\n \"population_pct_of_eu\" text,\n \"area_km_2\" real,\n \"area_pct_of_eu\" text,\n \"pop_density_people_km_2\" real\n);\n\nQuestion: What is the area km2 of the area with a pop density people/km2 larger than 91, is a member state of Italy, and had less than 58.8 population in millions?" }, { "role": "assistant", "content": "SELECT SUM(\"area_km_2\") FROM \"area_and_population\" WHERE \"pop_density_people_km_2\">91 AND \"member_state\"='italy' AND \"population_in_millions\"<58.8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"area_and_population\" (\n \"member_state\" text,\n \"population_in_millions\" real,\n \"population_pct_of_eu\" text,\n \"area_km_2\" real,\n \"area_pct_of_eu\" text,\n \"pop_density_people_km_2\" real\n);\n\nQuestion: What is the area % of EU with 16.4 population in millions?" }, { "role": "assistant", "content": "SELECT \"area_pct_of_eu\" FROM \"area_and_population\" WHERE \"population_in_millions\"=16.4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"area_and_population\" (\n \"member_state\" text,\n \"population_in_millions\" real,\n \"population_pct_of_eu\" text,\n \"area_km_2\" real,\n \"area_pct_of_eu\" text,\n \"pop_density_people_km_2\" real\n);\n\nQuestion: What is the total number of area km2 with a 4.2 population in millions and is a member state of the Czech Republic?" }, { "role": "assistant", "content": "SELECT COUNT(\"area_km_2\") FROM \"area_and_population\" WHERE \"population_in_millions\">4.2 AND \"member_state\"='czech republic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"area_and_population\" (\n \"member_state\" text,\n \"population_in_millions\" real,\n \"population_pct_of_eu\" text,\n \"area_km_2\" real,\n \"area_pct_of_eu\" text,\n \"pop_density_people_km_2\" real\n);\n\nQuestion: What is the sum of the pop density people/km2 with a population % of EU of 0.1%, an area % of EU of 0.1%, and has more than 0.5 population in millions?" }, { "role": "assistant", "content": "SELECT SUM(\"pop_density_people_km_2\") FROM \"area_and_population\" WHERE \"population_pct_of_eu\"='0.1%' AND \"area_pct_of_eu\"='0.1%' AND \"population_in_millions\">0.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"area_and_population\" (\n \"member_state\" text,\n \"population_in_millions\" real,\n \"population_pct_of_eu\" text,\n \"area_km_2\" real,\n \"area_pct_of_eu\" text,\n \"pop_density_people_km_2\" real\n);\n\nQuestion: What is the lowest area km2 of the member state of the Czech Republic and has a population in millions lesss than 10.3?" }, { "role": "assistant", "content": "SELECT MIN(\"area_km_2\") FROM \"area_and_population\" WHERE \"member_state\"='czech republic' AND \"population_in_millions\"<10.3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2004_summer_olympics_m\" (\n \"name\" text,\n \"date_of_birth\" text,\n \"height\" real,\n \"weight\" real,\n \"spike\" real,\n \"block\" real\n);\n\nQuestion: Weighing less than 85, with less than 340 Spikes, what is Gilberto Godoy Filho's Height" }, { "role": "assistant", "content": "SELECT COUNT(\"height\") FROM \"volleyball_at_the_2004_summer_olympics_m\" WHERE \"spike\"<340 AND \"name\"='gilberto godoy filho' AND \"weight\"<85;" } ]