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 \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: Can you tell me the total number of Draw that has the Artist of de spelbrekers, and the Points smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"draw\") FROM \"results\" WHERE \"artist\"='de spelbrekers' AND \"points\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: Can you tell me the Artist that has the Draw smaller than 16, and the English translation of lullaby?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"results\" WHERE \"draw\"<16 AND \"english_translation\"='lullaby';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: Can you tell me the English translation that has the Artist of camillo felgen?"
},
{
"role": "assistant",
"content": "SELECT \"english_translation\" FROM \"results\" WHERE \"artist\"='camillo felgen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communities\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the population of the town with an area larger than 3.09?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"population\") FROM \"communities\" WHERE \"area_km_2\">3.09 AND \"status\"='town';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communities\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the area of the community with a census ranking of 636 of 5,008?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"area_km_2\") FROM \"communities\" WHERE \"census_ranking\"='636 of 5,008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communities\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the area of drummond village?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"area_km_2\") FROM \"communities\" WHERE \"status\"='village' AND \"official_name\"='drummond';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communities\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the status of the community with a census ranking of 2,418 of 5,008?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"communities\" WHERE \"census_ranking\"='2,418 of 5,008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communities\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the area of the village with a census ranking of 1,442 of 5,008 and a population less than 1,778?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"area_km_2\") FROM \"communities\" WHERE \"status\"='village' AND \"census_ranking\"='1,442 of 5,008' AND \"population\"<'1,778';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: WHAT YEAR HAS A TO PAR SMALLER THAN 16, TOTAL 151?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"missed_the_cut\" WHERE \"to_par\"<16 AND \"total\"=151;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: WHAT IS THE TOTAL WITH A TO PAR OF 10?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"missed_the_cut\" WHERE \"to_par\"=10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: WHAT IS THE PLAYER WITH TOTAL LESS THAN 151, TO PAR OF 8?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"missed_the_cut\" WHERE \"total\"<151 AND \"to_par\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"player\" text,\n \"position\" text,\n \"league_cup\" real,\n \"scottish_cup\" real,\n \"uefa_champions_league\" real,\n \"total\" real\n);\n\nQuestion: Who is the player who has a total less than 4, no scottish cups, and a league cup greater than 0?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"top_scorers\" WHERE \"total\"<4 AND \"scottish_cup\"=0 AND \"league_cup\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"player\" text,\n \"position\" text,\n \"league_cup\" real,\n \"scottish_cup\" real,\n \"uefa_champions_league\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of the scottish cup of the forward player with less than 2 league cups and a total greater than 6?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"scottish_cup\") FROM \"top_scorers\" WHERE \"league_cup\"<2 AND \"total\">6 AND \"position\"='forward';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"kaine_d\" text,\n \"kilgore_r\" text,\n \"potts_i\" text\n);\n\nQuestion: What was Kilgore's percentage when Potts (I) had 4% and Kaine (D) 47%, in the poll from October 30, 2005?"
},
{
"role": "assistant",
"content": "SELECT \"kilgore_r\" FROM \"opinion_polls\" WHERE \"potts_i\"='4%' AND \"kaine_d\"='47%' AND \"date\"='october 30, 2005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"kaine_d\" text,\n \"kilgore_r\" text,\n \"potts_i\" text\n);\n\nQuestion: On which date did Potts (I) poll at 9%?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"opinion_polls\" WHERE \"potts_i\"='9%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"kaine_d\" text,\n \"kilgore_r\" text,\n \"potts_i\" text\n);\n\nQuestion: What was Kaine's (D) percentage in the Rasmussen poll on October 24, 2005?"
},
{
"role": "assistant",
"content": "SELECT \"kaine_d\" FROM \"opinion_polls\" WHERE \"source\"='rasmussen' AND \"date\"='october 24, 2005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"kaine_d\" text,\n \"kilgore_r\" text,\n \"potts_i\" text\n);\n\nQuestion: What was Kaine's (D) percentage in the poll on October 30, 2005?"
},
{
"role": "assistant",
"content": "SELECT \"kaine_d\" FROM \"opinion_polls\" WHERE \"date\"='october 30, 2005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"kaine_d\" text,\n \"kilgore_r\" text,\n \"potts_i\" text\n);\n\nQuestion: What was Kilgore's (R) percentage when Potts (I) polled at 1%?"
},
{
"role": "assistant",
"content": "SELECT \"kilgore_r\" FROM \"opinion_polls\" WHERE \"potts_i\"='1%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"kaine_d\" text,\n \"kilgore_r\" text,\n \"potts_i\" text\n);\n\nQuestion: What was Kaine's (D) percentage in the poll on september 19, 2005?"
},
{
"role": "assistant",
"content": "SELECT \"kaine_d\" FROM \"opinion_polls\" WHERE \"date\"='september 19, 2005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is To par, when Country is \"United States\", and when Player is \"Jay Haas\"?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"country\"='united states' AND \"player\"='jay haas';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is Player, when Score is \"68-67-75-70=280\"?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_round\" WHERE \"score\"='68-67-75-70=280';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010s\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"venue\" text,\n \"competition\" text\n);\n\nQuestion: What is the result of the friendly competition on 23 January 2010?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"2010s\" WHERE \"competition\"='friendly' AND \"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 \"2010s\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"venue\" text,\n \"competition\" text\n);\n\nQuestion: What is the venue of the match with a w result on 3 March 2010?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"2010s\" WHERE \"result\"='w' AND \"date\"='3 march 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"notes\" text\n);\n\nQuestion: What is the lowest Year, when Notes is \"5.19km, 18controls\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"women\" WHERE \"notes\"='5.19km, 18controls';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"notes\" text\n);\n\nQuestion: What is Notes, when Year is \"2010\"?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"women\" WHERE \"year\"=2010;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_9\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text,\n \"winner_s_share\" real\n);\n\nQuestion: What winning score has in-kyung kim as the runner(s)-up?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"lpga_tour_wins_9\" WHERE \"runner_s_up\"='in-kyung kim';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_9\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text,\n \"winner_s_share\" real\n);\n\nQuestion: What winning score has kraft nabisco championship as the tournament?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"lpga_tour_wins_9\" WHERE \"tournament\"='kraft nabisco championship';"
}
]
|
[
{
"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: What Winning constructor has a Name of grand prix de la marne?"
},
{
"role": "assistant",
"content": "SELECT \"winning_constructor\" FROM \"other_grands_prix\" WHERE \"name\"='grand prix de la marne';"
}
]
|
[
{
"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: What kind of the Winning driver has a Circuit of saint-rapha\u00ebl?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"other_grands_prix\" WHERE \"circuit\"='saint-rapha\u00ebl';"
}
]
|
[
{
"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: Name the Report with Winning constructor of maserati, and a Name of monza grand prix?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"other_grands_prix\" WHERE \"winning_constructor\"='maserati' AND \"name\"='monza grand prix';"
}
]
|
[
{
"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: Name the Report has a Name of lyon grand prix?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"other_grands_prix\" WHERE \"name\"='lyon grand prix';"
}
]
|
[
{
"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: Name the Report which has heinrich-joachim von morgen?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"other_grands_prix\" WHERE \"winning_driver\"='heinrich-joachim von morgen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"draft\" real,\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text\n);\n\nQuestion: Which player had a draft before 1975 and before round 6?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"draft\"<1975 AND \"round\"<6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7_4_3\" (\n \"outcome\" text,\n \"edition\" real,\n \"round\" text,\n \"opponent_team\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is Score, when Opponent Team is Belgium, and when Opponent is Kirsten Flipkens?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_7_4_3\" WHERE \"opponent_team\"='belgium' AND \"opponent\"='kirsten flipkens';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7_4_3\" (\n \"outcome\" text,\n \"edition\" real,\n \"round\" text,\n \"opponent_team\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is Opponent, when Round is World Group?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_7_4_3\" WHERE \"round\"='world group';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7_4_3\" (\n \"outcome\" text,\n \"edition\" real,\n \"round\" text,\n \"opponent_team\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is Surface, when Edition is 2012, and when Outcome is Winner?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_7_4_3\" WHERE \"edition\"=2012 AND \"outcome\"='winner';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7_4_3\" (\n \"outcome\" text,\n \"edition\" real,\n \"round\" text,\n \"opponent_team\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is Score, when Outcome is Loser, and when Edition is 2011?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_7_4_3\" WHERE \"outcome\"='loser' AND \"edition\"=2011;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7_4_3\" (\n \"outcome\" text,\n \"edition\" real,\n \"round\" text,\n \"opponent_team\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is Score, when Edition is 2011, and when Surface is Hard (i)?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_7_4_3\" WHERE \"edition\"=2011 AND \"surface\"='hard (i)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7_4_3\" (\n \"outcome\" text,\n \"edition\" real,\n \"round\" text,\n \"opponent_team\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is Round, when Opponent Team is Slovakia, when Outcome is Loser, and when Edition is greater than 2010?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"singles_7_4_3\" WHERE \"opponent_team\"='slovakia' AND \"outcome\"='loser' AND \"edition\">2010;"
}
]
|
[
{
"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 \"record\" text,\n \"attendance\" text\n);\n\nQuestion: In what Week was the Record 4\u20137\u20131?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"record\"='4\u20137\u20131';"
}
]
|
[
{
"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 \"record\" text,\n \"attendance\" text\n);\n\nQuestion: On what Date was the Attendance 63,546?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='63,546';"
}
]
|
[
{
"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 \"record\" text,\n \"attendance\" text\n);\n\nQuestion: In what Week was the Attendance 17,737?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"attendance\"='17,737';"
}
]
|
[
{
"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 \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Result of the game after Week 10 against Philadelphia Eagles?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">10 AND \"opponent\"='philadelphia eagles';"
}
]
|
[
{
"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 \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Opponent on Week 11?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_attendance\" (\n \"year\" real,\n \"average\" text,\n \"high\" real,\n \"sellouts\" real,\n \"total_for_year\" real,\n \"wnba_game_average\" real\n);\n\nQuestion: What is the largest WNBA game average with 9,290 (4th) is the average, and less than 157,934 is the total for the year?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wnba_game_average\") FROM \"regular_season_attendance\" WHERE \"average\"='9,290 (4th)' AND \"total_for_year\"<'157,934';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_attendance\" (\n \"year\" real,\n \"average\" text,\n \"high\" real,\n \"sellouts\" real,\n \"total_for_year\" real,\n \"wnba_game_average\" real\n);\n\nQuestion: How many years in all was less than 105,005 the total for the year?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"regular_season_attendance\" WHERE \"total_for_year\"<'105,005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_attendance\" (\n \"year\" real,\n \"average\" text,\n \"high\" real,\n \"sellouts\" real,\n \"total_for_year\" real,\n \"wnba_game_average\" real\n);\n\nQuestion: What is the total for year average that less than 7,742 is the WNBA game average, and 7,625 (10th) is the average, and before the year 1999?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total_for_year\") FROM \"regular_season_attendance\" WHERE \"wnba_game_average\"<'7,742' AND \"average\"='7,625 (10th)' AND \"year\"<1999;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_attendance\" (\n \"year\" real,\n \"average\" text,\n \"high\" real,\n \"sellouts\" real,\n \"total_for_year\" real,\n \"wnba_game_average\" real\n);\n\nQuestion: What is the total of the year that more than 13,142 is the high, and 10,387 (2nd) is the average, and there was less than 0 sellouts?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"regular_season_attendance\" WHERE \"high\">'13,142' AND \"average\"='10,387 (2nd)' AND \"sellouts\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_attendance\" (\n \"year\" real,\n \"average\" text,\n \"high\" real,\n \"sellouts\" real,\n \"total_for_year\" real,\n \"wnba_game_average\" real\n);\n\nQuestion: What is the maximum sellouts for the 2008 year, with less than 161,369 total for year?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"sellouts\") FROM \"regular_season_attendance\" WHERE \"year\"=2008 AND \"total_for_year\"<'161,369';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"louisiana\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is the highest First Elected, when Party is \"Republican\", and when District is \"Louisiana 7\"?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"first_elected\") FROM \"louisiana\" WHERE \"party\"='republican' AND \"district\"='louisiana 7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"louisiana\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is Party, when Results is \"Re-Elected\", and when District is \"Louisiana 5\"?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"louisiana\" WHERE \"results\"='re-elected' AND \"district\"='louisiana 5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"louisiana\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is Party, when Incumbent is \"Rodney Alexander\"?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"louisiana\" WHERE \"incumbent\"='rodney alexander';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"louisiana\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is Results, when First Elected is less than 1988?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"louisiana\" WHERE \"first_elected\"<1988;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"louisiana\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is Incumbent, when District is \"Louisiana 4\"?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"louisiana\" WHERE \"district\"='louisiana 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"car_number\" text,\n \"start\" text,\n \"qual_speed\" text,\n \"speed_rank\" text,\n \"finish\" text,\n \"laps_completed\" real,\n \"laps_led\" real\n);\n\nQuestion: What's the finish for car number 6?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"indy_500_results\" WHERE \"car_number\"='6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"car_number\" text,\n \"start\" text,\n \"qual_speed\" text,\n \"speed_rank\" text,\n \"finish\" text,\n \"laps_completed\" real,\n \"laps_led\" real\n);\n\nQuestion: What's the speed rank in 1963?"
},
{
"role": "assistant",
"content": "SELECT \"speed_rank\" FROM \"indy_500_results\" WHERE \"year\"='1963';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"concacaf_women_s_world_cup_qualifiers_re\" (\n \"year\" real,\n \"result\" text,\n \"matches\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real\n);\n\nQuestion: What is the total of Losses with a Result of runner-up, Wins of 1, and a Year smaller than 2006?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"losses\") FROM \"concacaf_women_s_world_cup_qualifiers_re\" WHERE \"result\"='runner-up' AND \"wins\"=1 AND \"year\"<2006;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"concacaf_women_s_world_cup_qualifiers_re\" (\n \"year\" real,\n \"result\" text,\n \"matches\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real\n);\n\nQuestion: What is the smallest Draws with a Result of runner-up, and Losses larger than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"draws\") FROM \"concacaf_women_s_world_cup_qualifiers_re\" WHERE \"result\"='runner-up' AND \"losses\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"concacaf_women_s_world_cup_qualifiers_re\" (\n \"year\" real,\n \"result\" text,\n \"matches\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real\n);\n\nQuestion: What is the number of Year with a Result of champions, and Matches larger than 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"concacaf_women_s_world_cup_qualifiers_re\" WHERE \"result\"='champions' AND \"matches\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"concacaf_women_s_world_cup_qualifiers_re\" (\n \"year\" real,\n \"result\" text,\n \"matches\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real\n);\n\nQuestion: What is the greatest Wins with Losses larger than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"concacaf_women_s_world_cup_qualifiers_re\" WHERE \"losses\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"concacaf_women_s_world_cup_qualifiers_re\" (\n \"year\" real,\n \"result\" text,\n \"matches\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real\n);\n\nQuestion: What is the total number of Year with Wins of 1, and Losses smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"concacaf_women_s_world_cup_qualifiers_re\" WHERE \"wins\"=1 AND \"losses\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"concacaf_women_s_world_cup_qualifiers_re\" (\n \"year\" real,\n \"result\" text,\n \"matches\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real\n);\n\nQuestion: What is the greatest Wins with Matches smaller than 5, and a Year of 1994?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"concacaf_women_s_world_cup_qualifiers_re\" WHERE \"matches\"<5 AND \"year\"=1994;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scottish_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: On what date was Motherwell the opponent at Fir Park?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"scottish_cup\" WHERE \"opponent\"='motherwell' AND \"venue\"='fir park';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scottish_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the round at St. Mirren Park with more than 4,555 people attending?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"scottish_cup\" WHERE \"venue\"='st. mirren park' AND \"attendance\">'4,555';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What's the sum of attendance when banbury united is the away team and tie no is over 102?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"ties\" WHERE \"away_team\"='banbury united' AND \"tie_no\">102;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What's the sum of tie no for home team burgess hill town?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"tie_no\") FROM \"ties\" WHERE \"home_team\"='burgess hill town';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_dakota_counties_by_per_capita_inco\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the highest population of Deuel county's 1,819 households?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"population\") FROM \"south_dakota_counties_by_per_capita_inco\" WHERE \"county\"='deuel' AND \"number_of_households\"<'1,819';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"september\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: When the venue is away and the opponents are the bracknell bees, what is the competition?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"september\" WHERE \"venue\"='away' AND \"opponent\"='bracknell bees';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"september\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What opponent played on the 28th with a venue of away?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"september\" WHERE \"venue\"='away' AND \"date\"='28th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"september\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the venue on the 20th?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"september\" WHERE \"date\"='20th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"september\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: When did the peterborough phantoms play at a venue of home?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"september\" WHERE \"venue\"='home' AND \"opponent\"='peterborough phantoms';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"september\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which opponent has a result of 2-0 l?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"september\" WHERE \"result\"='2-0 l';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"september\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which opponent completed a challenge competition with a result of 8-2 w?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"september\" WHERE \"competition\"='challenge' AND \"result\"='8-2 w';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_winners\" (\n \"round\" real,\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"event\" text,\n \"winning_driver\" text\n);\n\nQuestion: What shows for round when the race was Int. Adac Preis Von Zweibr\u00fccken?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"race_calendar_and_winners\" WHERE \"race\"='int. adac preis von zweibr\u00fccken';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_winners\" (\n \"round\" real,\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"event\" text,\n \"winning_driver\" text\n);\n\nQuestion: What is the round for the Norisring circuit?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"race_calendar_and_winners\" WHERE \"circuit\"='norisring';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_winners\" (\n \"round\" real,\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"event\" text,\n \"winning_driver\" text\n);\n\nQuestion: What race was a round smaller than 8, on 6 july?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"race_calendar_and_winners\" WHERE \"round\"<8 AND \"date\"='6 july';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_winners\" (\n \"round\" real,\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"event\" text,\n \"winning_driver\" text\n);\n\nQuestion: What is the round for the Int. Adac-Preis Der Tourenwagen Von Sachsen-Anhalt?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"race_calendar_and_winners\" WHERE \"race\"='int. adac-preis der tourenwagen von sachsen-anhalt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What week were there 56,023 people in attendance?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"attendance\"='56,023';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the attendance number later than week 9 on November 20, 1983?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"week\">9 AND \"date\"='november 20, 1983';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_3\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is Surface, when Date is less than 1979, and when Opponent in the Final is \"Bill Scanlon\"?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"wins_3\" WHERE \"date\"<1979 AND \"opponent_in_the_final\"='bill scanlon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_3\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is Score in The Final, when Opponent in The Final is \"John McEnroe\", and when Championship is \"Los Angeles , U.S.\"?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"wins_3\" WHERE \"opponent_in_the_final\"='john mcenroe' AND \"championship\"='los angeles , u.s.';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_3\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is Outcome, when Opponent in The Final is \"Bill Scanlon\"?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"wins_3\" WHERE \"opponent_in_the_final\"='bill scanlon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which To par has a Player of bernhard langer?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"player\"='bernhard langer';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which Score has a Country of united states, and a Player of raymond floyd?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round\" WHERE \"country\"='united states' AND \"player\"='raymond floyd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which To par has a Place of t6, and a Player of nick faldo?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"place\"='t6' AND \"player\"='nick faldo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which To par has a Place of t2, and a Player of mark james?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"place\"='t2' AND \"player\"='mark james';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which Country has a Place of t10, and a Player of tony jacklin?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"place\"='t10' AND \"player\"='tony jacklin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which Country has a Score of 71-74-70=215?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"score\"='71-74-70=215';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_ladder\" (\n \"mininera_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many losses for the team with less than 4 wins, more than 0 byes and 2510 against?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"losses\") FROM \"2008_ladder\" WHERE \"wins\"<4 AND \"against\"=2510 AND \"byes\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_ladder\" (\n \"mininera_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many wins for team with 1800 Against and more than 0 byes?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"2008_ladder\" WHERE \"against\"=1800 AND \"draws\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_ladder\" (\n \"mininera_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the least wins for a team with against less than 814?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"2008_ladder\" WHERE \"against\"<814;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_ladder\" (\n \"mininera_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many losses for the team with 3 wins and more than 1919 against?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"losses\") FROM \"2008_ladder\" WHERE \"wins\"=3 AND \"against\">1919;"
}
]
|
[
{
"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 \"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 \"2010\" text,\n \"2011\" text\n);\n\nQuestion: What is the 2002 result where 2011 and 2000 are 1R?"
},
{
"role": "assistant",
"content": "SELECT \"2002\" FROM \"singles_performance_timeline\" WHERE \"2011\"='1r' AND \"2000\"='1r';"
}
]
|
[
{
"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 \"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 \"2010\" text,\n \"2011\" text\n);\n\nQuestion: What is the 2008 result where 2003 is 325?"
},
{
"role": "assistant",
"content": "SELECT \"2008\" FROM \"singles_performance_timeline\" WHERE \"2003\"='325';"
}
]
|
[
{
"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 \"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 \"2010\" text,\n \"2011\" text\n);\n\nQuestion: What is the 2002 result when 2006 is A and 2010 is Q1?"
},
{
"role": "assistant",
"content": "SELECT \"2002\" FROM \"singles_performance_timeline\" WHERE \"2006\"='a' AND \"2010\"='q1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"major_dams_and_reservoirs\" (\n \"dam_constructed\" text,\n \"year_completed\" real,\n \"impounded_body_of_water\" text,\n \"reservoir_capacity\" text,\n \"dam_wall_height\" text,\n \"dam_type\" text\n);\n\nQuestion: Which Year completed has a Dam type of concrete gravity, and an Impounded body of water of deep creek reservoir?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year_completed\") FROM \"major_dams_and_reservoirs\" WHERE \"dam_type\"='concrete gravity' AND \"impounded_body_of_water\"='deep creek reservoir';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"major_dams_and_reservoirs\" (\n \"dam_constructed\" text,\n \"year_completed\" real,\n \"impounded_body_of_water\" text,\n \"reservoir_capacity\" text,\n \"dam_wall_height\" text,\n \"dam_type\" text\n);\n\nQuestion: Which dam type was completed in 1961?"
},
{
"role": "assistant",
"content": "SELECT \"dam_type\" FROM \"major_dams_and_reservoirs\" WHERE \"year_completed\"=1961;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"major_dams_and_reservoirs\" (\n \"dam_constructed\" text,\n \"year_completed\" real,\n \"impounded_body_of_water\" text,\n \"reservoir_capacity\" text,\n \"dam_wall_height\" text,\n \"dam_type\" text\n);\n\nQuestion: Which Year completed has a Dam type of earthfill embankment, and a Dam constructed of khancoban dam?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year_completed\") FROM \"major_dams_and_reservoirs\" WHERE \"dam_type\"='earthfill embankment' AND \"dam_constructed\"='khancoban dam';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"major_dams_and_reservoirs\" (\n \"dam_constructed\" text,\n \"year_completed\" real,\n \"impounded_body_of_water\" text,\n \"reservoir_capacity\" text,\n \"dam_wall_height\" text,\n \"dam_type\" text\n);\n\nQuestion: Which Reservoir capacity has an Impounded body of water of tumut two pondage?"
},
{
"role": "assistant",
"content": "SELECT \"reservoir_capacity\" FROM \"major_dams_and_reservoirs\" WHERE \"impounded_body_of_water\"='tumut two pondage';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_hd_40307_system\" (\n \"companion_in_order_from_star\" text,\n \"mass\" text,\n \"semimajor_axis_au\" text,\n \"orbital_period_s_day\" text,\n \"eccentricity\" text,\n \"inclination\" text\n);\n\nQuestion: What Companion (in order from star) has a Semimajor axis (AU) of 0.1886 +0.083 \u22120.0104?"
},
{
"role": "assistant",
"content": "SELECT \"companion_in_order_from_star\" FROM \"the_hd_40307_system\" WHERE \"semimajor_axis_au\"='0.1886 +0.083 \u22120.0104';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.