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 \"grands_prix\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"125cc_winner\" text,\n \"250cc_winner\" text,\n \"moto_gp_winner\" text,\n \"report\" text\n);\n\nQuestion: Name the circuit for round 18" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"grands_prix\" WHERE \"round\"=18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"125cc_winner\" text,\n \"250cc_winner\" text,\n \"moto_gp_winner\" text,\n \"report\" text\n);\n\nQuestion: Name the grand prix for casey stoner and circuit of losail" }, { "role": "assistant", "content": "SELECT \"grand_prix\" FROM \"grands_prix\" WHERE \"moto_gp_winner\"='casey stoner' AND \"circuit\"='losail';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Where was the game held that was played on 2002-03-07?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='2002-03-07';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total gold from New zealand and a rank less than 14?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"nation\"='new zealand' AND \"rank\"<14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average of the silver that has less than 0 gold" }, { "role": "assistant", "content": "SELECT AVG(\"silver\") FROM \"medal_table\" WHERE \"gold\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which nation has 0 gold, 0 silver and 2 total?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"gold\"=0 AND \"silver\"=0 AND \"total\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total gold in Norway with more than 1 bronze?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"nation\"='norway' AND \"bronze\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total bronze from Puerto Rico with a total of less than 1?" }, { "role": "assistant", "content": "SELECT SUM(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='puerto rico' AND \"total\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_opponents\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"1st_leg\" text\n);\n\nQuestion: Which season has the Celtic club?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"past_opponents\" WHERE \"club\"='celtic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_agriculture_ministers\" (\n \"order\" text,\n \"minister\" text,\n \"party\" text,\n \"prime_minister\" text,\n \"title\" text,\n \"term_start\" text,\n \"term_end\" text,\n \"term_in_office\" text\n);\n\nQuestion: What was Parker Moloney's party affiliation when he was the Minister for Markets?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"list_of_agriculture_ministers\" WHERE \"minister\"='parker moloney' AND \"title\"='minister for markets';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_agriculture_ministers\" (\n \"order\" text,\n \"minister\" text,\n \"party\" text,\n \"prime_minister\" text,\n \"title\" text,\n \"term_start\" text,\n \"term_end\" text,\n \"term_in_office\" text\n);\n\nQuestion: What was the starting date for the Minister for agriculture, fisheries and forestry that is in order number 25??" }, { "role": "assistant", "content": "SELECT \"term_start\" FROM \"list_of_agriculture_ministers\" WHERE \"title\"='minister for agriculture, fisheries and forestry' AND \"order\"='25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score in the venue of Seoul that resulted in 8-0?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"venue\"='seoul' AND \"result\"='8-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What date had a result of 8-0?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"international_goals\" WHERE \"result\"='8-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: On July 26, 1977, what competition played at the venue of Kuala Lumpur, resulted in 4-0?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"venue\"='kuala lumpur' AND \"result\"='4-0' AND \"date\"='july 26, 1977';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What venue were the 1986 Asian games resulting in 2-0 played at?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"competition\"='1986 asian games' AND \"result\"='2-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"premier_division\" (\n \"player\" text,\n \"club\" text,\n \"league_goals\" real,\n \"cup_goals\" real,\n \"total\" real\n);\n\nQuestion: How many total League goals does Player John O'Flynn have?" }, { "role": "assistant", "content": "SELECT SUM(\"league_goals\") FROM \"premier_division\" WHERE \"player\"='john o''flynn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the earliest year that had a Lotus 49B chassis?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='lotus 49b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Name the least lane for lenny krayzelburg" }, { "role": "assistant", "content": "SELECT MIN(\"lane\") FROM \"semifinal_2\" WHERE \"name\"='lenny krayzelburg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Round of 9 involved what name?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"indianapolis_colts_draft_history\" WHERE \"round\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_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 of calvin o'neal, and a Round smaller than 6 had what number total overall?" }, { "role": "assistant", "content": "SELECT COUNT(\"overall\") FROM \"indianapolis_colts_draft_history\" WHERE \"name\"='calvin o''neal' AND \"round\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"work\" text,\n \"cole\" text,\n \"dylan\" text\n);\n\nQuestion: Name the work for years before 2007 that won blockbuster entertainment awards" }, { "role": "assistant", "content": "SELECT \"work\" FROM \"awards_and_nominations\" WHERE \"year\"<2007 AND \"award\"='blockbuster entertainment awards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"work\" text,\n \"cole\" text,\n \"dylan\" text\n);\n\nQuestion: Name the Cole for years before 2009 where Dylan was nominated for big daddy at mtv movie awards" }, { "role": "assistant", "content": "SELECT \"cole\" FROM \"awards_and_nominations\" WHERE \"year\"<2009 AND \"dylan\"='nominated' AND \"work\"='big daddy' AND \"award\"='mtv movie awards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Position of running back involves which college?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"indianapolis_colts_draft_history\" WHERE \"position\"='running back';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Round larger than 2, and a Position of guard involves what college?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"indianapolis_colts_draft_history\" WHERE \"round\">2 AND \"position\"='guard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Pick # smaller than 46, and a Round of 5, and a Position of defensive tackle involves which college?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"indianapolis_colts_draft_history\" WHERE \"pick_num\"<46 AND \"round\"=5 AND \"position\"='defensive tackle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: What is the percentage who speak Russian?" }, { "role": "assistant", "content": "SELECT \"percentage_pct\" FROM \"language\" WHERE \"language\"='russian';" } ]
[ { "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: How many speak german?" }, { "role": "assistant", "content": "SELECT \"number\" FROM \"language\" WHERE \"language\"='german';" } ]
[ { "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 percentage where males equal 99?" }, { "role": "assistant", "content": "SELECT \"percentage_pct\" FROM \"language\" WHERE \"males\"='99';" } ]
[ { "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: How many women speak German?" }, { "role": "assistant", "content": "SELECT \"females\" FROM \"language\" WHERE \"language\"='german';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winners\" text,\n \"2nd_place\" text,\n \"3rd_place\" text,\n \"4th_place\" text\n);\n\nQuestion: Name the 3rd place with winners of weymouth wildcats and 4th place of boston barracudas" }, { "role": "assistant", "content": "SELECT \"3rd_place\" FROM \"winners\" WHERE \"winners\"='weymouth wildcats' AND \"4th_place\"='boston barracudas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winners\" text,\n \"2nd_place\" text,\n \"3rd_place\" text,\n \"4th_place\" text\n);\n\nQuestion: Name the 3rd place for 4th place of boston barracudas and 2nd place of oxford cheetahs" }, { "role": "assistant", "content": "SELECT \"3rd_place\" FROM \"winners\" WHERE \"4th_place\"='boston barracudas' AND \"2nd_place\"='oxford cheetahs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winners\" text,\n \"2nd_place\" text,\n \"3rd_place\" text,\n \"4th_place\" text\n);\n\nQuestion: Name the winners when 3rd place is weymouth wildcats" }, { "role": "assistant", "content": "SELECT \"winners\" FROM \"winners\" WHERE \"3rd_place\"='weymouth wildcats';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yellow_cards\" (\n \"name\" text,\n \"championship\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest number of league cups associated with 0 FA cups?" }, { "role": "assistant", "content": "SELECT MIN(\"league_cup\") FROM \"yellow_cards\" WHERE \"fa_cup\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yellow_cards\" (\n \"name\" text,\n \"championship\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: How many FA cups for the player with under 5 champs, 0 league cups, and over 3 total?" }, { "role": "assistant", "content": "SELECT SUM(\"fa_cup\") FROM \"yellow_cards\" WHERE \"championship\"<5 AND \"league_cup\"=0 AND \"total\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yellow_cards\" (\n \"name\" text,\n \"championship\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: How many league cups associated with under 10 championships and a total of under 3?" }, { "role": "assistant", "content": "SELECT SUM(\"league_cup\") FROM \"yellow_cards\" WHERE \"championship\"<10 AND \"total\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_stage\" (\n \"date\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"group_position\" text\n);\n\nQuestion: Result F\u2013A of 2\u20130 had what group position?" }, { "role": "assistant", "content": "SELECT \"group_position\" FROM \"group_stage\" WHERE \"result_f_a\"='2\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_stage\" (\n \"date\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"group_position\" text\n);\n\nQuestion: Result F\u2013A of 5\u20130 had what group position?" }, { "role": "assistant", "content": "SELECT \"group_position\" FROM \"group_stage\" WHERE \"result_f_a\"='5\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_stage\" (\n \"date\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"group_position\" text\n);\n\nQuestion: Group position of 1st, and a Result F\u2013A of 2\u20130 has what average attendance?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"group_stage\" WHERE \"group_position\"='1st' AND \"result_f_a\"='2\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_stage\" (\n \"date\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"group_position\" text\n);\n\nQuestion: Result F\u2013A of 5\u20130 had what date?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"group_stage\" WHERE \"result_f_a\"='5\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_stage\" (\n \"date\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"group_position\" text\n);\n\nQuestion: Date of 1 october 2003 had what attendance?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"group_stage\" WHERE \"date\"='1 october 2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_55_31_24\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"score\" text\n);\n\nQuestion: what score is it with tathiana garbin as partner?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"doubles_55_31_24\" WHERE \"partner\"='tathiana garbin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_55_31_24\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"score\" text\n);\n\nQuestion: what date was giulia casoni the partner?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"doubles_55_31_24\" WHERE \"partner\"='giulia casoni';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: for country of spain and iata of ibz, what's the city?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"list\" WHERE \"country\"='spain' AND \"iata\"='ibz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: for fiumicino airport what is the icao?" }, { "role": "assistant", "content": "SELECT \"icao\" FROM \"list\" WHERE \"airport\"='fiumicino airport';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: for milan and the iata of lin what is the airport?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"list\" WHERE \"city\"='milan' AND \"iata\"='lin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: what's the iata for the icao of eheh?" }, { "role": "assistant", "content": "SELECT \"iata\" FROM \"list\" WHERE \"icao\"='eheh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: which aiport is in the united kingdom and has iata of lcy?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"list\" WHERE \"country\"='united kingdom' AND \"iata\"='lcy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"player\" text,\n \"games\" text,\n \"tries\" text,\n \"goals\" text,\n \"f_goals\" text,\n \"points\" text\n);\n\nQuestion: Name the F. Goals for games of 22 22 and points of 012 12" }, { "role": "assistant", "content": "SELECT \"f_goals\" FROM \"players\" WHERE \"games\"='22 22' AND \"points\"='012 12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"player\" text,\n \"games\" text,\n \"tries\" text,\n \"goals\" text,\n \"f_goals\" text,\n \"points\" text\n);\n\nQuestion: Name the points for games of 16 16" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"players\" WHERE \"games\"='16 16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"player\" text,\n \"games\" text,\n \"tries\" text,\n \"goals\" text,\n \"f_goals\" text,\n \"points\" text\n);\n\nQuestion: Name the tries that has a points of 008 8 and games of 27 27" }, { "role": "assistant", "content": "SELECT \"tries\" FROM \"players\" WHERE \"points\"='008 8' AND \"games\"='27 27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"player\" text,\n \"games\" text,\n \"tries\" text,\n \"goals\" text,\n \"f_goals\" text,\n \"points\" text\n);\n\nQuestion: Name the F. Goals with tries of 0 0 and games of 05 5" }, { "role": "assistant", "content": "SELECT \"f_goals\" FROM \"players\" WHERE \"tries\"='0 0' AND \"games\"='05 5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"player\" text,\n \"games\" text,\n \"tries\" text,\n \"goals\" text,\n \"f_goals\" text,\n \"points\" text\n);\n\nQuestion: Name the player with tries of 02 2 and points of 008 8" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"players\" WHERE \"tries\"='02 2' AND \"points\"='008 8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"napier_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real\n);\n\nQuestion: Which area has a Name of william colenso college?" }, { "role": "assistant", "content": "SELECT \"area\" FROM \"napier_city\" WHERE \"name\"='william colenso college';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"napier_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real\n);\n\nQuestion: Which authority has a Name of tamatea high school?" }, { "role": "assistant", "content": "SELECT \"authority\" FROM \"napier_city\" WHERE \"name\"='tamatea high school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"napier_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real\n);\n\nQuestion: Which gender has a Decile of 8, an Area of taradale, and Years of 1\u201313?" }, { "role": "assistant", "content": "SELECT \"gender\" FROM \"napier_city\" WHERE \"decile\"=8 AND \"area\"='taradale' AND \"years\"='1\u201313';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"napier_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real\n);\n\nQuestion: Which Decile has Years of \u2013, and a Gender of coed?" }, { "role": "assistant", "content": "SELECT \"decile\" FROM \"napier_city\" WHERE \"years\"='\u2013' AND \"gender\"='coed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: Name the total number of division for apps more than 5 for greece" }, { "role": "assistant", "content": "SELECT COUNT(\"division\") FROM \"career_statistics\" WHERE \"apps\">5 AND \"country\"='greece';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: Name the average apps for smederevo" }, { "role": "assistant", "content": "SELECT AVG(\"apps\") FROM \"career_statistics\" WHERE \"team\"='smederevo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What model engine has a lotus 16 chassis?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='lotus 16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many points after 1960 for fred tuck cars?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='fred tuck cars' AND \"year\">1960;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"race_name\" text,\n \"dist_miles\" text,\n \"course\" text,\n \"prize\" text,\n \"jockey\" text,\n \"odds\" text,\n \"runners\" text\n);\n\nQuestion: What is the distance for the unnamed race with 3 runners at Newcastle?" }, { "role": "assistant", "content": "SELECT \"dist_miles\" FROM \"summary\" WHERE \"race_name\"='unnamed race' AND \"runners\"='3' AND \"course\"='newcastle';" } ]
[ { "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: Name the score when the record was 18-25" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='18-25';" } ]
[ { "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: Name the loss for the angels opponent" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"opponent\"='angels';" } ]
[ { "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: Name the total number of people that went when the record was 16-22" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"game_log\" WHERE \"record\"='16-22';" } ]
[ { "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: Name the score for the mariners opponent on may 10" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='mariners' AND \"date\"='may 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_8_5_3\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the Outcome for the Partner of J\u00fcrgen Melzer and the Date of January 7, 2012?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_8_5_3\" WHERE \"partner\"='j\u00fcrgen melzer' AND \"date\"='january 7, 2012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_8_5_3\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the Surface for the Partner of J\u00fcrgen Melzer, and a Date of July 16, 2011?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_8_5_3\" WHERE \"partner\"='j\u00fcrgen melzer' AND \"date\"='july 16, 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_8_5_3\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What's the Outcome for the Date of July 16, 2011?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_8_5_3\" WHERE \"date\"='july 16, 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_8_5_3\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What's the Outcome for the Partner of J\u00fcrgen Melzer on the Date of February 7, 2010?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_8_5_3\" WHERE \"partner\"='j\u00fcrgen melzer' AND \"date\"='february 7, 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cultural_events\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the nation with rank more than 9" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"cultural_events\" WHERE \"rank\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cultural_events\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the least bronze for silver being less than 0" }, { "role": "assistant", "content": "SELECT MIN(\"bronze\") FROM \"cultural_events\" WHERE \"silver\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cultural_events\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the sum of rank for bronze less than 1 and gold of 1 with total less than 1" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"cultural_events\" WHERE \"bronze\"<1 AND \"gold\"=1 AND \"total\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cultural_events\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the sum of rank for silver less than 0" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"cultural_events\" WHERE \"silver\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cultural_events\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the least rank when silver is less than 1 and bronze is less than 1 with total more than 1" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"cultural_events\" WHERE \"silver\"<1 AND \"total\">1 AND \"bronze\"<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 \"series\" text\n);\n\nQuestion: What was the date of the game in which the series was 1-4?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"series\"='1-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_3_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Score that has a Home of montreal canadiens on april 11?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"montreal_canadiens_3_chicago_black_hawks\" WHERE \"home\"='montreal canadiens' AND \"date\"='april 11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_3_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Record on april 13?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"montreal_canadiens_3_chicago_black_hawks\" WHERE \"date\"='april 13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_3_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: When is Home of chicago black hawks has a Record of 0\u20131?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"montreal_canadiens_3_chicago_black_hawks\" WHERE \"home\"='chicago black hawks' AND \"record\"='0\u20131';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_3_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Date that chicago black hawks has a Record of 2\u20132?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"montreal_canadiens_3_chicago_black_hawks\" WHERE \"visitor\"='chicago black hawks' AND \"record\"='2\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_3_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which Record has a Score of 0\u20132?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"montreal_canadiens_3_chicago_black_hawks\" WHERE \"score\"='0\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_3_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who is the visitor on April 5?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"montreal_canadiens_3_chicago_black_hawks\" WHERE \"date\"='april 5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"year\" text,\n \"team\" text,\n \"tackles\" text,\n \"solo\" real,\n \"sacks\" real,\n \"int_yds\" real\n);\n\nQuestion: What is the Team, when the Year is 2011?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"career_statistics\" WHERE \"year\"='2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"year\" text,\n \"team\" text,\n \"tackles\" text,\n \"solo\" real,\n \"sacks\" real,\n \"int_yds\" real\n);\n\nQuestion: What is the value for INT YDS, when the Team is New Orleans Saints, and when the value for Sacks is greater than 0, and when the vale for Solo is 71?" }, { "role": "assistant", "content": "SELECT \"int_yds\" FROM \"career_statistics\" WHERE \"team\"='new orleans saints' AND \"sacks\">0 AND \"solo\"=71;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"year\" text,\n \"team\" text,\n \"tackles\" text,\n \"solo\" real,\n \"sacks\" real,\n \"int_yds\" real\n);\n\nQuestion: What is the value for lowest Sacks, when the Team is New Orleans Saints, and when the value for Tackles is 132?" }, { "role": "assistant", "content": "SELECT MIN(\"sacks\") FROM \"career_statistics\" WHERE \"team\"='new orleans saints' AND \"tackles\"='132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"year\" text,\n \"team\" text,\n \"tackles\" text,\n \"solo\" real,\n \"sacks\" real,\n \"int_yds\" real\n);\n\nQuestion: What is the value for Tackles, when the value for Solo is greater than 67, when the value for Sacks is less than 2, and when the value for INT YDS is greater than 1?" }, { "role": "assistant", "content": "SELECT \"tackles\" FROM \"career_statistics\" WHERE \"solo\">67 AND \"sacks\"<2 AND \"int_yds\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"year\" text,\n \"team\" text,\n \"tackles\" text,\n \"solo\" real,\n \"sacks\" real,\n \"int_yds\" real\n);\n\nQuestion: What is the total value for Solo, when the value of Sacks is 2, and when the Team is New York Jets?" }, { "role": "assistant", "content": "SELECT COUNT(\"solo\") FROM \"career_statistics\" WHERE \"sacks\"=2 AND \"team\"='new york jets';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"itf_circuit_singles_finals_7_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the outcome of the match with a score of 6\u20134, 6\u20131?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"itf_circuit_singles_finals_7_6\" WHERE \"score\"='6\u20134, 6\u20131';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"itf_circuit_singles_finals_7_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What date was the match on a clay surface against Andrea Hlav\u00e1\u010dkov\u00e1?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"itf_circuit_singles_finals_7_6\" WHERE \"surface\"='clay' AND \"opponent\"='andrea hlav\u00e1\u010dkov\u00e1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"itf_circuit_singles_finals_7_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the name of the opponent at the Herceg Novi tournament?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"itf_circuit_singles_finals_7_6\" WHERE \"tournament\"='herceg novi';" } ]
[ { "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 was the loss of the game when the record was 50-32?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='50-32';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Who was the opponent with a result of l 14\u20136?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"season_schedule\" WHERE \"result\"='l 14\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the sum of all attendance on November 17, 1961?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"season_schedule\" WHERE \"date\"='november 17, 1961';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the smallest attendance in week 5?" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"season_schedule\" WHERE \"week\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_liga_acb_table\" (\n \"team\" text,\n \"season\" real,\n \"played\" real,\n \"lost\" real,\n \"1_st\" text,\n \"2_nd\" text,\n \"3_rd\" text,\n \"4_th\" text,\n \"debut\" text,\n \"since_last_app\" text,\n \"best\" real\n);\n\nQuestion: Name the 3rd for season less than 4 and lost of 61" }, { "role": "assistant", "content": "SELECT \"3_rd\" FROM \"all_time_liga_acb_table\" WHERE \"season\"<4 AND \"lost\"=61;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rugby_belgium_internationals_1986\" (\n \"first_game\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"percentage\" text\n);\n\nQuestion: What is the sum of matches played that has a year of first match before 2000, fewer than 21 lost, and 0 drawn?" }, { "role": "assistant", "content": "SELECT SUM(\"played\") FROM \"rugby_belgium_internationals_1986\" WHERE \"first_game\"<2000 AND \"lost\"<21 AND \"drawn\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rugby_belgium_internationals_1986\" (\n \"first_game\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"percentage\" text\n);\n\nQuestion: What is the lowest number of matches played that has more than 0 draws, a percentage of 12.50%, and fewer than 3 losses?" }, { "role": "assistant", "content": "SELECT MIN(\"played\") FROM \"rugby_belgium_internationals_1986\" WHERE \"drawn\">0 AND \"percentage\"='12.50%' AND \"lost\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"numbers_from_30_90\" (\n \"value\" real,\n \"khmer\" real,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"other\" text\n);\n\nQuestion: What's the total value of \u179f\u17b6\u1798\u179f\u17b7\u1794?" }, { "role": "assistant", "content": "SELECT SUM(\"value\") FROM \"numbers_from_30_90\" WHERE \"word_form\"='\u179f\u17b6\u1798\u179f\u17b7\u1794';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"numbers_from_30_90\" (\n \"value\" real,\n \"khmer\" real,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"other\" text\n);\n\nQuestion: What can you say is the word from of sam sep?" }, { "role": "assistant", "content": "SELECT \"word_form\" FROM \"numbers_from_30_90\" WHERE \"other\"='sam sep';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"numbers_from_30_90\" (\n \"value\" real,\n \"khmer\" real,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"other\" text\n);\n\nQuestion: What is smallest Khmer valued less than 90 have a kau sip ALA-LC?" }, { "role": "assistant", "content": "SELECT MIN(\"khmer\") FROM \"numbers_from_30_90\" WHERE \"ala_lc\"='kau sip' AND \"value\"<90;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"numbers_from_30_90\" (\n \"value\" real,\n \"khmer\" real,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"other\" text\n);\n\nQuestion: How much is the total value of kau s\u0115b UNGEGN ?" }, { "role": "assistant", "content": "SELECT SUM(\"value\") FROM \"numbers_from_30_90\" WHERE \"ungegn\"='kau s\u0115b';" } ]