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 \"2005\" (\n \"film\" text,\n \"director_s\" text,\n \"producer_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: Who directed the film Antonio's Breakfast?"
},
{
"role": "assistant",
"content": "SELECT \"director_s\" FROM \"2005\" WHERE \"film\"='antonio''s breakfast';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005\" (\n \"film\" text,\n \"director_s\" text,\n \"producer_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: Who was the director of the film that Sister Films received an award for on 2/3/05?"
},
{
"role": "assistant",
"content": "SELECT \"director_s\" FROM \"2005\" WHERE \"date\"='2/3/05' AND \"recipient\"='sister films';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"municipality\" text,\n \"number\" real,\n \"population\" real,\n \"area\" real,\n \"density\" real\n);\n\nQuestion: Name the least number with density more than 262 with population more than 22,415 and area less than 335.14"
},
{
"role": "assistant",
"content": "SELECT MIN(\"number\") FROM \"statistics\" WHERE \"density\">262 AND \"population\">'22,415' AND \"area\"<335.14;"
}
]
|
[
{
"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 is the score of the game on June 9?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='june 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 \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the usual attendance for july 2?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"game_log\" WHERE \"date\"='july 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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which loss has Attendance more than 47,712, an Opponent of white sox, and a Record of 57\u201336?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"attendance\">'47,712' AND \"opponent\"='white sox' AND \"record\"='57\u201336';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"county\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What was the value for deleted for CERCLIS ID of il0210090049?"
},
{
"role": "assistant",
"content": "SELECT \"deleted\" FROM \"superfund_sites\" WHERE \"cerclis_id\"='il0210090049';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"county\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What is the date construction is completed in Jo Daviess county?"
},
{
"role": "assistant",
"content": "SELECT \"construction_completed\" FROM \"superfund_sites\" WHERE \"county\"='jo daviess';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio_and_cd_audio_drama\" (\n \"year\" real,\n \"role\" text,\n \"author\" text,\n \"radio_station_production_company\" text,\n \"release_air_date\" text\n);\n\nQuestion: Role of narrator, and a Year larger than 2009, and a Release/Air Date of 7 october 2010 belongs to what author?"
},
{
"role": "assistant",
"content": "SELECT \"author\" FROM \"radio_and_cd_audio_drama\" WHERE \"role\"='narrator' AND \"year\">2009 AND \"release_air_date\"='7 october 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio_and_cd_audio_drama\" (\n \"year\" real,\n \"role\" text,\n \"author\" text,\n \"radio_station_production_company\" text,\n \"release_air_date\" text\n);\n\nQuestion: Role of narrator, and a Radio Station/Production Company of bbc audiobooks, and a Release/Air Date of 13 november 2008 is what sum of the year?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"radio_and_cd_audio_drama\" WHERE \"role\"='narrator' AND \"radio_station_production_company\"='bbc audiobooks' AND \"release_air_date\"='13 november 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio_and_cd_audio_drama\" (\n \"year\" real,\n \"role\" text,\n \"author\" text,\n \"radio_station_production_company\" text,\n \"release_air_date\" text\n);\n\nQuestion: Radio Station/Production Company that has a Role of interviewee & monologues is what radio station?"
},
{
"role": "assistant",
"content": "SELECT \"radio_station_production_company\" FROM \"radio_and_cd_audio_drama\" WHERE \"role\"='interviewee & monologues';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What was the position of the Racing Organisation Course team?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"24_hours_of_le_mans_results\" WHERE \"team\"='racing organisation course';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Who were the co-drivers for the Racing Organisation Course team in years before 2011, who had a position of DNF?"
},
{
"role": "assistant",
"content": "SELECT \"co_drivers\" FROM \"24_hours_of_le_mans_results\" WHERE \"pos\"='dnf' AND \"year\"<2011 AND \"team\"='racing organisation course';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Who were the co-drivers in years after 2010?"
},
{
"role": "assistant",
"content": "SELECT \"co_drivers\" FROM \"24_hours_of_le_mans_results\" WHERE \"year\">2010;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"londonderry_and_lough_swilly_railway\" (\n \"type\" text,\n \"fleet_numbers\" text,\n \"quantity_made\" real,\n \"manufacturer\" text,\n \"date_made\" text,\n \"date_withdrawn\" text\n);\n\nQuestion: What is the date made that has an associated fleet number of 4?"
},
{
"role": "assistant",
"content": "SELECT \"date_made\" FROM \"londonderry_and_lough_swilly_railway\" WHERE \"fleet_numbers\"='4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"londonderry_and_lough_swilly_railway\" (\n \"type\" text,\n \"fleet_numbers\" text,\n \"quantity_made\" real,\n \"manufacturer\" text,\n \"date_made\" text,\n \"date_withdrawn\" text\n);\n\nQuestion: What is the withdrawal date associated with a date made of 1904?"
},
{
"role": "assistant",
"content": "SELECT \"date_withdrawn\" FROM \"londonderry_and_lough_swilly_railway\" WHERE \"date_made\"='1904';"
}
]
|
[
{
"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 \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Name the game site with result of l 7-38"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"result\"='l 7-38';"
}
]
|
[
{
"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 \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Name the result for arrowhead stadium"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"game_site\"='arrowhead stadium';"
}
]
|
[
{
"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 \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Name the least attendance for opponent of new orleans saints and week more than 2"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"week\">2 AND \"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 \"pga_tour_career_summary\" (\n \"year\" text,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" text,\n \"money_list_rank\" text\n);\n\nQuestion: What amount of earnings corresponds with a Top 10s rank of 23?"
},
{
"role": "assistant",
"content": "SELECT \"earnings\" FROM \"pga_tour_career_summary\" WHERE \"top_10s\"=23;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_career_summary\" (\n \"year\" text,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" text,\n \"money_list_rank\" text\n);\n\nQuestion: What 2012 amount of earnings corresponds with less than 28 tournaments played?"
},
{
"role": "assistant",
"content": "SELECT \"earnings\" FROM \"pga_tour_career_summary\" WHERE \"tournaments_played\"<28 AND \"year\"='2012';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Tell me the year with Laps less than 197 and start of 2"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"indy_500_results\" WHERE \"laps\"<197 AND \"start\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Name the qual with start of totals"
},
{
"role": "assistant",
"content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"start\"='totals';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Name the total number of laps with rank of 8"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"indy_500_results\" WHERE \"rank\"='8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Name the start with Laps of 199 with qual of 224.838"
},
{
"role": "assistant",
"content": "SELECT \"start\" FROM \"indy_500_results\" WHERE \"laps\"=199 AND \"qual\"='224.838';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: On what date was the score 1-2 at Athens Olympic Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"national_team\" WHERE \"score\"='1-2' AND \"venue\"='athens olympic stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What was the Match Report for the Euro2008q at the Athens Olympic Stadium on November 17, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"match_report\" FROM \"national_team\" WHERE \"competition\"='euro2008q' AND \"venue\"='athens olympic stadium' AND \"date\"='november 17, 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What was the Match Report for the Euro2008q at the Athens Olympic Stadium and a score of 1-2?"
},
{
"role": "assistant",
"content": "SELECT \"match_report\" FROM \"national_team\" WHERE \"competition\"='euro2008q' AND \"venue\"='athens olympic stadium' AND \"score\"='1-2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: On what date was the score 2-1?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"national_team\" WHERE \"score\"='2-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: On what date was the Competition of Friendly held?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"national_team\" WHERE \"competition\"='friendly';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What was the score at Pankritio Stadium on June 6, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"national_team\" WHERE \"venue\"='pankritio stadium' AND \"date\"='june 6, 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"west_indies_in_australia\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: On what date was there a draw at Sydney Cricket Ground?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"west_indies_in_australia\" WHERE \"result\"='draw' AND \"venue\"='sydney cricket ground';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"west_indies_in_australia\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: In what venue was the result a draw?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"west_indies_in_australia\" WHERE \"result\"='draw';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"west_indies_in_australia\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: On what date was the result Wi by 1 run?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"west_indies_in_australia\" WHERE \"result\"='wi by 1 run';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"west_indies_in_australia\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What venue had a draw?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"west_indies_in_australia\" WHERE \"result\"='draw';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" real\n);\n\nQuestion: What is the total number of points for entrants with a Jordan 192 chassis?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pts\") FROM \"complete_formula_one_results\" WHERE \"chassis\"='jordan 192';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" real\n);\n\nQuestion: Which entrant had a chassis of March CG891?"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"complete_formula_one_results\" WHERE \"chassis\"='march cg891';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" real\n);\n\nQuestion: What is the lowest number of points for an entrant with a Jordan 192 chassis?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pts\") FROM \"complete_formula_one_results\" WHERE \"chassis\"='jordan 192';"
}
]
|
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: What Opponent has the Attendance of 14,029?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"attendance\"='14,029';"
}
]
|
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the Attendance that has the Date of april 12?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"date\"='april 12';"
}
]
|
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the Score that has the Opponent of brewers, and the Attendance of 11,235?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='brewers' AND \"attendance\"='11,235';"
}
]
|
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the Score that has the Attendance of 4,567?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"attendance\"='4,567';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: What is the date with the distance of km (mi) at the course of roccaraso to san giorgio del sannio?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"stage_results\" WHERE \"distance\"='km (mi)' AND \"course\"='roccaraso to san giorgio del sannio';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the engine with entrant of larrousse f1"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"complete_formula_one_results\" WHERE \"entrant\"='larrousse f1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the average yeara for engine of renault v10 with points more than 4"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"complete_formula_one_results\" WHERE \"engine\"='renault v10' AND \"points\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the sumof points for year less than 1994 and chassis of lola lc89b"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"complete_formula_one_results\" WHERE \"year\"<1994 AND \"chassis\"='lola lc89b';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the entrant for year more than 1991 and chassis of lotus 109"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"complete_formula_one_results\" WHERE \"year\">1991 AND \"chassis\"='lotus 109';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the sum of points for 1991"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"complete_formula_one_results\" WHERE \"year\"=1991;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: Which type has turin to monza as a course?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"stage_results\" WHERE \"course\"='turin to monza';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: Which course has km (mi) as a type?"
},
{
"role": "assistant",
"content": "SELECT \"course\" FROM \"stage_results\" WHERE \"type\"='km (mi)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: What winner has the sanremo to cuneo as the course?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"stage_results\" WHERE \"course\"='sanremo to cuneo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"stage\" text,\n \"route\" text,\n \"distance\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: Name the distance for stage of 2"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"schedule\" WHERE \"stage\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"stage\" text,\n \"route\" text,\n \"distance\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: Name the route with winner of s\u00e9bastien rosseler"
},
{
"role": "assistant",
"content": "SELECT \"route\" FROM \"schedule\" WHERE \"winner\"='s\u00e9bastien rosseler';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"stage\" text,\n \"route\" text,\n \"distance\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: Name the route for 170.8km distance"
},
{
"role": "assistant",
"content": "SELECT \"route\" FROM \"schedule\" WHERE \"distance\"='170.8km';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"stage\" text,\n \"route\" text,\n \"distance\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: Name the date for luciano pagliarini"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"winner\"='luciano pagliarini';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"stage\" text,\n \"route\" text,\n \"distance\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: Name the date for mark cavendish"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"winner\"='mark cavendish';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Name the laps for qual of 144.665"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"indy_500_results\" WHERE \"qual\"='144.665';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Name the total number of Laps for year of 1961"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"indy_500_results\" WHERE \"year\"='1961';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Name the finish for start of 28"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"indy_500_results\" WHERE \"start\"='28';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Name the laps for rank of 14 and start of 16"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"indy_500_results\" WHERE \"rank\"='14' AND \"start\"='16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Name the qual for year of 1960"
},
{
"role": "assistant",
"content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"year\"='1960';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_raiders_draft_selections\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the name of the player in position lb and an overall of 128?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"1980_raiders_draft_selections\" WHERE \"position\"='lb' AND \"overall\"=128;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_raiders_draft_selections\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the total overall when Kenny Lewis is the player in a round after 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"overall\") FROM \"1980_raiders_draft_selections\" WHERE \"player\"='kenny lewis' AND \"round\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_raiders_draft_selections\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the college when the over is larger than 15 in round 7?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"1980_raiders_draft_selections\" WHERE \"overall\">15 AND \"round\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_raiders_draft_selections\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the position with an overall less than 128 for Brigham Young college?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"1980_raiders_draft_selections\" WHERE \"overall\"<128 AND \"college\"='brigham young';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"premier_league\" (\n \"date\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"league_position\" text\n);\n\nQuestion: How many attended the game on 4 February 2003?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"premier_league\" WHERE \"date\"='4 february 2003';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: yes or no for the auckland with a yes for sydney, no for perth, yes for melbourne and yes for the gold coast?"
},
{
"role": "assistant",
"content": "SELECT \"auckland\" FROM \"1997\" WHERE \"sydney\"='yes' AND \"perth\"='no' AND \"melbourne\"='yes' AND \"gold_coast\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: yes or no for the adelaide with no for auckland, yes for melbourne, yes for the gold coast?"
},
{
"role": "assistant",
"content": "SELECT \"adelaide\" FROM \"1997\" WHERE \"auckland\"='no' AND \"melbourne\"='yes' AND \"gold_coast\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: yes or no for the gold coast with yes for melbourne, yes for adelaide, yes for auckland?"
},
{
"role": "assistant",
"content": "SELECT \"gold_coast\" FROM \"1997\" WHERE \"melbourne\"='yes' AND \"adelaide\"='yes' AND \"auckland\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: yes or no for the melbourne with yes for gold coast, yes for adelaide, no for auckland?"
},
{
"role": "assistant",
"content": "SELECT \"melbourne\" FROM \"1997\" WHERE \"gold_coast\"='yes' AND \"adelaide\"='no' AND \"auckland\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: yes or no for the sydney with yes for melbourne, no for perth, no for auckland and no for gold coast?"
},
{
"role": "assistant",
"content": "SELECT \"sydney\" FROM \"1997\" WHERE \"melbourne\"='yes' AND \"perth\"='no' AND \"auckland\"='no' AND \"gold_coast\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: yes or no for the melbourne that has no for adelaide, no for gold coast?"
},
{
"role": "assistant",
"content": "SELECT \"melbourne\" FROM \"1997\" WHERE \"adelaide\"='yes' AND \"gold_coast\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"rank\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"runs_allowed\" real,\n \"run_ratio\" real\n);\n\nQuestion: How many losses did the team with 0 wins and more than 72 runs allowed have?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"losses\") FROM \"pool_a\" WHERE \"wins\"=0 AND \"runs_allowed\">72;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"rank\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"runs_allowed\" real,\n \"run_ratio\" real\n);\n\nQuestion: What is the lowest amount of losses the United States, ranked higher than 3 with more than 6 wins, have?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"losses\") FROM \"pool_a\" WHERE \"rank\"<3 AND \"team\"='united states' AND \"wins\">6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"rank\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"runs_allowed\" real,\n \"run_ratio\" real\n);\n\nQuestion: How many runs allowed did the team ranked 2 with more than 2 losses have?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"runs_allowed\") FROM \"pool_a\" WHERE \"rank\"=2 AND \"losses\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"rank\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"runs_allowed\" real,\n \"run_ratio\" real\n);\n\nQuestion: How many total wins did the team ranked lower than 1 with a run ratio less than 5.85 and more than 4 losses have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"wins\") FROM \"pool_a\" WHERE \"rank\">1 AND \"run_ratio\"<5.85 AND \"losses\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"rank\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"runs_allowed\" real,\n \"run_ratio\" real\n);\n\nQuestion: What is the highest run ratio Japan, which has less than 58 runs and 5 wins, have?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"run_ratio\") FROM \"pool_a\" WHERE \"runs_allowed\"<58 AND \"wins\"=5 AND \"team\"='japan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"rank\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"runs_allowed\" real,\n \"run_ratio\" real\n);\n\nQuestion: What is the average number of losses the team with less than 25 runs allowed and 5 wins have?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"losses\") FROM \"pool_a\" WHERE \"runs_allowed\"<25 AND \"wins\"=5;"
}
]
|
[
{
"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: Which date has tigers as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"opponent\"='tigers';"
}
]
|
[
{
"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 loss has october 1 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"date\"='october 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What year is listed that has points greater than 0 with a chassis labeled AGS JH22?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"complete_formula_one_results\" WHERE \"points\">0 AND \"chassis\"='ags jh22';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What is the total points listed that includes P listed Tyres after 1986?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"complete_formula_one_results\" WHERE \"tyres\"='p' AND \"year\">1986;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What point is the lowest for listings of chassis labeled AGS JH23 before 1988?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"complete_formula_one_results\" WHERE \"chassis\"='ags jh23' AND \"year\"<1988;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What is the total point for the year listed in 1988?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"complete_formula_one_results\" WHERE \"year\"=1988;"
}
]
|
[
{
"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: What was the attendance on August 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"game_log\" WHERE \"date\"='august 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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which opponent lost with pitcher Kinney (0-1)?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"loss\"='kinney (0-1)';"
}
]
|
[
{
"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: What was the attendance on August 23?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"game_log\" WHERE \"date\"='august 23';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_10\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the highest wins a tournament with 3 cuts and more than 4 events has?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"summary\" WHERE \"cuts_made\"=3 AND \"events\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_10\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the lowest number of events a tournament with more than 1 top-10 and more than 0 wins has?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"events\") FROM \"summary\" WHERE \"top_10\">1 AND \"wins\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: How many laps did the 6th placed in 1998 complete?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"24_hours_of_le_mans_results\" WHERE \"pos\"='6th' AND \"year\"=1998;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What position did the 5th place team after 1992 with over 346 laps finish in?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"24_hours_of_le_mans_results\" WHERE \"class_pos\"='5th' AND \"year\">1992 AND \"laps\">346;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What team was c1 class, had over 331 laps after 1990?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"24_hours_of_le_mans_results\" WHERE \"class\"='c1' AND \"laps\">331 AND \"year\">1990;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What class did eddie cheever raul boesel race in?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"24_hours_of_le_mans_results\" WHERE \"co_drivers\"='eddie cheever raul boesel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_over_top_10_players_per_season\" (\n \"player\" text,\n \"rank\" real,\n \"event\" text,\n \"surface\" text,\n \"score\" text\n);\n\nQuestion: What's the lowest rank of a player who played in 2012?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"wins_over_top_10_players_per_season\" WHERE \"event\"='2012';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_over_top_10_players_per_season\" (\n \"player\" text,\n \"rank\" real,\n \"event\" text,\n \"surface\" text,\n \"score\" text\n);\n\nQuestion: What player has the rank 2011?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"wins_over_top_10_players_per_season\" WHERE \"rank\"=2011;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_over_top_10_players_per_season\" (\n \"player\" text,\n \"rank\" real,\n \"event\" text,\n \"surface\" text,\n \"score\" text\n);\n\nQuestion: What was the score of the match played on hard with a person ranked 10?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"wins_over_top_10_players_per_season\" WHERE \"surface\"='hard' AND \"rank\"=10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: What females speak Romanian?"
},
{
"role": "assistant",
"content": "SELECT \"females\" FROM \"language\" WHERE \"language\"='romanian';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: What females have males of 1 234?"
},
{
"role": "assistant",
"content": "SELECT \"females\" FROM \"language\" WHERE \"males\"='1 234';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: What males speak Polish?"
},
{
"role": "assistant",
"content": "SELECT \"males\" FROM \"language\" WHERE \"language\"='polish';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: What is the number of males 977 948?"
},
{
"role": "assistant",
"content": "SELECT \"number\" FROM \"language\" WHERE \"males\"='977 948';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.