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 \"top_5_jamaican_100_m_athletes_women\" (\n \"rank\" real,\n \"time\" real,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: Rank smaller than 5, and a Time larger than 10.7, and a Date of 10 july 2009 has what location?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"top_5_jamaican_100_m_athletes_women\" WHERE \"rank\"<5 AND \"time\">10.7 AND \"date\"='10 july 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"berkhamsted\" (\n \"name\" text,\n \"faith\" text,\n \"type\" text,\n \"opened\" real,\n \"intake\" real,\n \"dcsf_number\" real,\n \"ofsted_number\" real\n);\n\nQuestion: Faith of rc, and a Opened larger than 1966 which has the highest DCSF number?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"dcsf_number\") FROM \"berkhamsted\" WHERE \"faith\"='rc' AND \"opened\">1966;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"berkhamsted\" (\n \"name\" text,\n \"faith\" text,\n \"type\" text,\n \"opened\" real,\n \"intake\" real,\n \"dcsf_number\" real,\n \"ofsted_number\" real\n);\n\nQuestion: Faith of \u2013, and a Name of greenway has what type?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"berkhamsted\" WHERE \"faith\"='\u2013' AND \"name\"='greenway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lowest_team_totals_against\" (\n \"rank\" text,\n \"runs\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Who was the opponent that played at Launceston Cricket Club Ground, launceston during the season of 1853/54?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"lowest_team_totals_against\" WHERE \"venue\"='launceston cricket club ground, launceston' AND \"season\"='1853/54';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lowest_team_totals_against\" (\n \"rank\" text,\n \"runs\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What was the rank of the team during season 2006/07?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"lowest_team_totals_against\" WHERE \"season\"='2006/07';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lowest_team_totals_against\" (\n \"rank\" text,\n \"runs\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What was the venue where there were 55 runs?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"lowest_team_totals_against\" WHERE \"runs\"='55';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lowest_team_totals_against\" (\n \"rank\" text,\n \"runs\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What was the venue where there were 62 runs?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"lowest_team_totals_against\" WHERE \"runs\"='62';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Which driver had an accident and laps smaller than 53?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\"<53 AND \"time_retired\"='accident';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scholarly_journals\" (\n \"issn\" text,\n \"language\" text,\n \"country\" text,\n \"frequency\" text,\n \"publication_range\" text,\n \"status\" text,\n \"document_type\" text\n);\n\nQuestion: What language has a publication range from 1955\u20131999?"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"scholarly_journals\" WHERE \"publication_range\"='1955\u20131999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scholarly_journals\" (\n \"issn\" text,\n \"language\" text,\n \"country\" text,\n \"frequency\" text,\n \"publication_range\" text,\n \"status\" text,\n \"document_type\" text\n);\n\nQuestion: What is the status for a journal with the ISSN of 0149-1830?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"scholarly_journals\" WHERE \"issn\"='0149-1830';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scholarly_journals\" (\n \"issn\" text,\n \"language\" text,\n \"country\" text,\n \"frequency\" text,\n \"publication_range\" text,\n \"status\" text,\n \"document_type\" text\n);\n\nQuestion: What is the language with a France publication range of 1992\u20132003?"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"scholarly_journals\" WHERE \"country\"='france' AND \"publication_range\"='1992\u20132003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scholarly_journals\" (\n \"issn\" text,\n \"language\" text,\n \"country\" text,\n \"frequency\" text,\n \"publication_range\" text,\n \"status\" text,\n \"document_type\" text\n);\n\nQuestion: What is the ISSN number of a publication range of 1984-?"
},
{
"role": "assistant",
"content": "SELECT \"issn\" FROM \"scholarly_journals\" WHERE \"publication_range\"='1984-';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scholarly_journals\" (\n \"issn\" text,\n \"language\" text,\n \"country\" text,\n \"frequency\" text,\n \"publication_range\" text,\n \"status\" text,\n \"document_type\" text\n);\n\nQuestion: What is the language for a journal that has a frequency of 3 times per year and has an ISSN number of 1136-7385?"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"scholarly_journals\" WHERE \"frequency\"='3 times per year' AND \"issn\"='1136-7385';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dvd_releases\" (\n \"volume\" text,\n \"discs\" real,\n \"episodes\" real,\n \"region_1_release\" text,\n \"region_2_release\" text,\n \"region_4_release\" text\n);\n\nQuestion: What is the region 4 release that has july 20, 2009 as the region 2?"
},
{
"role": "assistant",
"content": "SELECT \"region_4_release\" FROM \"dvd_releases\" WHERE \"region_2_release\"='july 20, 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dvd_releases\" (\n \"volume\" text,\n \"discs\" real,\n \"episodes\" real,\n \"region_1_release\" text,\n \"region_2_release\" text,\n \"region_4_release\" text\n);\n\nQuestion: What is the region 1 release that has july 20, 2009 as the region 2?"
},
{
"role": "assistant",
"content": "SELECT \"region_1_release\" FROM \"dvd_releases\" WHERE \"region_2_release\"='july 20, 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dvd_releases\" (\n \"volume\" text,\n \"discs\" real,\n \"episodes\" real,\n \"region_1_release\" text,\n \"region_2_release\" text,\n \"region_4_release\" text\n);\n\nQuestion: What is the average episode that has September 11, 2007 as a region 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"episodes\") FROM \"dvd_releases\" WHERE \"region_1_release\"='september 11, 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"proposed_or_under_construction\" (\n \"wind_farm\" text,\n \"scheduled\" text,\n \"capacity_mw\" real,\n \"turbines\" real,\n \"type\" text,\n \"location\" text\n);\n\nQuestion: What is the scheduled value for the farm having a capacity under 32.5MW, type of Nordex n90 2.5MW, and a farm of Glenough Extension?"
},
{
"role": "assistant",
"content": "SELECT \"scheduled\" FROM \"proposed_or_under_construction\" WHERE \"capacity_mw\"<32.5 AND \"type\"='nordex n90 2.5mw' AND \"wind_farm\"='glenough extension';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"proposed_or_under_construction\" (\n \"wind_farm\" text,\n \"scheduled\" text,\n \"capacity_mw\" real,\n \"turbines\" real,\n \"type\" text,\n \"location\" text\n);\n\nQuestion: What is the type of turbine having fewer than 17 units and located in County Laois?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"proposed_or_under_construction\" WHERE \"turbines\"<17 AND \"location\"='county laois';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"proposed_or_under_construction\" (\n \"wind_farm\" text,\n \"scheduled\" text,\n \"capacity_mw\" real,\n \"turbines\" real,\n \"type\" text,\n \"location\" text\n);\n\nQuestion: When is the scheduled date for the farm having 17 turbines?"
},
{
"role": "assistant",
"content": "SELECT \"scheduled\" FROM \"proposed_or_under_construction\" WHERE \"turbines\"=17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"proposed_or_under_construction\" (\n \"wind_farm\" text,\n \"scheduled\" text,\n \"capacity_mw\" real,\n \"turbines\" real,\n \"type\" text,\n \"location\" text\n);\n\nQuestion: What is the average capacity for the farm at Gortahile having more than 8 turbines?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"capacity_mw\") FROM \"proposed_or_under_construction\" WHERE \"wind_farm\"='gortahile' AND \"turbines\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"933_1062\" (\n \"throne_name\" text,\n \"title\" text,\n \"born_died\" text,\n \"entered_office\" text,\n \"left_office\" text,\n \"family_relations\" text\n);\n\nQuestion: What is the title of the king who left office in 982 and entered office in 949?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"933_1062\" WHERE \"left_office\"='982' AND \"entered_office\"='949';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"933_1062\" (\n \"throne_name\" text,\n \"title\" text,\n \"born_died\" text,\n \"entered_office\" text,\n \"left_office\" text,\n \"family_relations\" text\n);\n\nQuestion: When did the king who entered office in 1012 leave office?"
},
{
"role": "assistant",
"content": "SELECT \"left_office\" FROM \"933_1062\" WHERE \"entered_office\"='1012';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"933_1062\" (\n \"throne_name\" text,\n \"title\" text,\n \"born_died\" text,\n \"entered_office\" text,\n \"left_office\" text,\n \"family_relations\" text\n);\n\nQuestion: What are the family relations of the king with the throne name 303?"
},
{
"role": "assistant",
"content": "SELECT \"family_relations\" FROM \"933_1062\" WHERE \"throne_name\"='303';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"933_1062\" (\n \"throne_name\" text,\n \"title\" text,\n \"born_died\" text,\n \"entered_office\" text,\n \"left_office\" text,\n \"family_relations\" text\n);\n\nQuestion: What is teh born-died dates of the king with a throne name 315 and left office in 1021?"
},
{
"role": "assistant",
"content": "SELECT \"born_died\" FROM \"933_1062\" WHERE \"left_office\"='1021' AND \"throne_name\"='315';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_10_2_titles_8_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Which Opponents have a Partner of irina-camelia begu, and a Surface of hard?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_10_2_titles_8_runners_up\" WHERE \"partner\"='irina-camelia begu' AND \"surface\"='hard';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_10_2_titles_8_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Which Surface has a Partner of galina voskoboeva?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_10_2_titles_8_runners_up\" WHERE \"partner\"='galina voskoboeva';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_10_2_titles_8_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Which Opponents have a Surface of hard, and an Outcome of runner-up, and a Partner of jarmila gajdo\u0161ov\u00e1?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_10_2_titles_8_runners_up\" WHERE \"surface\"='hard' AND \"outcome\"='runner-up' AND \"partner\"='jarmila gajdo\u0161ov\u00e1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_10_2_titles_8_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Which Partner has a Date of 12 july 2009?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"doubles_10_2_titles_8_runners_up\" WHERE \"date\"='12 july 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_10_2_titles_8_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Which Surface has a Partner of sorana c\u00eerstea?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_10_2_titles_8_runners_up\" WHERE \"partner\"='sorana c\u00eerstea';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the least overall with pick number more than 27"
},
{
"role": "assistant",
"content": "SELECT MIN(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\">27;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"eighthfinals\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: what's the first leg with gran canaria as team #2?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"eighthfinals\" WHERE \"team_num2\"='gran canaria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"eighthfinals\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: with team #1 as lukoil academic what is team #2?"
},
{
"role": "assistant",
"content": "SELECT \"team_num2\" FROM \"eighthfinals\" WHERE \"team_num1\"='lukoil academic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"eighthfinals\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: with team #2 as akasvayu girona what is team #1?"
},
{
"role": "assistant",
"content": "SELECT \"team_num1\" FROM \"eighthfinals\" WHERE \"team_num2\"='akasvayu girona';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seven_heavenly_virtues\" (\n \"virtue\" text,\n \"latin\" text,\n \"gloss\" text,\n \"vice\" text,\n \"latin\" text\n);\n\nQuestion: Which virtue is acedia(Latin)?"
},
{
"role": "assistant",
"content": "SELECT \"virtue\" FROM \"seven_heavenly_virtues\" WHERE \"latin\"='acedia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seven_heavenly_virtues\" (\n \"virtue\" text,\n \"latin\" text,\n \"gloss\" text,\n \"vice\" text,\n \"latin\" text\n);\n\nQuestion: Which Virtue has a (vice) of lust?"
},
{
"role": "assistant",
"content": "SELECT \"virtue\" FROM \"seven_heavenly_virtues\" WHERE \"vice\"='lust';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seven_heavenly_virtues\" (\n \"virtue\" text,\n \"latin\" text,\n \"gloss\" text,\n \"vice\" text,\n \"latin\" text\n);\n\nQuestion: Which virtue is Invidia(Latin)?"
},
{
"role": "assistant",
"content": "SELECT \"virtue\" FROM \"seven_heavenly_virtues\" WHERE \"latin\"='invidia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seven_heavenly_virtues\" (\n \"virtue\" text,\n \"latin\" text,\n \"gloss\" text,\n \"vice\" text,\n \"latin\" text\n);\n\nQuestion: What's the gloss with Castitas(Latin)?"
},
{
"role": "assistant",
"content": "SELECT \"gloss\" FROM \"seven_heavenly_virtues\" WHERE \"latin\"='castitas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seven_heavenly_virtues\" (\n \"virtue\" text,\n \"latin\" text,\n \"gloss\" text,\n \"vice\" text,\n \"latin\" text\n);\n\nQuestion: What is the Diligence Virtues Gloss?"
},
{
"role": "assistant",
"content": "SELECT \"gloss\" FROM \"seven_heavenly_virtues\" WHERE \"virtue\"='diligence';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seven_heavenly_virtues\" (\n \"virtue\" text,\n \"latin\" text,\n \"gloss\" text,\n \"vice\" text,\n \"latin\" text\n);\n\nQuestion: What is the Virtue of Temperance in Latin?"
},
{
"role": "assistant",
"content": "SELECT \"latin\" FROM \"seven_heavenly_virtues\" WHERE \"virtue\"='temperance';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: In what year(s) did South Korea win silver?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"team\" WHERE \"silver\"='south korea';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: Which nation(s) won silver in Doha?"
},
{
"role": "assistant",
"content": "SELECT \"silver\" FROM \"team\" WHERE \"location\"='doha';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: What was the first year that South Korea won gold and Malaysia won bronze?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"team\" WHERE \"gold\"='south korea' AND \"bronze\"='malaysia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: What country won gold in the year(s) that Chinese Taipei won bronze?"
},
{
"role": "assistant",
"content": "SELECT \"gold\" FROM \"team\" WHERE \"bronze\"='chinese taipei';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" text,\n \"tier\" real,\n \"league\" text,\n \"pos\" real,\n \"postseason\" text,\n \"dutch_cup\" text,\n \"european_competitions\" text\n);\n\nQuestion: Which European competitions have a Pos of 6?"
},
{
"role": "assistant",
"content": "SELECT \"european_competitions\" FROM \"results\" WHERE \"pos\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" text,\n \"tier\" real,\n \"league\" text,\n \"pos\" real,\n \"postseason\" text,\n \"dutch_cup\" text,\n \"european_competitions\" text\n);\n\nQuestion: Which Pos has a Dutch Cup of winner, and a Tier larger than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pos\") FROM \"results\" WHERE \"dutch_cup\"='winner' AND \"tier\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the average Frequency MHz that is on farwell, texas?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"frequency_m_hz\") FROM \"external_links\" WHERE \"city_of_license\"='farwell, texas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: WHich City of license has a FCC info of fcc, and 10,000 horizontal 3,000 vertical ERP W"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"external_links\" WHERE \"fcc_info\"='fcc' AND \"erp_w\"='10,000 horizontal 3,000 vertical';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: WHich FCC info has 3,000 ERP W?"
},
{
"role": "assistant",
"content": "SELECT \"fcc_info\" FROM \"external_links\" WHERE \"erp_w\"='3,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What's the average game against the New Jersey Devils with 19 points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"game\") FROM \"regular_season\" WHERE \"points\"=19 AND \"opponent\"='new jersey devils';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: Opponent of at boston patriots, and a Week larger than 3 had what average attendance?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='at boston patriots' AND \"week\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"geography_of_students\" (\n \"maryland_counties\" text,\n \"fall_05\" real,\n \"fall_06\" real,\n \"fall_07\" real,\n \"fall_08\" real,\n \"fall_09\" real\n);\n\nQuestion: Name the average fall 07 for fall 07 more than 219"
},
{
"role": "assistant",
"content": "SELECT AVG(\"fall_07\") FROM \"geography_of_students\" WHERE \"fall_06\">219;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: Name the player for fc dallas pick number less than 3"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_one\" WHERE \"pick_num\"<3 AND \"mls_team\"='fc dallas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: Name the most pick number for real salt lake and affiliation of ucla los angeles storm"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick_num\") FROM \"round_one\" WHERE \"mls_team\"='real salt lake' AND \"affiliation\"='ucla los angeles storm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: Name the player with pick number of 7"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_one\" WHERE \"pick_num\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Game has a March smaller than 12, and a Score of 10\u20131?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"regular_season\" WHERE \"march\"<12 AND \"score\"='10\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Score has Points of 88, and a Record of 38\u201322\u201312?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"points\"=88 AND \"record\"='38\u201322\u201312';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Game has an Opponent of detroit red wings, and a March smaller than 12?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"game\") FROM \"regular_season\" WHERE \"opponent\"='detroit red wings' AND \"march\"<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 \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Points have a Game smaller than 70, and a Score of 4\u20138?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"regular_season\" WHERE \"game\"<70 AND \"score\"='4\u20138';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_10_2007_2008\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: Which segment a's Netflix is S05E22?"
},
{
"role": "assistant",
"content": "SELECT \"segment_a\" FROM \"season_10_2007_2008\" WHERE \"netflix\"='s05e22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_10_2007_2008\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: Which series episode has a segment c that is Electric pole s transformer?"
},
{
"role": "assistant",
"content": "SELECT \"series_ep\" FROM \"season_10_2007_2008\" WHERE \"segment_c\"='electric pole s transformer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_10_2007_2008\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: What largest episode number's Netflix is S05E23?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"episode\") FROM \"season_10_2007_2008\" WHERE \"netflix\"='s05e23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_10_2007_2008\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: Which segment c's segment b is refrigerators?"
},
{
"role": "assistant",
"content": "SELECT \"segment_c\" FROM \"season_10_2007_2008\" WHERE \"segment_b\"='refrigerators';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" text,\n \"wins\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Which races did they accumulate at least 125 points?"
},
{
"role": "assistant",
"content": "SELECT \"races\" FROM \"career_summary\" WHERE \"points\"='125';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: Which Series has a Score of 3 \u2013 8?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"playoffs\" WHERE \"score\"='3 \u2013 8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: Which Date has a Decision of myre?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"playoffs\" WHERE \"decision\"='myre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: How many Attendances on may 24?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"playoffs\" WHERE \"date\"='may 24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: Which Series are on may 18?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"playoffs\" WHERE \"date\"='may 18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: How many Attendances that has a Visitor of philadelphia on may 20?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"playoffs\" WHERE \"visitor\"='philadelphia' AND \"date\"='may 20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: who is the Visitor that has a Series of series tied 2\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"playoffs\" WHERE \"series\"='series tied 2\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: How many Attendances have a Score of 4 \u2013 5? Question 4"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"playoffs\" WHERE \"score\"='4 \u2013 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: WHo has a Home of philadelphia and a Series of flyers lead 1\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"playoffs\" WHERE \"home\"='philadelphia' AND \"series\"='flyers lead 1\u20130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: What is the class of the Charlotte Camel gt 500 race?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"schedule\" WHERE \"race\"='charlotte camel gt 500';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: What is the race 12 hours in length?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"schedule\" WHERE \"length\"='12 hours';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: What is the class of the Coca-cola classic 12 hours of sebring race?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"schedule\" WHERE \"race\"='coca-cola classic 12 hours of sebring';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: What is the class of the Budweiser Grand Prix of Miami race with a length of 3 hours?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"schedule\" WHERE \"race\"='budweiser grand prix of miami' AND \"length\"='3 hours';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: What is the date of the Paul Revere 250 race in the Daytona International Speedway circuit?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"circuit\"='daytona international speedway' AND \"race\"='paul revere 250';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: What race is 12 hours in length?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"schedule\" WHERE \"length\"='12 hours';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nhl_draft\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is the highest round for the pick from Finland?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"nhl_draft\" WHERE \"nationality\"='finland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nhl_draft\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is the total number of rounds that Joe Barnes was picked?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"nhl_draft\" WHERE \"player\"='joe barnes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engelberg\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: What is the total 2nd of Thomas Morgenstern, who has a 1st less than 132.5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"2nd_m\") FROM \"engelberg\" WHERE \"name\"='thomas morgenstern' AND \"1st_m\"<132.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"iaba_olympic_medals\" (\n \"order\" text,\n \"year\" real,\n \"olympic_games\" text,\n \"medal\" text,\n \"weight\" text,\n \"boxer\" text,\n \"club\" text\n);\n\nQuestion: What was the order of the Tokyo olympic games?"
},
{
"role": "assistant",
"content": "SELECT \"order\" FROM \"iaba_olympic_medals\" WHERE \"olympic_games\"='tokyo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"iaba_olympic_medals\" (\n \"order\" text,\n \"year\" real,\n \"olympic_games\" text,\n \"medal\" text,\n \"weight\" text,\n \"boxer\" text,\n \"club\" text\n);\n\nQuestion: What was the 15th club in 2012?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"iaba_olympic_medals\" WHERE \"year\"=2012 AND \"order\"='15th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"iaba_olympic_medals\" (\n \"order\" text,\n \"year\" real,\n \"olympic_games\" text,\n \"medal\" text,\n \"weight\" text,\n \"boxer\" text,\n \"club\" text\n);\n\nQuestion: What medal did Michael Conlon, with a weight of fly, win?"
},
{
"role": "assistant",
"content": "SELECT \"medal\" FROM \"iaba_olympic_medals\" WHERE \"weight\"='fly' AND \"boxer\"='michael conlon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: How many losses have more than 45,036 attendance?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"attendance\">'45,036';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: on april 29, what was the attendance?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"date\"='april 29';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: on april 9 what was the attendance?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"game_log\" WHERE \"date\"='april 9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What date has postponed (rain) rescheduled for august 7 as the score?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='postponed (rain) rescheduled for august 7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_country\" (\n \"country\" text,\n \"launches\" real,\n \"successes\" real,\n \"failures\" real,\n \"partial_failures\" real\n);\n\nQuestion: Failures larger than 0, and a Successes of 1 has what lowest partial failures?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"partial_failures\") FROM \"by_country\" WHERE \"failures\">0 AND \"successes\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_country\" (\n \"country\" text,\n \"launches\" real,\n \"successes\" real,\n \"failures\" real,\n \"partial_failures\" real\n);\n\nQuestion: Successes smaller than 6, and Launches larger than 1, and a Failures of 2 is what sum of the partial failures?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"partial_failures\") FROM \"by_country\" WHERE \"successes\"<6 AND \"launches\">1 AND \"failures\"=2;"
}
] |
[
{
"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 \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Who was the opposing team during a game in the Pontiac Silverdome?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"location\"='pontiac silverdome';"
}
] |
[
{
"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 \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What was the final score for the January 23 game?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='january 23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the highest Feb value having an opponent of the Philadelphia Flyers and is after game 63?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"february\") FROM \"schedule_and_results\" WHERE \"opponent\"='philadelphia flyers' AND \"game\">63;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent in games over 58, after Feb 16, and having a record of 40-20-4?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule_and_results\" WHERE \"game\">58 AND \"february\">16 AND \"record\"='40-20-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammy_hall_of_fame\" (\n \"year\" real,\n \"title\" text,\n \"genre\" text,\n \"label\" text,\n \"year_inducted\" real\n);\n\nQuestion: Which Year has a Genre of rock (track)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"grammy_hall_of_fame\" WHERE \"genre\"='rock (track)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammy_hall_of_fame\" (\n \"year\" real,\n \"title\" text,\n \"genre\" text,\n \"label\" text,\n \"year_inducted\" real\n);\n\nQuestion: Which Year Inducted is the highest one that has a Year smaller than 1965?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year_inducted\") FROM \"grammy_hall_of_fame\" WHERE \"year\"<1965;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Overall is the highest one that has a Pick # smaller than 9, and a Name of mike pearson?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"overall\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"pick_num\"<9 AND \"name\"='mike pearson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Round is the lowest one that has a Position of wide receiver, and an Overall smaller than 222?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"position\"='wide receiver' AND \"overall\"<222;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text,\n \"record\" text\n);\n\nQuestion: What was the Record on September 21?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='september 21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text,\n \"record\" text\n);\n\nQuestion: What was the record the day David Weathers (15) had a save?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"save\"='david weathers (15)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text,\n \"record\" text\n);\n\nQuestion: Who had a save on September 2?"
},
{
"role": "assistant",
"content": "SELECT \"save\" FROM \"game_log\" WHERE \"date\"='september 2';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.