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 \"races\" (\n \"race\" text,\n \"date\" text,\n \"venue\" text,\n \"winner\" text,\n \"notes\" text\n);\n\nQuestion: What was the race for the world championship formula 1 at a venue of hungaroring?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"races\" WHERE \"notes\"='world championship formula 1' AND \"venue\"='hungaroring';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"race\" text,\n \"date\" text,\n \"venue\" text,\n \"winner\" text,\n \"notes\" text\n);\n\nQuestion: Who is the winner for the match on October 7?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"races\" WHERE \"date\"='october 7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"race\" text,\n \"date\" text,\n \"venue\" text,\n \"winner\" text,\n \"notes\" text\n);\n\nQuestion: What is the date of the race for the new zealand grand prix?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"races\" WHERE \"race\"='new zealand grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"race\" text,\n \"date\" text,\n \"venue\" text,\n \"winner\" text,\n \"notes\" text\n);\n\nQuestion: Who was the winner for the world championship formula 1 at the venue, circuit de monaco?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"races\" WHERE \"notes\"='world championship formula 1' AND \"venue\"='circuit de monaco';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"tv_time\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What is Result, when Opponent is New England Patriots?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"opponent\"='new england patriots';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cup_finals_at_dalymount\" (\n \"date\" text,\n \"competition\" text,\n \"winners\" text,\n \"score\" text,\n \"runners_up\" text\n);\n\nQuestion: What competition took place on 28/04/1906?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"cup_finals_at_dalymount\" WHERE \"date\"='28/04/1906';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cup_finals_at_dalymount\" (\n \"date\" text,\n \"competition\" text,\n \"winners\" text,\n \"score\" text,\n \"runners_up\" text\n);\n\nQuestion: Who were the runners-up in the game that was won by Cork City F.C. on 10/05/1998?"
},
{
"role": "assistant",
"content": "SELECT \"runners_up\" FROM \"cup_finals_at_dalymount\" WHERE \"winners\"='cork city f.c.' AND \"date\"='10/05/1998';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cup_finals_at_dalymount\" (\n \"date\" text,\n \"competition\" text,\n \"winners\" text,\n \"score\" text,\n \"runners_up\" text\n);\n\nQuestion: What was the score in the game that was won by Sligo Rovers F.C.?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"cup_finals_at_dalymount\" WHERE \"winners\"='sligo rovers f.c.';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cup_finals_at_dalymount\" (\n \"date\" text,\n \"competition\" text,\n \"winners\" text,\n \"score\" text,\n \"runners_up\" text\n);\n\nQuestion: What date did the Fai Cup with Derry City F.C. as runners-up take place?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"cup_finals_at_dalymount\" WHERE \"competition\"='fai cup' AND \"runners_up\"='derry city f.c.';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semifinalists\" text\n);\n\nQuestion: What is the Runner-up on April 11?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"singles\" WHERE \"week\"='april 11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semifinalists\" text\n);\n\nQuestion: What was the Tournament on May 2?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles\" WHERE \"week\"='may 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ministers_without_portfolio\" (\n \"portfolio\" text,\n \"minister\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text\n);\n\nQuestion: What is Left Office, when Took Office is \"11 June 2001\", and when Minister is \"Mirko Tremaglia\"?"
},
{
"role": "assistant",
"content": "SELECT \"left_office\" FROM \"ministers_without_portfolio\" WHERE \"took_office\"='11 june 2001' AND \"minister\"='mirko tremaglia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ministers_without_portfolio\" (\n \"portfolio\" text,\n \"minister\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text\n);\n\nQuestion: What is Minister, when Party is \"AN\"?"
},
{
"role": "assistant",
"content": "SELECT \"minister\" FROM \"ministers_without_portfolio\" WHERE \"party\"='an';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ministers_without_portfolio\" (\n \"portfolio\" text,\n \"minister\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text\n);\n\nQuestion: What is Left Office, when Party is \"UDC\", and when Took Office is \"11 June 2001\"?"
},
{
"role": "assistant",
"content": "SELECT \"left_office\" FROM \"ministers_without_portfolio\" WHERE \"party\"='udc' AND \"took_office\"='11 june 2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ministers_without_portfolio\" (\n \"portfolio\" text,\n \"minister\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text\n);\n\nQuestion: What is Party, when Left Office is \"23 April 2005\", when Portfolio is \"Minister of Reforms and Devolutions\"?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"ministers_without_portfolio\" WHERE \"left_office\"='23 april 2005' AND \"portfolio\"='minister of reforms and devolutions';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ministers_without_portfolio\" (\n \"portfolio\" text,\n \"minister\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text\n);\n\nQuestion: What is Minister, when Portfolio is \"Minister of Pubblic Administration\", and when Took Office is \"14 November 2002\"?"
},
{
"role": "assistant",
"content": "SELECT \"minister\" FROM \"ministers_without_portfolio\" WHERE \"portfolio\"='minister of pubblic administration' AND \"took_office\"='14 november 2002';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ministers_without_portfolio\" (\n \"portfolio\" text,\n \"minister\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text\n);\n\nQuestion: What is Party, when Minister is \"Franco Frattini\"?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"ministers_without_portfolio\" WHERE \"minister\"='franco frattini';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What event had the opponent Ryan Bow?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='ryan bow';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What location had the opponent Hiroyuki Abe?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='hiroyuki abe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner\" text,\n \"runners_up\" text,\n \"aggregate\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the 2nd leg for 2004?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"winners\" WHERE \"year\"=2004;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner\" text,\n \"runners_up\" text,\n \"aggregate\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 2nd leg when San Pedro was the winner?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"winners\" WHERE \"winner\"='san pedro';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_present\" (\n \"season\" real,\n \"player\" text,\n \"club\" text,\n \"goals\" real,\n \"games\" real,\n \"rate\" real\n);\n\nQuestion: What was the rate when there were more than 22 goals?"
},
{
"role": "assistant",
"content": "SELECT \"rate\" FROM \"2005_present\" WHERE \"goals\">22;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What largest against has the opposing team of fiji?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"against\") FROM \"matches\" WHERE \"opposing_team\"='fiji';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: Which Position has a Competition of european race walking cup?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"achievements\" WHERE \"competition\"='european race walking cup';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: Which Venue has a Competition of european championships, and a Position of 7th?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"competition\"='european championships' AND \"position\"='7th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: Where was the world race walking cup held before 2001?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"year\"<2001 AND \"competition\"='world race walking cup';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_final_matches\" (\n \"opponent\" text,\n \"res\" text,\n \"class\" text,\n \"score\" text,\n \"date\" text,\n \"competition\" text,\n \"notes\" text\n);\n\nQuestion: WHAT COMPETITION HAS MARIAN SANDU?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"notable_final_matches\" WHERE \"res\"='marian sandu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_final_matches\" (\n \"opponent\" text,\n \"res\" text,\n \"class\" text,\n \"score\" text,\n \"date\" text,\n \"competition\" text,\n \"notes\" text\n);\n\nQuestion: WHAT SCORE WAS ON 1999-05-31?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"notable_final_matches\" WHERE \"date\"='1999-05-31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_final_matches\" (\n \"opponent\" text,\n \"res\" text,\n \"class\" text,\n \"score\" text,\n \"date\" text,\n \"competition\" text,\n \"notes\" text\n);\n\nQuestion: WHAT OPPONENT HAD A SCORE OF 5:5?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"notable_final_matches\" WHERE \"score\"='5:5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goals_for_senior_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What Competition on August 3, 2005 had a Score of 5-0?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"goals_for_senior_national_team\" WHERE \"score\"='5-0' AND \"date\"='august 3, 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goals_for_senior_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the Venue of the 2009 Gulf Cup of Nations?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"goals_for_senior_national_team\" WHERE \"competition\"='2009 gulf cup of nations';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goals_for_senior_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What Venue on October 27, 2005 had a Score of 5-0?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"goals_for_senior_national_team\" WHERE \"score\"='5-0' AND \"date\"='october 27, 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goals_for_senior_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Result of the Friendly Competition on October 27, 2005 with a Score of 5-0?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"goals_for_senior_national_team\" WHERE \"competition\"='friendly' AND \"score\"='5-0' AND \"date\"='october 27, 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: Can you tell me the total number of React that has the Lane of 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"react\") FROM \"final\" WHERE \"lane\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: Can you tell me the lowest React that has the Lane of 5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"react\") FROM \"final\" WHERE \"lane\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the winning score of the match with a margin of 3 strokes?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"wins_5\" WHERE \"margin\"='3 strokes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: How many years was there a peter jackson classic?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"wins_5\" WHERE \"championship\"='peter jackson classic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which year was the peter jackson classic?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"wins_5\" WHERE \"championship\"='peter jackson classic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is Date, when Visitor is Toronto?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season\" WHERE \"visitor\"='toronto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is Record, when Date is November 23?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"date\"='november 23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is Visitor, when Home is Philadelphia, and when Date is November 18?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"regular_season\" WHERE \"home\"='philadelphia' AND \"date\"='november 18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the average Attendance, when Visitor is Toronto?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"regular_season\" WHERE \"visitor\"='toronto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"year\" real,\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"rank\" real\n);\n\nQuestion: What's the average year with a rank less than 3?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"accolades\" WHERE \"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 \"year\" real,\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"rank\" real\n);\n\nQuestion: What country got accolades in 2002?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"accolades\" WHERE \"year\"=2002;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"year\" real,\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"rank\" real\n);\n\nQuestion: What's the accolade for the rank of 497?"
},
{
"role": "assistant",
"content": "SELECT \"accolade\" FROM \"accolades\" WHERE \"rank\"=497;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"year\" real,\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"rank\" real\n);\n\nQuestion: What's the average year for the accolade 100 greatest singles of all time?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"accolades\" WHERE \"accolade\"='100 greatest singles of all time';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the attendance during the game against Philadelphia?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"team\"='philadelphia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick_num\" real,\n \"nfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which NFL team has a player that came from a college in Washington?"
},
{
"role": "assistant",
"content": "SELECT \"nfl_team\" FROM \"nfl_draft\" WHERE \"college\"='washington';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick_num\" real,\n \"nfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position does Bobby Micho, who was picked later than 186 others, play on the Broncos team?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"pick_num\">186 AND \"player\"='bobby micho';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"goals\" real,\n \"ends\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is Since, when Transfer Fee is \"\u00a3 12m\"?"
},
{
"role": "assistant",
"content": "SELECT \"since\" FROM \"squad_information\" WHERE \"transfer_fee\"='\u00a3 12m';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"goals\" real,\n \"ends\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is Name, when Goals is greater than 14, and when Transfer Fee is \"Youth System\"?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"squad_information\" WHERE \"goals\">14 AND \"transfer_fee\"='youth system';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"goals\" real,\n \"ends\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is Nat., when Name is \"F\u00e0bregas ( Captain )\"?"
},
{
"role": "assistant",
"content": "SELECT \"nat\" FROM \"squad_information\" WHERE \"name\"='f\u00e0bregas ( captain )';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is Time, when Method is \"submission (knees)\"?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='submission (knees)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is Record, when Event is \"UFC 40\"?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='ufc 40';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_swedish_motorcycle_grand_\" (\n \"year\" text,\n \"track\" text,\n \"125_cc\" text,\n \"250_cc\" text,\n \"report\" text\n);\n\nQuestion: What is the name of the track that hosted the Swedish Grand Prix in 1979?"
},
{
"role": "assistant",
"content": "SELECT \"track\" FROM \"winners_of_the_swedish_motorcycle_grand_\" WHERE \"year\"='1979';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_swedish_motorcycle_grand_\" (\n \"year\" text,\n \"track\" text,\n \"125_cc\" text,\n \"250_cc\" text,\n \"report\" text\n);\n\nQuestion: What year did Barry Sheene win the 125 cc?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"winners_of_the_swedish_motorcycle_grand_\" WHERE \"125_cc\"='barry sheene';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_swedish_motorcycle_grand_\" (\n \"year\" text,\n \"track\" text,\n \"125_cc\" text,\n \"250_cc\" text,\n \"report\" text\n);\n\nQuestion: Who won the 250 cc in 1987?"
},
{
"role": "assistant",
"content": "SELECT \"250_cc\" FROM \"winners_of_the_swedish_motorcycle_grand_\" WHERE \"year\"='1987';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_swedish_motorcycle_grand_\" (\n \"year\" text,\n \"track\" text,\n \"125_cc\" text,\n \"250_cc\" text,\n \"report\" text\n);\n\nQuestion: At what track resulted in Fausto Gresini winning the 125 cc and Carlos Lavado winning the 250 cc?"
},
{
"role": "assistant",
"content": "SELECT \"track\" FROM \"winners_of_the_swedish_motorcycle_grand_\" WHERE \"125_cc\"='fausto gresini' AND \"250_cc\"='carlos lavado';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_swedish_motorcycle_grand_\" (\n \"year\" text,\n \"track\" text,\n \"125_cc\" text,\n \"250_cc\" text,\n \"report\" text\n);\n\nQuestion: Who won the 250 cc in 1985?"
},
{
"role": "assistant",
"content": "SELECT \"250_cc\" FROM \"winners_of_the_swedish_motorcycle_grand_\" WHERE \"year\"='1985';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" text\n);\n\nQuestion: Which opponent has 1-1 as the record?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='1-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" text\n);\n\nQuestion: What record has magomedkhan gamzatkhanov as the opponent, and submission as the method?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='magomedkhan gamzatkhanov' AND \"method\"='submission';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" text\n);\n\nQuestion: What round has 3-4 as the record?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='3-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" text\n);\n\nQuestion: What record has loss as the res., 1 for the round, and akira maeda as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='loss' AND \"round\"='1' AND \"opponent\"='akira maeda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" text\n);\n\nQuestion: What record has decision (majority) as the method?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='decision (majority)';"
}
] |
[
{
"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 1 is CD El\u00e1 Nguema?"
},
{
"role": "assistant",
"content": "SELECT \"agg\" FROM \"preliminary_round\" WHERE \"team_1\"='cd el\u00e1 nguema';"
}
] |
[
{
"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 1st Leg, when 2nd Leg is 1-3?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"preliminary_round\" WHERE \"2nd_leg\"='1-3';"
}
] |
[
{
"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 1st Leg, when 2nd Leg is 0-1?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"preliminary_round\" WHERE \"2nd_leg\"='0-1';"
}
] |
[
{
"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 2, when 2nd Leg is 1-0?"
},
{
"role": "assistant",
"content": "SELECT \"team_2\" FROM \"preliminary_round\" WHERE \"2nd_leg\"='1-0';"
}
] |
[
{
"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 2, when 2nd Leg is 2-1?"
},
{
"role": "assistant",
"content": "SELECT \"team_2\" FROM \"preliminary_round\" WHERE \"2nd_leg\"='2-1';"
}
] |
[
{
"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 2, when 2nd Leg is 0-3 1?"
},
{
"role": "assistant",
"content": "SELECT \"team_2\" FROM \"preliminary_round\" WHERE \"2nd_leg\"='0-3 1';"
}
] |
[
{
"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: What was Jim Colbert's score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round\" WHERE \"player\"='jim colbert';"
}
] |
[
{
"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: What country scored 69-69-73=211?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"score\"='69-69-73=211';"
}
] |
[
{
"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: What country does Bobby Nichols play for?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"player\"='bobby nichols';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: WHAT IS THE TIME/ RETIRED WITH A HONDA MANUFACTURER, GRID 8?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"125cc_classification\" WHERE \"manufacturer\"='honda' AND \"grid\"='8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: WHAT IS THE MANUFACTURER WITH 24 LAPS, AND +1.965 TIME/RETIRED?"
},
{
"role": "assistant",
"content": "SELECT \"manufacturer\" FROM \"125cc_classification\" WHERE \"laps\"='24' AND \"time_retired\"='+1.965';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: WHAT IS THE GRID OF HONDA, WITH 24 LAPS AND Time/Retired of +13.997?"
},
{
"role": "assistant",
"content": "SELECT \"grid\" FROM \"125cc_classification\" WHERE \"manufacturer\"='honda' AND \"laps\"='24' AND \"time_retired\"='+13.997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: WHAT IS THE LAPS WITH A GRID OF 26?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"125cc_classification\" WHERE \"grid\"='26';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: WHAT IS THE RIDER WITH A 21 GRID?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"125cc_classification\" WHERE \"grid\"='21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: WHAT IS THE MANUFACTURER WITH 24 LAPS AND GRID 27?"
},
{
"role": "assistant",
"content": "SELECT \"manufacturer\" FROM \"125cc_classification\" WHERE \"laps\"='24' AND \"grid\"='27';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_selected\" (\n \"year_a\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the most recent year georgia tech chose a linebacker?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year_a\") FROM \"players_selected\" WHERE \"position\"='linebacker' AND \"college\"='georgia tech';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Who is the player from Spain that has a +2 to par?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"to_par\"='+2' AND \"country\"='spain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Name the country with a score of 69-71=140."
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"score\"='69-71=140';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What's the to par for Hale Irwin of the United States?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"country\"='united states' AND \"player\"='hale irwin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What's the to par for Jim Thorpe in T5 Place?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"place\"='t5' AND \"player\"='jim thorpe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What was Jack Nicklaus's score after round 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"score\") FROM \"first_round\" WHERE \"player\"='jack nicklaus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Laps have a Time of +39.476, and a Grid larger than 11?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"moto_gp_classification\" WHERE \"time\"='+39.476' AND \"grid\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Time has Laps smaller than 28, and a Rider of nicky hayden?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"moto_gp_classification\" WHERE \"laps\"<28 AND \"rider\"='nicky hayden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Rider has a Grid larger than 6, and has Laps of 28, and a Time of +39.476?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"moto_gp_classification\" WHERE \"grid\">6 AND \"laps\"=28 AND \"time\"='+39.476';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Bronze has a Total of 4, and a Gold smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"total\"=4 AND \"gold\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Bronze has a Silver larger than 1, a Total larger than 3, a Nation of turkey, and a Gold smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"bronze\") FROM \"medal_table\" WHERE \"silver\">1 AND \"total\">3 AND \"nation\"='turkey' AND \"gold\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Gold has a Bronze of 1, and a Total smaller than 3?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"bronze\"=1 AND \"total\"<3;"
}
] |
[
{
"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: In what Week is the Opponent the New Orleans Saints?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"opponent\"='new orleans saints';"
}
] |
[
{
"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: In what Weeks is the game against the Tampa Bay Buccaneers with less than 44,506 in Attendance?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"opponent\"='tampa bay buccaneers' AND \"attendance\"<'44,506';"
}
] |
[
{
"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 Opponent in the game in Week 6 with more than 42,910 in Attendance?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\">'42,910' AND \"week\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What team was home, when the record was 24\u201316\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"regular_season\" WHERE \"record\"='24\u201316\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What date was the visitor the Boston Bruins, and the record was 4\u20130\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season\" WHERE \"visitor\"='boston bruins' AND \"record\"='4\u20130\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the most points in game 81?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"game\"=81;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"turkish_airlines_reported_incidents_and_\" (\n \"date\" text,\n \"flight\" text,\n \"aircraft\" text,\n \"registration\" text,\n \"location\" text,\n \"fatalities\" real\n);\n\nQuestion: Which flight had an aircraft of vickers viscount type 794?"
},
{
"role": "assistant",
"content": "SELECT \"flight\" FROM \"turkish_airlines_reported_incidents_and_\" WHERE \"aircraft\"='vickers viscount type 794';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"turkish_airlines_reported_incidents_and_\" (\n \"date\" text,\n \"flight\" text,\n \"aircraft\" text,\n \"registration\" text,\n \"location\" text,\n \"fatalities\" real\n);\n\nQuestion: Which flight had the aircraft avro rj-100?"
},
{
"role": "assistant",
"content": "SELECT \"flight\" FROM \"turkish_airlines_reported_incidents_and_\" WHERE \"aircraft\"='avro rj-100';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"turkish_airlines_reported_incidents_and_\" (\n \"date\" text,\n \"flight\" text,\n \"aircraft\" text,\n \"registration\" text,\n \"location\" text,\n \"fatalities\" real\n);\n\nQuestion: When was the registration of tc-jes?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"turkish_airlines_reported_incidents_and_\" WHERE \"registration\"='tc-jes';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.