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 \"numbers_from_100_10_000_000\" (\n \"value\" text,\n \"khmer\" real,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"other\" text,\n \"notes\" text\n);\n\nQuestion: What number value has the Other transliteration of muoy roy?"
},
{
"role": "assistant",
"content": "SELECT \"value\" FROM \"numbers_from_100_10_000_000\" WHERE \"other\"='muoy roy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"numbers_from_100_10_000_000\" (\n \"value\" text,\n \"khmer\" real,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"other\" text,\n \"notes\" text\n);\n\nQuestion: What is the word form for the ALA-LC transliteration of muay b\u00e2n?"
},
{
"role": "assistant",
"content": "SELECT \"word_form\" FROM \"numbers_from_100_10_000_000\" WHERE \"ala_lc\"='muay b\u00e2n';"
}
]
|
[
{
"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: Name the loss when the record is 76-81"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='76-81';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which average bronze had a silver greater than 2 and a gold larger than 7?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"silver\">2 AND \"gold\">7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: When the total was 11 and silver was greater than 4 what was the highest gold?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"total\"=11 AND \"silver\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronze had a total less than 4 and gold bigger than 1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"medal_table\" WHERE \"total\"<4 AND \"gold\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canada_west_football_conference_hardy_tr\" (\n \"institution\" text,\n \"team\" text,\n \"city\" text,\n \"province\" text,\n \"first_season\" real,\n \"head_coach\" text,\n \"enrollment\" real,\n \"endowment\" text,\n \"football_stadium\" text,\n \"capacity\" real\n);\n\nQuestion: What is the enrollment associated with a capacity greater then 35,650?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"enrollment\") FROM \"canada_west_football_conference_hardy_tr\" WHERE \"capacity\">'35,650';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mc_gwire_s_rookie_record_49_home_runs\" (\n \"home_run\" real,\n \"game\" real,\n \"date\" text,\n \"inning\" text,\n \"location\" text,\n \"opposing_pitcher\" text,\n \"team\" text\n);\n\nQuestion: Which Date has an Opposing Pitcher of jack morris, and an Inning of 4th?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"mc_gwire_s_rookie_record_49_home_runs\" WHERE \"opposing_pitcher\"='jack morris' AND \"inning\"='4th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mc_gwire_s_rookie_record_49_home_runs\" (\n \"home_run\" real,\n \"game\" real,\n \"date\" text,\n \"inning\" text,\n \"location\" text,\n \"opposing_pitcher\" text,\n \"team\" text\n);\n\nQuestion: Which average Home Run has a Game of 89?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"home_run\") FROM \"mc_gwire_s_rookie_record_49_home_runs\" WHERE \"game\"=89;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mc_gwire_s_rookie_record_49_home_runs\" (\n \"home_run\" real,\n \"game\" real,\n \"date\" text,\n \"inning\" text,\n \"location\" text,\n \"opposing_pitcher\" text,\n \"team\" text\n);\n\nQuestion: Which team has a Home Run of 27?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"mc_gwire_s_rookie_record_49_home_runs\" WHERE \"home_run\"=27;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" text,\n \"location\" text,\n \"lineup\" text,\n \"assist_pass\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Assist/pass has a Score of 1-0, and a Goal of 5?"
},
{
"role": "assistant",
"content": "SELECT \"assist_pass\" FROM \"international_goals\" WHERE \"score\"='1-0' AND \"goal\"='5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" text,\n \"location\" text,\n \"lineup\" text,\n \"assist_pass\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Assist/pass has a Result of 6-2?"
},
{
"role": "assistant",
"content": "SELECT \"assist_pass\" FROM \"international_goals\" WHERE \"result\"='6-2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" text,\n \"location\" text,\n \"lineup\" text,\n \"assist_pass\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Assist/pass has a Goal of 5?"
},
{
"role": "assistant",
"content": "SELECT \"assist_pass\" FROM \"international_goals\" WHERE \"goal\"='5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" text,\n \"location\" text,\n \"lineup\" text,\n \"assist_pass\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which location has a Goal of 2?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"international_goals\" WHERE \"goal\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" text,\n \"location\" text,\n \"lineup\" text,\n \"assist_pass\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which lineup has a Location of usa virginia beach?"
},
{
"role": "assistant",
"content": "SELECT \"lineup\" FROM \"international_goals\" WHERE \"location\"='usa virginia beach';"
}
]
|
[
{
"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: Which date had a score of 5-1?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"score\"='5-1';"
}
]
|
[
{
"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 result had a score of 2-1?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" 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 \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which date had a score of 3-2?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"score\"='3-2';"
}
]
|
[
{
"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 \"pts\" real\n);\n\nQuestion: What is the oldest model Porsche v12 that has points less than or equal to 0."
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='porsche v12' AND \"pts\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1992_winter_olympics\" (\n \"date_of_issue\" text,\n \"theme\" text,\n \"denomination\" text,\n \"printer\" text,\n \"quantity\" text,\n \"design\" text,\n \"perforation\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: Which design uses the theme alpine skiing?"
},
{
"role": "assistant",
"content": "SELECT \"design\" FROM \"1992_winter_olympics\" WHERE \"theme\"='alpine skiing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1992_winter_olympics\" (\n \"date_of_issue\" text,\n \"theme\" text,\n \"denomination\" text,\n \"printer\" text,\n \"quantity\" text,\n \"design\" text,\n \"perforation\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: When did the Theme of bobsleigh release?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_issue\" FROM \"1992_winter_olympics\" WHERE \"theme\"='bobsleigh';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" real\n);\n\nQuestion: What is the highest pts after 1952 with connaught type a?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pts\") FROM \"complete_world_championship_formula_one_\" WHERE \"year\">1952 AND \"chassis\"='connaught type a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Who did the Chiefs play in Week 8?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which week was on October 11, 1970 and an attendance larger than 41,379."
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"attendance\">'41,379' AND \"date\"='october 11, 1970';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_runner_up_16\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_final\" text,\n \"score\" text\n);\n\nQuestion: On what surface was the 26 August 2001 tournament played?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_runner_up_16\" WHERE \"date\"='26 august 2001';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"project_overview\" (\n \"project\" text,\n \"year\" text,\n \"location\" text,\n \"capacity\" real,\n \"suites\" text,\n \"architect\" text,\n \"cost\" text\n);\n\nQuestion: What is the average capacity for 150 suites?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"capacity\") FROM \"project_overview\" WHERE \"suites\"='150';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"project_overview\" (\n \"project\" text,\n \"year\" text,\n \"location\" text,\n \"capacity\" real,\n \"suites\" text,\n \"architect\" text,\n \"cost\" text\n);\n\nQuestion: Where is the Eren Talu bidding project located?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"project_overview\" WHERE \"project\"='eren talu bidding project';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"project_overview\" (\n \"project\" text,\n \"year\" text,\n \"location\" text,\n \"capacity\" real,\n \"suites\" text,\n \"architect\" text,\n \"cost\" text\n);\n\nQuestion: Which location has a capacity larger than 52,000?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"project_overview\" WHERE \"capacity\">'52,000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"project_overview\" (\n \"project\" text,\n \"year\" text,\n \"location\" text,\n \"capacity\" real,\n \"suites\" text,\n \"architect\" text,\n \"cost\" text\n);\n\nQuestion: What is the highest capacity in Aslantepe in 2002-2005?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"capacity\") FROM \"project_overview\" WHERE \"location\"='aslantepe' AND \"year\"='2002-2005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"numbers_from_100_10_000_000\" (\n \"value\" text,\n \"khmer\" real,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"notes\" text\n);\n\nQuestion: What is the UNGEGN, when the Khmer is greater than \u17e1\u17e0\u17e0\u17e0\u17e0\u17e0\u17e0\u17e0\u17e0?"
},
{
"role": "assistant",
"content": "SELECT \"ungegn\" FROM \"numbers_from_100_10_000_000\" WHERE \"khmer\">'\u17e1\u17e0\u17e0\u17e0\u17e0\u17e0\u17e0\u17e0\u17e0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"numbers_from_100_10_000_000\" (\n \"value\" text,\n \"khmer\" real,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"notes\" text\n);\n\nQuestion: What is the Value, when the Notes are literally \"one hundred million\"?"
},
{
"role": "assistant",
"content": "SELECT \"value\" FROM \"numbers_from_100_10_000_000\" WHERE \"notes\"='literally \\\"one hundred million\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"numbers_from_100_10_000_000\" (\n \"value\" text,\n \"khmer\" real,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"notes\" text\n);\n\nQuestion: What is the Word Form, when the Notes are literally \"one hundred thousand\"?"
},
{
"role": "assistant",
"content": "SELECT \"word_form\" FROM \"numbers_from_100_10_000_000\" WHERE \"notes\"='literally \\\"one hundred thousand\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"numbers_from_100_10_000_000\" (\n \"value\" text,\n \"khmer\" real,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"notes\" text\n);\n\nQuestion: What is the Word Form, when the Khmer is greater than \u17e1\u17e0\u17e0\u17e0\u17e0\u17e0, and the UNGEGN is (mu\u014fy) d\u00e1b le\u0103n?"
},
{
"role": "assistant",
"content": "SELECT \"word_form\" FROM \"numbers_from_100_10_000_000\" WHERE \"khmer\">'\u17e1\u17e0\u17e0\u17e0\u17e0\u17e0' AND \"ungegn\"='(mu\u014fy) d\u00e1b le\u0103n';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"numbers_from_100_10_000_000\" (\n \"value\" text,\n \"khmer\" real,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"notes\" text\n);\n\nQuestion: What is the total amount of Khmer, when the Notes are literally \"one hundred thousand\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"khmer\") FROM \"numbers_from_100_10_000_000\" WHERE \"notes\"='literally \\\"one hundred thousand\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"numbers_from_100_10_000_000\" (\n \"value\" text,\n \"khmer\" real,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"notes\" text\n);\n\nQuestion: What is the UNGEGN, when the Value is 10 000?"
},
{
"role": "assistant",
"content": "SELECT \"ungegn\" FROM \"numbers_from_100_10_000_000\" WHERE \"value\"='10 000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Name the 2008 for wta premier mandatory tournaments of 2007"
},
{
"role": "assistant",
"content": "SELECT \"2008\" FROM \"singles_performance_timeline\" WHERE \"2007\"='wta premier mandatory tournaments';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Name the tournament of beijing"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='beijing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Name the 2009 for 2007 of 2r and tournament of wimbledon"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"2007\"='2r' AND \"tournament\"='wimbledon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Name the 2011 for 2010 of olympic games"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"singles_performance_timeline\" WHERE \"2010\"='olympic games';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Name the 2011 for tokyo tournament"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='tokyo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Name the 2009 for wta premier mandatory tournaments"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='wta premier mandatory tournaments';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won Mixed Doubles the year that Marija Ulitina won the Women's Singles?"
},
{
"role": "assistant",
"content": "SELECT \"mixed_doubles\" FROM \"previous_winners\" WHERE \"women_s_singles\"='marija ulitina';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won Men's singles the year that Hilde Themel won Women's singles?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_singles\" FROM \"previous_winners\" WHERE \"women_s_singles\"='hilde themel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won Mixed doubles the year that Pablo Abian won Men's singles?"
},
{
"role": "assistant",
"content": "SELECT \"mixed_doubles\" FROM \"previous_winners\" WHERE \"men_s_singles\"='pablo abian';"
}
]
|
[
{
"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: Which year did Ray Crawford the Kurtis Kraft 500g chassis?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='kurtis kraft 500g';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"averages\" (\n \"city\" text,\n \"january_avg_high_f\" text,\n \"january_avg_low_f\" text,\n \"july_avg_high_f\" real,\n \"july_avg_low_f\" real\n);\n\nQuestion: What city had a july high below 84, and a january low of 34.3?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"averages\" WHERE \"july_avg_high_f\"<84 AND \"january_avg_low_f\"='34.3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"averages\" (\n \"city\" text,\n \"january_avg_high_f\" text,\n \"january_avg_low_f\" text,\n \"july_avg_high_f\" real,\n \"july_avg_low_f\" real\n);\n\nQuestion: What is the july average low associated with a january average high of 30.4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"july_avg_low_f\") FROM \"averages\" WHERE \"january_avg_high_f\"='30.4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cfwh_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: Which class has an identifier of CBUA-FM?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"s_rebroadcaster_of_cfwh_fm\" WHERE \"identifier\"='cbua-fm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cfwh_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What is the city of license for the frequency 90.1 FM?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"s_rebroadcaster_of_cfwh_fm\" WHERE \"frequency\"='90.1 fm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cfwh_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What is the power when the city of license is Beaver Creek?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"s_rebroadcaster_of_cfwh_fm\" WHERE \"city_of_license\"='beaver creek';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cfwh_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What is the city of license when the class is LP and the identifier is CBDK?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"s_rebroadcaster_of_cfwh_fm\" WHERE \"class\"='lp' AND \"identifier\"='cbdk';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cfwh_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What is the class when the frequency is 560 AM?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"s_rebroadcaster_of_cfwh_fm\" WHERE \"frequency\"='560 am';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"forbes_global_2000\" (\n \"rank\" real,\n \"company\" text,\n \"revenues_us_billion\" real,\n \"profit_us_billion\" real,\n \"assets_us_billion\" real,\n \"market_value_us_billion\" real\n);\n\nQuestion: What are the smallest assets with a Company of piraeus bank, and a Revenue (US$ billion) smaller than 3.9?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"assets_us_billion\") FROM \"forbes_global_2000\" WHERE \"company\"='piraeus bank' AND \"revenues_us_billion\"<3.9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"forbes_global_2000\" (\n \"rank\" real,\n \"company\" text,\n \"revenues_us_billion\" real,\n \"profit_us_billion\" real,\n \"assets_us_billion\" real,\n \"market_value_us_billion\" real\n);\n\nQuestion: What is the average market value with a revenue greater than 6.2, a Company of national bank of greece, and a Rank smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"market_value_us_billion\") FROM \"forbes_global_2000\" WHERE \"revenues_us_billion\">6.2 AND \"company\"='national bank of greece' AND \"rank\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"forbes_global_2000\" (\n \"rank\" real,\n \"company\" text,\n \"revenues_us_billion\" real,\n \"profit_us_billion\" real,\n \"assets_us_billion\" real,\n \"market_value_us_billion\" real\n);\n\nQuestion: Which company has a market value greater than 1, Assets (US$ billion) smaller than 10.7, a Rank smaller than 10, and revenue (US$ billion) of 9.3?"
},
{
"role": "assistant",
"content": "SELECT \"company\" FROM \"forbes_global_2000\" WHERE \"market_value_us_billion\">1 AND \"assets_us_billion\"<10.7 AND \"rank\"<10 AND \"revenues_us_billion\"=9.3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"west_indies_in_england\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Tell me the venue with result of eng by 6 wkts"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"west_indies_in_england\" WHERE \"result\"='eng by 6 wkts';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"west_indies_in_england\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Name the Home captain for venue of the oval"
},
{
"role": "assistant",
"content": "SELECT \"home_captain\" FROM \"west_indies_in_england\" WHERE \"venue\"='the oval';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"west_indies_in_england\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Name the away captain with result of wi by 9 wkts"
},
{
"role": "assistant",
"content": "SELECT \"away_captain\" FROM \"west_indies_in_england\" WHERE \"result\"='wi by 9 wkts';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"west_indies_in_england\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Name the venue for eng by 6 wkts"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"west_indies_in_england\" WHERE \"result\"='eng by 6 wkts';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"billy_elliot\" (\n \"status\" text,\n \"name\" text,\n \"first_performance\" text,\n \"last_performance\" text,\n \"style\" text\n);\n\nQuestion: What is the date of the last performance when the style is street dance and the name is George Maguire?"
},
{
"role": "assistant",
"content": "SELECT \"last_performance\" FROM \"billy_elliot\" WHERE \"style\"='street dance' AND \"name\"='george maguire';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"billy_elliot\" (\n \"status\" text,\n \"name\" text,\n \"first_performance\" text,\n \"last_performance\" text,\n \"style\" text\n);\n\nQuestion: What is the date of the last performance for Liam Mower?"
},
{
"role": "assistant",
"content": "SELECT \"last_performance\" FROM \"billy_elliot\" WHERE \"name\"='liam mower';"
}
]
|
[
{
"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 did the Weslake v12 get in 1966?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='weslake v12' AND \"year\"<1966;"
}
]
|
[
{
"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 was the name of the team in 1965 driving the Ferrari 158?"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\"=1965 AND \"chassis\"='ferrari 158';"
}
]
|
[
{
"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 Chassis had a Weslake v12 in it?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='weslake v12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary_table\" (\n \"interferon_beta_1a\" text,\n \"betaseron_beta_1b\" text,\n \"copaxone\" text,\n \"mitoxantrone\" text,\n \"tysabri\" text,\n \"fingolimod_gylenya\" text,\n \"teriflunomide\" text\n);\n\nQuestion: Name the copaxone with mitoxantrone of no and betaseron (beta-1b) of no"
},
{
"role": "assistant",
"content": "SELECT \"copaxone\" FROM \"summary_table\" WHERE \"mitoxantrone\"='no' AND \"betaseron_beta_1b\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"player\" text,\n \"test_career\" text,\n \"tests\" real,\n \"catches\" real,\n \"stumpings\" real,\n \"total_dismissals\" real\n);\n\nQuestion: Who has a career that has test larger than 41, catches over 33, and a total dismissals rate of 147?"
},
{
"role": "assistant",
"content": "SELECT \"test_career\" FROM \"see_also\" WHERE \"tests\">41 AND \"catches\">33 AND \"total_dismissals\"=147;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"player\" text,\n \"test_career\" text,\n \"tests\" real,\n \"catches\" real,\n \"stumpings\" real,\n \"total_dismissals\" real\n);\n\nQuestion: What is the average dismissals of 83 test and catches less than 33?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total_dismissals\") FROM \"see_also\" WHERE \"tests\"=83 AND \"catches\"<33;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Which winner has a points classification of Tony Rominger at stage 17?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"classification_leadership_by_stage\" WHERE \"points_classification\"='tony rominger' AND \"stage\"='17';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Which stage has a mountains classification of Mariano Piccoli, a points classification of Mario Cipollini and was won by Laudelino Cubino?"
},
{
"role": "assistant",
"content": "SELECT \"stage\" FROM \"classification_leadership_by_stage\" WHERE \"mountains_classification\"='mariano piccoli' AND \"points_classification\"='mario cipollini' AND \"winner\"='laudelino cubino';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Who won stage 16?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"classification_leadership_by_stage\" WHERE \"stage\"='16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Which mountains classification has a general classification of Tony Rominger and was won by Maurizio Fondriest?"
},
{
"role": "assistant",
"content": "SELECT \"mountains_classification\" FROM \"classification_leadership_by_stage\" WHERE \"general_classification\"='tony rominger' AND \"winner\"='maurizio fondriest';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: What is the general classification at stage 18 that has a points classification of Tony Rominger?"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"classification_leadership_by_stage\" WHERE \"points_classification\"='tony rominger' AND \"stage\"='18';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Which stage has a mountains classification of Mariano Piccoli and was won by Giuseppe Citterio?"
},
{
"role": "assistant",
"content": "SELECT \"stage\" FROM \"classification_leadership_by_stage\" WHERE \"mountains_classification\"='mariano piccoli' AND \"winner\"='giuseppe citterio';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: What is the year First elected when the Member is John Armitage?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"see_also\" WHERE \"member\"='john armitage';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: Who is the Electorate, when the year for First elected is 1974, and when the Party is Country?"
},
{
"role": "assistant",
"content": "SELECT \"electorate\" FROM \"see_also\" WHERE \"first_elected\"='1974' AND \"party\"='country';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: Who is the Member when the Party is Alp, and when the Electorate is Grey?"
},
{
"role": "assistant",
"content": "SELECT \"member\" FROM \"see_also\" WHERE \"party\"='alp' AND \"electorate\"='grey';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: What is the State, when the year First elected is 1966, and when the Member is Alan Jarman?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"see_also\" WHERE \"first_elected\"='1966' AND \"member\"='alan jarman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: What is the year First Elected, when the Party is Alp, and when the State is qld?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"see_also\" WHERE \"party\"='alp' AND \"state\"='qld';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: What is the year First elected, when the State is vic, and when the Member is Hon Don Chipp?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"see_also\" WHERE \"state\"='vic' AND \"member\"='hon don chipp';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_professional_career_summar\" (\n \"year\" text,\n \"starts\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"earnings\" real,\n \"money_list_rank\" real\n);\n\nQuestion: Which total number of starts has more than 2 wins and a money list rank greater than 1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"starts\") FROM \"european_tour_professional_career_summar\" WHERE \"wins\">2 AND \"money_list_rank\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_professional_career_summar\" (\n \"year\" text,\n \"starts\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"earnings\" real,\n \"money_list_rank\" real\n);\n\nQuestion: What is the sum of number of wins that have earnings of more than (\u20ac)2,864,342 and money list rank of 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wins\") FROM \"european_tour_professional_career_summar\" WHERE \"earnings\">'2,864,342' AND \"money_list_rank\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_professional_career_summar\" (\n \"year\" text,\n \"starts\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"earnings\" real,\n \"money_list_rank\" real\n);\n\nQuestion: What is the sum of Top 10 performances that have more than 2 wins and is higher than number 16 in the Top 25?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"top_10\") FROM \"european_tour_professional_career_summar\" WHERE \"wins\">2 AND \"top_25\"<16;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_professional_career_summar\" (\n \"year\" text,\n \"starts\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"earnings\" real,\n \"money_list_rank\" real\n);\n\nQuestion: What is the greatest money list ranking that has a Top 25 higher than 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"money_list_rank\") FROM \"european_tour_professional_career_summar\" WHERE \"top_25\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"northern_section\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What Away team had an Attendance of 3,395?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"northern_section\" WHERE \"attendance\"='3,395';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"northern_section\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What Home team had an Attendance of 2,776?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"northern_section\" WHERE \"attendance\"='2,776';"
}
]
|
[
{
"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: Which engine has more than 1 point after 1981?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"complete_formula_one_results\" WHERE \"points\">1 AND \"year\">1981;"
}
]
|
[
{
"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: Which engine did Marlboro Team Alfa Romeo used with a chassis of alfa romeo 179?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"complete_formula_one_results\" WHERE \"entrant\"='marlboro team alfa romeo' AND \"chassis\"='alfa romeo 179';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personal_bests\" (\n \"surface\" text,\n \"event\" text,\n \"time_h_m_s\" text,\n \"date\" text,\n \"place\" text\n);\n\nQuestion: When has a surface of road and an event of half marathon?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"personal_bests\" WHERE \"surface\"='road' AND \"event\"='half marathon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personal_bests\" (\n \"surface\" text,\n \"event\" text,\n \"time_h_m_s\" text,\n \"date\" text,\n \"place\" text\n);\n\nQuestion: Which Surface has a Place of lappeenranta?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"personal_bests\" WHERE \"place\"='lappeenranta';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personal_bests\" (\n \"surface\" text,\n \"event\" text,\n \"time_h_m_s\" text,\n \"date\" text,\n \"place\" text\n);\n\nQuestion: What is the Date that has 1:01:42?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"personal_bests\" WHERE \"time_h_m_s\"='1:01:42';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personal_bests\" (\n \"surface\" text,\n \"event\" text,\n \"time_h_m_s\" text,\n \"date\" text,\n \"place\" text\n);\n\nQuestion: What is the Time ( h : m : s ) on 13 october 2010"
},
{
"role": "assistant",
"content": "SELECT \"time_h_m_s\" FROM \"personal_bests\" WHERE \"date\"='13 october 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personal_bests\" (\n \"surface\" text,\n \"event\" text,\n \"time_h_m_s\" text,\n \"date\" text,\n \"place\" text\n);\n\nQuestion: What is the Place with Time 7:44.15?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"personal_bests\" WHERE \"time_h_m_s\"='7:44.15';"
}
]
|
[
{
"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 \"class\" text,\n \"tyres\" text,\n \"team\" text,\n \"co_drivers\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Which Class Pos have Laps smaller than 304, and a Year after 2001?"
},
{
"role": "assistant",
"content": "SELECT \"class_pos\" FROM \"24_hours_of_le_mans_results\" WHERE \"laps\"<304 AND \"year\">2001;"
}
]
|
[
{
"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 \"class\" text,\n \"tyres\" text,\n \"team\" text,\n \"co_drivers\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What is the lowest Laps that has a Year after 2002 with Alexander Frei Bruno Besson?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"24_hours_of_le_mans_results\" WHERE \"year\">2002 AND \"co_drivers\"='alexander frei bruno besson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"crowd\" text,\n \"record\" text\n);\n\nQuestion: How many people attended the score of w 7-6?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"regular_season\" WHERE \"score\"='w 7-6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"crowd\" text,\n \"record\" text\n);\n\nQuestion: Who lost that has a score of w 4-3?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"regular_season\" WHERE \"score\"='w 4-3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"crowd\" text,\n \"record\" text\n);\n\nQuestion: Loss of schrom happened on what date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season\" WHERE \"loss\"='schrom';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"crowd\" text,\n \"record\" text\n);\n\nQuestion: Opponent of @mil, and a Record of 45-16 happened on what date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season\" WHERE \"opponent\"='@mil' AND \"record\"='45-16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"crowd\" text,\n \"record\" text\n);\n\nQuestion: Loss of willis has what record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"loss\"='willis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"crowd\" text,\n \"record\" text\n);\n\nQuestion: Loss of wilcox, and a Date of jun 18 had what opponent?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"loss\"='wilcox' AND \"date\"='jun 18';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.