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 \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Week number with a result of l 31\u201328?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"result\"='l 31\u201328';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What was the score at the Tie no. 1 game?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"fifth_round_proper\" WHERE \"tie_no\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance at the West Ham United home game?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"fifth_round_proper\" WHERE \"home_team\"='west ham united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medalists\" (\n \"medal\" text,\n \"name\" text,\n \"sport\" text,\n \"event\" text,\n \"date\" text\n);\n\nQuestion: What is the Sport with a Name that is gustav larsson?" }, { "role": "assistant", "content": "SELECT \"sport\" FROM \"medalists\" WHERE \"name\"='gustav larsson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medalists\" (\n \"medal\" text,\n \"name\" text,\n \"sport\" text,\n \"event\" text,\n \"date\" text\n);\n\nQuestion: What is the Name with an Event that is men's time trial?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"medalists\" WHERE \"event\"='men''s time trial';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"under_23_international_career\" (\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"goals\" real,\n \"competition\" text\n);\n\nQuestion: At which venue did the event held on 15 November 2010 occur?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"under_23_international_career\" WHERE \"date\"='15 november 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"points\" real,\n \"rank\" text\n);\n\nQuestion: Which Points has a Performer of rob burke band and a Draw larger than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"references\" WHERE \"performer\"='rob burke band' AND \"draw\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"points\" real,\n \"rank\" text\n);\n\nQuestion: What Points have a Song of \"this time\" and a Draw smaller than 5?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"references\" WHERE \"song\"='\\\"this time\\\"' AND \"draw\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"points\" real,\n \"rank\" text\n);\n\nQuestion: Which Points have a Performer of se\u00e1n monaghan and a Draw smaller than 7?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"references\" WHERE \"performer\"='se\u00e1n monaghan' AND \"draw\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"points\" real,\n \"rank\" text\n);\n\nQuestion: Which Points has a Performer of rob burke band?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"references\" WHERE \"performer\"='rob burke band';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"pct\" text\n);\n\nQuestion: What is the Finish of 28 Wins?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"season_by_season\" WHERE \"wins\"='28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"pct\" text\n);\n\nQuestion: What is the Finish of the Reno Bighorns Wins?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"season_by_season\" WHERE \"wins\"='reno bighorns';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"pct\" text\n);\n\nQuestion: What is the Finish of 28 Wins?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"season_by_season\" WHERE \"wins\"='28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"pct\" text\n);\n\nQuestion: What is the Western Division of Wins with a 4th Finish?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"season_by_season\" WHERE \"division\"='western' AND \"finish\"='4th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"pct\" text\n);\n\nQuestion: What are the losses of the playoffs season?" }, { "role": "assistant", "content": "SELECT \"losses\" FROM \"season_by_season\" WHERE \"season\"='playoffs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preliminary_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is Team 1, when Team 2 is Saint Louis?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"preliminary_round\" WHERE \"team_2\"='saint louis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preliminary_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is Agg., when Team 2 is Mukungwa?" }, { "role": "assistant", "content": "SELECT \"agg\" FROM \"preliminary_round\" WHERE \"team_2\"='mukungwa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1980s_hat_tricks\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"home\" text,\n \"away\" text,\n \"series\" text\n);\n\nQuestion: What is the Round with an Opponent that is torpedo moscow?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"1980s_hat_tricks\" WHERE \"opponent\"='torpedo moscow';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: Can you tell me the sum of Matches that has the Goals of 103, and the Rank larger than 9?" }, { "role": "assistant", "content": "SELECT SUM(\"matches\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"goals\"=103 AND \"rank\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: Can you tell me the Name that has the Goals larger than 98, and the Rank of 7?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"list_of_top_association_football_goal_sc\" WHERE \"goals\">98 AND \"rank\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: How many laps had a time stat of accident for the rider carmelo morales when the grid was more than 25?" }, { "role": "assistant", "content": "SELECT SUM(\"laps\") FROM \"superbike_race_1_classification\" WHERE \"time\"='accident' AND \"rider\"='carmelo morales' AND \"grid\">25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: How many laps had a time of +2.987?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"superbike_race_1_classification\" WHERE \"time\"='+2.987';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which bike had fewer than 23 laps and a grid number of 4?" }, { "role": "assistant", "content": "SELECT \"bike\" FROM \"superbike_race_1_classification\" WHERE \"laps\"<23 AND \"grid\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"time\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"nfl_recap\" text,\n \"record\" text\n);\n\nQuestion: What is the Record for week 14?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"week\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"time\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"nfl_recap\" text,\n \"record\" text\n);\n\nQuestion: What is the Result with an NFL Recap, played at bank of america stadium?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"regular_season\" WHERE \"nfl_recap\"='recap' AND \"game_site\"='bank of america stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"time\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"nfl_recap\" text,\n \"record\" text\n);\n\nQuestion: What is the Record for week 12?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"week\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"time\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"nfl_recap\" text,\n \"record\" text\n);\n\nQuestion: What is the Opponent with a time of 2:05 p.m., and the results were w 26\u201320?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"time\"='2:05 p.m.' AND \"result\"='w 26\u201320';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"time\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"nfl_recap\" text,\n \"record\" text\n);\n\nQuestion: What is the highest Week for october 12, 2008?" }, { "role": "assistant", "content": "SELECT MAX(\"week\") FROM \"regular_season\" WHERE \"date\"='october 12, 2008';" } ]
[ { "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 team has 1 as the drawn, with 2 as the lost?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"campeonato_paulista\" WHERE \"drawn\"=1 AND \"lost\"=2;" } ]
[ { "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: How many drawns have 7 for the lost?" }, { "role": "assistant", "content": "SELECT SUM(\"drawn\") FROM \"campeonato_paulista\" WHERE \"lost\"=7;" } ]
[ { "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 played that has a drawn greater than 1, with an against greater than 16?" }, { "role": "assistant", "content": "SELECT AVG(\"played\") FROM \"campeonato_paulista\" WHERE \"drawn\">1 AND \"against\">16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_class_bowling_statistics\" (\n \"player\" text,\n \"matches\" real,\n \"overs\" real,\n \"maidens\" real,\n \"runs\" real,\n \"wickets\" real,\n \"average\" text,\n \"economy\" real,\n \"best_bowling\" text\n);\n\nQuestion: What is the sum of Maidens with a number of Matches that is 2?" }, { "role": "assistant", "content": "SELECT SUM(\"maidens\") FROM \"first_class_bowling_statistics\" WHERE \"matches\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"country\" text,\n \"points\" real\n);\n\nQuestion: Ranking higher than 2, what Team has Player Paolo Maldini?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"men\" WHERE \"rank\">2 AND \"name\"='paolo maldini';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"country\" text,\n \"points\" real\n);\n\nQuestion: What Country is in Rank 2?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"men\" WHERE \"rank\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: What date was Leo Mainoldi (24) the leading scorer?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"march\" WHERE \"leading_scorer\"='leo mainoldi (24)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: Who is the visitor with the 14-10 record?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"march\" WHERE \"record\"='14-10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: What is the record of the 73-82 score?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"march\" WHERE \"score\"='73-82';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: Who is the leading scorer of the Villa De Los Barrios visitor?" }, { "role": "assistant", "content": "SELECT \"leading_scorer\" FROM \"march\" WHERE \"visitor\"='villa de los barrios';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: Who is the visitor with a 14-10 record?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"march\" WHERE \"record\"='14-10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the team with the 14-9 record?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"march\" WHERE \"record\"='14-9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the date of the game with 6 goals?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"international_goals\" WHERE \"goal\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the highest number of goals for a game held at Hannover?" }, { "role": "assistant", "content": "SELECT MAX(\"goal\") FROM \"international_goals\" WHERE \"venue\"='hannover';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result of the game with more than 12 goals at Pasadena?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"international_goals\" WHERE \"goal\">12 AND \"venue\"='pasadena';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_draft\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"team\" text\n);\n\nQuestion: What round was Andre Fluellen drafted as a Defensive Tackle?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"2008_draft\" WHERE \"position\"='defensive tackle' AND \"player\"='andre fluellen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_draft\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"team\" text\n);\n\nQuestion: After Round 5, which player was drafted for Defensive Tackle?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"2008_draft\" WHERE \"round\">5 AND \"position\"='defensive tackle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_draft\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"team\" text\n);\n\nQuestion: What was the earliest Round for Central Florida?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"2008_draft\" WHERE \"team\"='central florida';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the date of the label Dos or Die Recordings?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"label\"='dos or die recordings';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the label for 2002, in Germany, Catalog Dos 195?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"date\"='2002' AND \"region\"='germany' AND \"catalog\"='dos 195';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What region has a 2002 date, and a Catalog dos 195?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"release_history\" WHERE \"date\"='2002' AND \"catalog\"='dos 195';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"venue\" text,\n \"location\" text,\n \"winners\" text,\n \"runners_up\" text\n);\n\nQuestion: What is the Winners when the United States is the runner-up at st. germain golf club?" }, { "role": "assistant", "content": "SELECT \"winners\" FROM \"results\" WHERE \"runners_up\"='united states' AND \"venue\"='st. germain golf club';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"venue\" text,\n \"location\" text,\n \"winners\" text,\n \"runners_up\" text\n);\n\nQuestion: What is the average Year when Australia was the runner-up at victoria golf club?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"results\" WHERE \"runners_up\"='australia' AND \"venue\"='victoria golf club';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"venue\" text,\n \"location\" text,\n \"winners\" text,\n \"runners_up\" text\n);\n\nQuestion: What is the Location when France was the runner-up at club de campo?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"results\" WHERE \"runners_up\"='france' AND \"venue\"='club de campo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"venue\" text,\n \"location\" text,\n \"winners\" text,\n \"runners_up\" text\n);\n\nQuestion: What is the Location when Canada was the runner-up and Australia was the winner?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"results\" WHERE \"runners_up\"='canada' AND \"winners\"='australia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"visible\" (\n \"name\" text,\n \"space_agency\" text,\n \"launch_date\" text,\n \"terminated\" text,\n \"location\" text\n);\n\nQuestion: What is the Name of the Space Telescope Terminated on March 1993?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"visible\" WHERE \"terminated\"='march 1993';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_poll_summary\" (\n \"party\" text,\n \"marplan\" text,\n \"gallup\" text,\n \"national_opinion_polls_nop\" text,\n \"opinion_research_centre_opc\" text,\n \"harris\" text\n);\n\nQuestion: What is Party, when Opinion Research Centre (OPC) is 1.5%?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"opinion_poll_summary\" WHERE \"opinion_research_centre_opc\"='1.5%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_poll_summary\" (\n \"party\" text,\n \"marplan\" text,\n \"gallup\" text,\n \"national_opinion_polls_nop\" text,\n \"opinion_research_centre_opc\" text,\n \"harris\" text\n);\n\nQuestion: What is Marplan, when Gallup is 1.5%" }, { "role": "assistant", "content": "SELECT \"marplan\" FROM \"opinion_poll_summary\" WHERE \"gallup\"='1.5%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_poll_summary\" (\n \"party\" text,\n \"marplan\" text,\n \"gallup\" text,\n \"national_opinion_polls_nop\" text,\n \"opinion_research_centre_opc\" text,\n \"harris\" text\n);\n\nQuestion: What is Opinion Research Centre (OPC), when Party is Conservative?" }, { "role": "assistant", "content": "SELECT \"opinion_research_centre_opc\" FROM \"opinion_poll_summary\" WHERE \"party\"='conservative';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_poll_summary\" (\n \"party\" text,\n \"marplan\" text,\n \"gallup\" text,\n \"national_opinion_polls_nop\" text,\n \"opinion_research_centre_opc\" text,\n \"harris\" text\n);\n\nQuestion: What is Harris, when Marplan is 1.3%" }, { "role": "assistant", "content": "SELECT \"harris\" FROM \"opinion_poll_summary\" WHERE \"marplan\"='1.3%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1972_isle_of_man_sidecar_500cc_tt_final_\" (\n \"place\" real,\n \"rider\" text,\n \"country\" text,\n \"machine\" text,\n \"speed\" text,\n \"time\" text,\n \"points\" real\n);\n\nQuestion: What are the fewest points that Roger Dutton/Tony Wright have received?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"1972_isle_of_man_sidecar_500cc_tt_final_\" WHERE \"rider\"='roger dutton/tony wright';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1972_isle_of_man_sidecar_500cc_tt_final_\" (\n \"place\" real,\n \"rider\" text,\n \"country\" text,\n \"machine\" text,\n \"speed\" text,\n \"time\" text,\n \"points\" real\n);\n\nQuestion: How fast does the BMW with 6 points go?" }, { "role": "assistant", "content": "SELECT \"speed\" FROM \"1972_isle_of_man_sidecar_500cc_tt_final_\" WHERE \"machine\"='bmw' AND \"points\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_wildcards\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"televote\" text,\n \"place\" real\n);\n\nQuestion: What is the average draw for Desi Dobreva, was it less than 6?" }, { "role": "assistant", "content": "SELECT AVG(\"draw\") FROM \"final_wildcards\" WHERE \"artist\"='desi dobreva' AND \"place\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the first leg score for the match that had AS Police as team 2?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"second_round\" WHERE \"team_2\"='as police';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Who were the team 2 when team 1 was Iwuanyanwu Nationale and the 1st leg score was 2-0?" }, { "role": "assistant", "content": "SELECT \"team_2\" FROM \"second_round\" WHERE \"1st_leg\"='2-0' AND \"team_1\"='iwuanyanwu nationale';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the 2nd leg score for the tie that had a 5-0 first leg score?" }, { "role": "assistant", "content": "SELECT \"2nd_leg\" FROM \"second_round\" WHERE \"1st_leg\"='5-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the team 1 for the tie that had a first leg score of 2-3?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"second_round\" WHERE \"1st_leg\"='2-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Who was the team 1 in the match that had a 1st leg score of 3-0 and a 2nd leg of 1-2?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"second_round\" WHERE \"2nd_leg\"='1-2' AND \"1st_leg\"='3-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the first leg score for the match that had a 0-2 2nd leg score?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"second_round\" WHERE \"2nd_leg\"='0-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_broadway_revival\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What was the result for the Outstanding director of a musical category?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"2000_broadway_revival\" WHERE \"category\"='outstanding director of a musical';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_broadway_revival\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What was the result of the Award of Drama desk award nominee Tom Hewitt." }, { "role": "assistant", "content": "SELECT \"result\" FROM \"2000_broadway_revival\" WHERE \"award\"='drama desk award' AND \"nominee\"='tom hewitt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_broadway_revival\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What year was best costume design the award category?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"2000_broadway_revival\" WHERE \"category\"='best costume design';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" text\n);\n\nQuestion: Which accolade has USA as the country, with a year less than 2009?" }, { "role": "assistant", "content": "SELECT \"accolade\" FROM \"accolades\" WHERE \"country\"='usa' AND \"year\"<2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" text\n);\n\nQuestion: How many years have an accolade of 50 best albums of the year, with #3 as the rank?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"accolades\" WHERE \"accolade\"='50 best albums of the year' AND \"rank\"='#3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" text\n);\n\nQuestion: Which rank has canada as the country?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"accolades\" WHERE \"country\"='canada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_7\" (\n \"episode_number\" real,\n \"air_date\" text,\n \"guest_host\" text,\n \"musical_guest_song_performed\" text,\n \"coat_of_cash_wearing_celebrity\" text\n);\n\nQuestion: What is the name of the Guest Host for Episode Number of 5?" }, { "role": "assistant", "content": "SELECT \"guest_host\" FROM \"series_7\" WHERE \"episode_number\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_7\" (\n \"episode_number\" real,\n \"air_date\" text,\n \"guest_host\" text,\n \"musical_guest_song_performed\" text,\n \"coat_of_cash_wearing_celebrity\" text\n);\n\nQuestion: What is the Guest Host for the episode on 8 june 2008?" }, { "role": "assistant", "content": "SELECT \"guest_host\" FROM \"series_7\" WHERE \"air_date\"='8 june 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_7\" (\n \"episode_number\" real,\n \"air_date\" text,\n \"guest_host\" text,\n \"musical_guest_song_performed\" text,\n \"coat_of_cash_wearing_celebrity\" text\n);\n\nQuestion: What is the Musical Guest (Song performed) for the episode aired on 13 july 2008?" }, { "role": "assistant", "content": "SELECT \"musical_guest_song_performed\" FROM \"series_7\" WHERE \"air_date\"='13 july 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score for the 2014 FIFA World Cup Qualification (UEFA)?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='2014 fifa world cup qualification (uefa)';" } ]
[ { "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 \"kickoff_time\" text,\n \"attendance\" text\n);\n\nQuestion: What was the kickoff time for week 11's game?" }, { "role": "assistant", "content": "SELECT \"kickoff_time\" 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 \"senior_major_winners\" (\n \"year\" real,\n \"senior_pga_championship\" text,\n \"the_tradition\" text,\n \"senior_players_championship\" text,\n \"u_s_senior_open\" text,\n \"senior_british_open\" text\n);\n\nQuestion: When Mark O'meara was the senior player champion in a year greater than 1998, who was the tradition?" }, { "role": "assistant", "content": "SELECT \"the_tradition\" FROM \"senior_major_winners\" WHERE \"year\">1998 AND \"senior_players_championship\"='mark o''meara';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senior_major_winners\" (\n \"year\" real,\n \"senior_pga_championship\" text,\n \"the_tradition\" text,\n \"senior_players_championship\" text,\n \"u_s_senior_open\" text,\n \"senior_british_open\" text\n);\n\nQuestion: Who was the tradition when Roberto Devicenzo won the U.S. Senior Open and the Senior British Open was founded in 1987?" }, { "role": "assistant", "content": "SELECT \"the_tradition\" FROM \"senior_major_winners\" WHERE \"senior_british_open\"='founded in 1987' AND \"u_s_senior_open\"='roberto devicenzo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senior_major_winners\" (\n \"year\" real,\n \"senior_pga_championship\" text,\n \"the_tradition\" text,\n \"senior_players_championship\" text,\n \"u_s_senior_open\" text,\n \"senior_british_open\" text\n);\n\nQuestion: Who won the Senior British Open when Hale Irwin (3/7) won the Senior PGA Championship?" }, { "role": "assistant", "content": "SELECT \"senior_british_open\" FROM \"senior_major_winners\" WHERE \"senior_pga_championship\"='hale irwin (3/7)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senior_major_winners\" (\n \"year\" real,\n \"senior_pga_championship\" text,\n \"the_tradition\" text,\n \"senior_players_championship\" text,\n \"u_s_senior_open\" text,\n \"senior_british_open\" text\n);\n\nQuestion: When Tom Watson (5/6) won the Senior British Open who won the Senior PGA Championship?" }, { "role": "assistant", "content": "SELECT \"senior_pga_championship\" FROM \"senior_major_winners\" WHERE \"senior_british_open\"='tom watson (5/6)';" } ]
[ { "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 \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"first_downs\" real,\n \"attendance\" real\n);\n\nQuestion: Which Week has Points For larger than 19, and an Opponent of philadelphia eagles, and Points Against larger than 7?" }, { "role": "assistant", "content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"points_for\">19 AND \"opponent\"='philadelphia eagles' AND \"points_against\">7;" } ]
[ { "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 \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"first_downs\" real,\n \"attendance\" real\n);\n\nQuestion: Which Attendance has a First Downs smaller than 26, an Opponent of los angeles rams, and Points For larger than 28?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"schedule\" WHERE \"first_downs\"<26 AND \"opponent\"='los angeles rams' AND \"points_for\">28;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: Which League Cup has a FA Cup of 5, and a Club of boston united, and a League smaller than 16?" }, { "role": "assistant", "content": "SELECT MAX(\"league_cup\") FROM \"top_scorers_in_order_of_league_goals\" WHERE \"fa_cup\"=5 AND \"club\"='boston united' AND \"league\"<16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: How many Total that has a FA Trophy of 0 and a Player of charlie butler?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"top_scorers_in_order_of_league_goals\" WHERE \"fa_trophy\"=0 AND \"player\"='charlie butler';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: How many FA Trophy has a Player of mario walsh and a League larger than 17?" }, { "role": "assistant", "content": "SELECT AVG(\"fa_trophy\") FROM \"top_scorers_in_order_of_league_goals\" WHERE \"player\"='mario walsh' AND \"league\">17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_12\" (\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 score of the winning match on Oct 28, 1962?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"pga_tour_wins_12\" WHERE \"date\"='oct 28, 1962';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_12\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: By how many strokes did Lema beat Jack Nicklaus?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_12\" WHERE \"runner_s_up\"='jack nicklaus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_12\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who was the runner-up on Jan 19, 1964?" }, { "role": "assistant", "content": "SELECT \"runner_s_up\" FROM \"pga_tour_wins_12\" WHERE \"date\"='jan 19, 1964';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: How many Rebounds did Maccabi Tel Aviv Team get after Game 6?" }, { "role": "assistant", "content": "SELECT COUNT(\"rebounds\") FROM \"rebounds\" WHERE \"team\"='maccabi tel aviv' AND \"games\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: How many Games for the player with Rebounds from Efes Pilsen?" }, { "role": "assistant", "content": "SELECT \"games\" FROM \"rebounds\" WHERE \"team\"='efes pilsen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: How many Games for the Player from Lietuvos Rytas Vilnius with less the 43 Rebounds?" }, { "role": "assistant", "content": "SELECT SUM(\"games\") FROM \"rebounds\" WHERE \"team\"='lietuvos rytas vilnius' AND \"rebounds\"<43;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newly_named_birds\" (\n \"name\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: Who is The Author of zhou clarke zhang?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"newly_named_birds\" WHERE \"authors\"='zhou clarke zhang';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newly_named_birds\" (\n \"name\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What is the Status of primitive confuciusornithid .?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"newly_named_birds\" WHERE \"notes\"='primitive confuciusornithid .';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newly_named_birds\" (\n \"name\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What is the name of gao chiappe meng o'connor wang cheng liu?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"newly_named_birds\" WHERE \"authors\"='gao chiappe meng o''connor wang cheng liu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newly_named_birds\" (\n \"name\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: Where has a Name of zhongornis?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"newly_named_birds\" WHERE \"name\"='zhongornis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newly_named_birds\" (\n \"name\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: Which Notes has Authors of zhou clarke zhang?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"newly_named_birds\" WHERE \"authors\"='zhou clarke zhang';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_clubs_2014_season\" (\n \"club\" text,\n \"position_in_2013\" text,\n \"first_season\" real,\n \"first_season_of_current_spell\" real,\n \"number_of_seasons_in_superettan\" real,\n \"number_of_seasons_in_second_tier\" real\n);\n\nQuestion: Which First season of current spell is the lowest one that has a First season larger than 2005, and a Number of seasons in Superettan smaller than 8, and a Club of syrianska fc?" }, { "role": "assistant", "content": "SELECT MIN(\"first_season_of_current_spell\") FROM \"current_clubs_2014_season\" WHERE \"first_season\">2005 AND \"number_of_seasons_in_superettan\"<8 AND \"club\"='syrianska fc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_clubs_2014_season\" (\n \"club\" text,\n \"position_in_2013\" text,\n \"first_season\" real,\n \"first_season_of_current_spell\" real,\n \"number_of_seasons_in_superettan\" real,\n \"number_of_seasons_in_second_tier\" real\n);\n\nQuestion: Which Number of seasons in second tier has a First season of 2000, and a First season of current spell of 2014?" }, { "role": "assistant", "content": "SELECT \"number_of_seasons_in_second_tier\" FROM \"current_clubs_2014_season\" WHERE \"first_season\"=2000 AND \"first_season_of_current_spell\"=2014;" } ]