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 \"population\" (\n \"year\" real,\n \"population_total\" real,\n \"caboolture\" real,\n \"pine_rivers\" real,\n \"redcliffe\" real\n);\n\nQuestion: What is the average Caboolture population with a Redcliffe population greater than 27,327, a Pine Rivers population greater than 119,236, and a total population greater than 344,878 after 1971?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"caboolture\") FROM \"population\" WHERE \"redcliffe\">'27,327' AND \"pine_rivers\">'119,236' AND \"year\">1971 AND \"population_total\">'344,878';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: In which place is Emmet French?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"first_round\" WHERE \"player\"='emmet french';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1995\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: What is the result for Gold Coast when Melbourne and Adelaide are yes, but Perth is no?"
},
{
"role": "assistant",
"content": "SELECT \"gold_coast\" FROM \"1995\" WHERE \"melbourne\"='yes' AND \"perth\"='no' AND \"adelaide\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1995\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: What is the result for Melbourne when Adelaide, Sydney, and Perth are yes, and Gold Coast is no?"
},
{
"role": "assistant",
"content": "SELECT \"melbourne\" FROM \"1995\" WHERE \"adelaide\"='yes' AND \"sydney\"='yes' AND \"perth\"='yes' AND \"gold_coast\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1995\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: What is the result for Melbourne when Gold Coast, Perth, Auckland, and Sydney are no?"
},
{
"role": "assistant",
"content": "SELECT \"melbourne\" FROM \"1995\" WHERE \"gold_coast\"='no' AND \"perth\"='no' AND \"auckland\"='no' AND \"sydney\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1995\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: What is the result for Gold Coast when Adelaide and Perth are yes, but Auckland is no?"
},
{
"role": "assistant",
"content": "SELECT \"gold_coast\" FROM \"1995\" WHERE \"adelaide\"='yes' AND \"auckland\"='no' AND \"perth\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1995\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: What is the result for Gold Coast when Melbourne and Sydney are yes, while Auckland and Perth are no?"
},
{
"role": "assistant",
"content": "SELECT \"gold_coast\" FROM \"1995\" WHERE \"melbourne\"='yes' AND \"sydney\"='yes' AND \"auckland\"='no' AND \"perth\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1995\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: What is the result for Melbourne when Adelaide is no, and Auckland is yes?"
},
{
"role": "assistant",
"content": "SELECT \"melbourne\" FROM \"1995\" WHERE \"adelaide\"='no' AND \"auckland\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"stage\" text,\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"winner\" text,\n \"race_leader\" text\n);\n\nQuestion: Who won on 3 june?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"stage_results\" WHERE \"date\"='3 june';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"stage\" text,\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"winner\" text,\n \"race_leader\" text\n);\n\nQuestion: Which date has a Race Leader of hermann buse ( ger ), and a Stage of 5?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"stage_results\" WHERE \"race_leader\"='hermann buse ( ger )' AND \"stage\"='5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"stage\" text,\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"winner\" text,\n \"race_leader\" text\n);\n\nQuestion: Which race Leader has a Stage of 7?"
},
{
"role": "assistant",
"content": "SELECT \"race_leader\" FROM \"stage_results\" WHERE \"stage\"='7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"stage\" text,\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"winner\" text,\n \"race_leader\" text\n);\n\nQuestion: Which date has a Stage of 12?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"stage_results\" WHERE \"stage\"='12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"apra_awards\" (\n \"year\" real,\n \"country\" text,\n \"nominated_work\" text,\n \"award\" text,\n \"result\" text\n);\n\nQuestion: What was the result for song of the year award in 1994?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"apra_awards\" WHERE \"year\"=1994 AND \"award\"='song of the year';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"apra_awards\" (\n \"year\" real,\n \"country\" text,\n \"nominated_work\" text,\n \"award\" text,\n \"result\" text\n);\n\nQuestion: What was the result for work made by Neil Finn?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"apra_awards\" WHERE \"nominated_work\"='neil finn';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: what is the money for argentina?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"money\") FROM \"final_round\" WHERE \"country\"='argentina';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: what is the money for trevor immelman?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_round\" WHERE \"player\"='trevor immelman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: what is the place for ireland?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_round\" WHERE \"country\"='ireland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_fixtures_results\" (\n \"date\" text,\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"goals\" text,\n \"attendance\" real,\n \"report\" text\n);\n\nQuestion: What result was a date of 20/03/2008 with leeds as the opponent"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"2008_fixtures_results\" WHERE \"opponent\"='leeds' AND \"date\"='20/03/2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"independent_state_of_croatia\" (\n \"date\" text,\n \"score\" text,\n \"h_t\" text,\n \"venue\" text,\n \"competition\" text\n);\n\nQuestion: What was the HT for the game at Stadio Luigi Ferraris?"
},
{
"role": "assistant",
"content": "SELECT \"h_t\" FROM \"independent_state_of_croatia\" WHERE \"venue\"='stadio luigi ferraris';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"independent_state_of_croatia\" (\n \"date\" text,\n \"score\" text,\n \"h_t\" text,\n \"venue\" text,\n \"competition\" text\n);\n\nQuestion: What was the HT for the game at Zagreb, with a full-time score of 0-2?"
},
{
"role": "assistant",
"content": "SELECT \"h_t\" FROM \"independent_state_of_croatia\" WHERE \"venue\"='zagreb' AND \"score\"='0-2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"independent_state_of_croatia\" (\n \"date\" text,\n \"score\" text,\n \"h_t\" text,\n \"venue\" text,\n \"competition\" text\n);\n\nQuestion: What was the competition that was played in Zurich?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"independent_state_of_croatia\" WHERE \"venue\"='zurich';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rugby_russia_internationals_1994\" (\n \"first_game\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"percentage\" text\n);\n\nQuestion: When was the first game associated with over 4 losses?"
},
{
"role": "assistant",
"content": "SELECT \"first_game\" FROM \"rugby_russia_internationals_1994\" WHERE \"lost\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rugby_russia_internationals_1994\" (\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 games drawn associated with over 39 games played?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"drawn\") FROM \"rugby_russia_internationals_1994\" WHERE \"played\">39;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rugby_russia_internationals_1994\" (\n \"first_game\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"percentage\" text\n);\n\nQuestion: What is the highest number of losses when there are under 1 games played?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lost\") FROM \"rugby_russia_internationals_1994\" WHERE \"played\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: What location has more than 2 games with 2:56?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"summary\" WHERE \"game\">2 AND \"time\"='2:56';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: What location has October 10 as date?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"summary\" WHERE \"date\"='october 10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"community_council\" (\n \"parties_and_voter_communities\" text,\n \"pct_2006\" real,\n \"seats_2006\" real,\n \"pct_2001\" real,\n \"seats_2001\" real\n);\n\nQuestion: what is the seats 2006 total with %2001 of 39 and seats 2001 less than 12?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"seats_2006\") FROM \"community_council\" WHERE \"pct_2001\"=39 AND \"seats_2001\"<12;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"community_council\" (\n \"parties_and_voter_communities\" text,\n \"pct_2006\" real,\n \"seats_2006\" real,\n \"pct_2001\" real,\n \"seats_2001\" real\n);\n\nQuestion: what is the total number of seats 2006 that has parties and voter turnout in % and whose %2006 is greater than 51.5?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"seats_2006\") FROM \"community_council\" WHERE \"parties_and_voter_communities\"='voter turnout in %' AND \"pct_2006\">51.5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"community_council\" (\n \"parties_and_voter_communities\" text,\n \"pct_2006\" real,\n \"seats_2006\" real,\n \"pct_2001\" real,\n \"seats_2001\" real\n);\n\nQuestion: what is the total number of seats 2001 with seats 2006 more than 10 and voter communities of cdu?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"seats_2001\") FROM \"community_council\" WHERE \"parties_and_voter_communities\"='cdu' AND \"seats_2006\">10;"
}
]
|
[
{
"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 \"stadium\" text\n);\n\nQuestion: What was the loss of the game when the record was 3\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='3\u20132';"
}
]
|
[
{
"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 \"stadium\" text\n);\n\nQuestion: Who was the opponent at the game that had a loss of Shields (1\u20131)?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"loss\"='shields (1\u20131)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_individual_score\" (\n \"runs\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Who is the opponent for Andrew Symonds in the 2004 season?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"highest_individual_score\" WHERE \"player\"='andrew symonds' AND \"season\"='2004';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"75_million_to_79_million_records\" (\n \"artist\" text,\n \"country_of_origin\" text,\n \"period_active\" text,\n \"release_year_of_first_charted_record\" real,\n \"genre\" text,\n \"claimed_sales\" text\n);\n\nQuestion: Name th country of origin for journey"
},
{
"role": "assistant",
"content": "SELECT \"country_of_origin\" FROM \"75_million_to_79_million_records\" WHERE \"artist\"='journey';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"75_million_to_79_million_records\" (\n \"artist\" text,\n \"country_of_origin\" text,\n \"period_active\" text,\n \"release_year_of_first_charted_record\" real,\n \"genre\" text,\n \"claimed_sales\" text\n);\n\nQuestion: Name the period active for enya"
},
{
"role": "assistant",
"content": "SELECT \"period_active\" FROM \"75_million_to_79_million_records\" WHERE \"artist\"='enya';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"75_million_to_79_million_records\" (\n \"artist\" text,\n \"country_of_origin\" text,\n \"period_active\" text,\n \"release_year_of_first_charted_record\" real,\n \"genre\" text,\n \"claimed_sales\" text\n);\n\nQuestion: Name the genre for release-year of firsst charted less than 1980 and origin of jamaica"
},
{
"role": "assistant",
"content": "SELECT \"genre\" FROM \"75_million_to_79_million_records\" WHERE \"release_year_of_first_charted_record\"<1980 AND \"country_of_origin\"='jamaica';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: In which election was the constituency abolished?"
},
{
"role": "assistant",
"content": "SELECT \"election\" FROM \"members_of_parliament\" WHERE \"1st_member\"='constituency abolished';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What was the 1st party with a 1st member of John Willis Fleming?"
},
{
"role": "assistant",
"content": "SELECT \"1st_party\" FROM \"members_of_parliament\" WHERE \"1st_member\"='john willis fleming';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What is the 1st party when the 2nd party is constituency abolished?"
},
{
"role": "assistant",
"content": "SELECT \"1st_party\" FROM \"members_of_parliament\" WHERE \"2nd_party\"='constituency abolished';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: Who is the 2nd member during 1885 election?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_member\" FROM \"members_of_parliament\" WHERE \"election\"='1885';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What is the 1st party during the 1857 election?"
},
{
"role": "assistant",
"content": "SELECT \"1st_party\" FROM \"members_of_parliament\" WHERE \"election\"='1857';"
}
]
|
[
{
"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: Which language has the percentage of 2.54?"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"language\" WHERE \"percentage_pct\"='2.54';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: What is the number of females that has the Polish language?"
},
{
"role": "assistant",
"content": "SELECT \"females\" FROM \"language\" WHERE \"language\"='polish';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: What was the number of males that had the number females 62 331?"
},
{
"role": "assistant",
"content": "SELECT \"males\" FROM \"language\" WHERE \"females\"='62 331';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"season\" text,\n \"player\" text,\n \"school\" text,\n \"position\" text,\n \"class\" text\n);\n\nQuestion: Which position has a sophomore class?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"women\" WHERE \"class\"='sophomore';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"state\" text,\n \"preliminaries\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the lowest Preliminary score of a contestant that has an Evening Gown score of 8.472?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"preliminaries\") FROM \"final_competition_scores\" WHERE \"evening_gown\"=8.472;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text,\n \"report\" text\n);\n\nQuestion: Which Set 3 has a Set 1 of 25\u201320?"
},
{
"role": "assistant",
"content": "SELECT \"set_3\" FROM \"pool_a\" WHERE \"set_1\"='25\u201320';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text,\n \"report\" text\n);\n\nQuestion: Which Set 3 has a Time of 10:00, and a Set 2 of 25\u201319?"
},
{
"role": "assistant",
"content": "SELECT \"set_3\" FROM \"pool_a\" WHERE \"time\"='10:00' AND \"set_2\"='25\u201319';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text,\n \"report\" text\n);\n\nQuestion: Which Set 1 has a Set 3 of 16\u201325?"
},
{
"role": "assistant",
"content": "SELECT \"set_1\" FROM \"pool_a\" WHERE \"set_3\"='16\u201325';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text,\n \"report\" text\n);\n\nQuestion: Which Set 3 has a Score of 0\u20133, a Time of 18:30, and a Date of july 10?"
},
{
"role": "assistant",
"content": "SELECT \"set_3\" FROM \"pool_a\" WHERE \"score\"='0\u20133' AND \"time\"='18:30' AND \"date\"='july 10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text,\n \"report\" text\n);\n\nQuestion: Which score has a Set 2 of 17\u201325, and a Total of 48\u201375?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"pool_a\" WHERE \"set_2\"='17\u201325' AND \"total\"='48\u201375';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text,\n \"report\" text\n);\n\nQuestion: Which set 3 has a Time of 10:00, and a Score of 3\u20132, and a Total of 113\u2013102?"
},
{
"role": "assistant",
"content": "SELECT \"set_3\" FROM \"pool_a\" WHERE \"time\"='10:00' AND \"score\"='3\u20132' AND \"total\"='113\u2013102';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"year\" real,\n \"title\" text,\n \"role\" text,\n \"cast\" text,\n \"live_studio\" text,\n \"label\" text\n);\n\nQuestion: Is it live or studio before 1983?"
},
{
"role": "assistant",
"content": "SELECT \"live_studio\" FROM \"discography\" WHERE \"year\"<1983;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text,\n \"1st_prize\" real\n);\n\nQuestion: What is the total number of 1st prize ($) that has a United States country with a score lower than 271 and in a year after 1964 with a winner of Bobby Mitchell?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"1st_prize\") FROM \"winners\" WHERE \"country\"='united states' AND \"score\"<271 AND \"year\">1964 AND \"winner\"='bobby mitchell';"
}
]
|
[
{
"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: What is the round for marcus howard?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"indianapolis_colts_draft_history\" WHERE \"name\"='marcus howard';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the highest laps with a 30 finish?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"indy_500_results\" WHERE \"finish\"='30';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the rank of the 150.163 qual?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"indy_500_results\" WHERE \"qual\"='150.163';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the lowest laps with a 142.744 qual?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"indy_500_results\" WHERE \"qual\"='142.744';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What year had less than 160 laps and a rank of 26?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"indy_500_results\" WHERE \"laps\"<160 AND \"rank\"='26';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"numbers_from_0_5\" (\n \"value\" real,\n \"khmer\" real,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"other\" text\n);\n\nQuestion: for the other of soun, what's the khmer?"
},
{
"role": "assistant",
"content": "SELECT \"khmer\" FROM \"numbers_from_0_5\" WHERE \"other\"='soun';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"numbers_from_0_5\" (\n \"value\" real,\n \"khmer\" real,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"other\" text\n);\n\nQuestion: for the other of mouy, what's the khmer?"
},
{
"role": "assistant",
"content": "SELECT \"khmer\" FROM \"numbers_from_0_5\" WHERE \"other\"='mouy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"country\" text,\n \"film_title_used_in_nomination\" text,\n \"language\" text,\n \"original_title\" text,\n \"director\" text\n);\n\nQuestion: What is the language of the film directed by Hans Kristensen?"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"references\" WHERE \"director\"='hans kristensen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"country\" text,\n \"film_title_used_in_nomination\" text,\n \"language\" text,\n \"original_title\" text,\n \"director\" text\n);\n\nQuestion: What is the original title of the film for which Dersu Uzala was nominated?"
},
{
"role": "assistant",
"content": "SELECT \"original_title\" FROM \"references\" WHERE \"film_title_used_in_nomination\"='dersu uzala';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"country\" text,\n \"film_title_used_in_nomination\" text,\n \"language\" text,\n \"original_title\" text,\n \"director\" text\n);\n\nQuestion: What is Argentina's language?"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"references\" WHERE \"country\"='argentina';"
}
]
|
[
{
"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 \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What chassis did Jolly Club Spa used after 1985?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\">1985 AND \"entrant\"='jolly club spa';"
}
]
|
[
{
"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 \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What engine was paired with Minardi m187?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='minardi m187';"
}
]
|
[
{
"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 \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What is the highest points with g Tyres and Minardi m187?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"tyres\"='g' AND \"chassis\"='minardi m187';"
}
]
|
[
{
"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 \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What Chassis has g Tyres before 1987?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"tyres\"='g' AND \"year\"<1987;"
}
]
|
[
{
"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 \"tyres\" text,\n \"points\" real\n);\n\nQuestion: How many years were g Tyres and Minardi m187 used?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"tyres\"='g' AND \"chassis\"='minardi m187';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_american_le_mans_series_results\" (\n \"year\" real,\n \"entrant\" text,\n \"class\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: What engine what in the vehicle when adt champion racing ranked in 1st place?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"complete_american_le_mans_series_results\" WHERE \"rank\"='1st' AND \"entrant\"='adt champion racing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_american_le_mans_series_results\" (\n \"year\" real,\n \"entrant\" text,\n \"class\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: What Chassis ranked 18th?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_american_le_mans_series_results\" WHERE \"rank\"='18th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_american_le_mans_series_results\" (\n \"year\" real,\n \"entrant\" text,\n \"class\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: What was the class when adt champion racing ranked 1st with an audi r8 chassis, and less than 206 points?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"complete_american_le_mans_series_results\" WHERE \"points\"<206 AND \"chassis\"='audi r8' AND \"entrant\"='adt champion racing' AND \"rank\"='1st';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nickelodeon_movies\" (\n \"year\" real,\n \"category\" text,\n \"film\" text,\n \"winner_nominee_s\" text,\n \"result\" text\n);\n\nQuestion: Who were the winner and nominees in 2001?"
},
{
"role": "assistant",
"content": "SELECT \"winner_nominee_s\" FROM \"nickelodeon_movies\" WHERE \"year\"=2001;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nickelodeon_movies\" (\n \"year\" real,\n \"category\" text,\n \"film\" text,\n \"winner_nominee_s\" text,\n \"result\" text\n);\n\nQuestion: Who is nominated for the film Rugrats Go Wild?"
},
{
"role": "assistant",
"content": "SELECT \"winner_nominee_s\" FROM \"nickelodeon_movies\" WHERE \"result\"='nominated' AND \"film\"='rugrats go wild';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" text,\n \"club\" text,\n \"country\" text,\n \"competition\" text,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: How many goals did he score with under 26 appearances for werder bremen?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals\") FROM \"statistics\" WHERE \"apps\"<26 AND \"club\"='werder bremen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" text,\n \"club\" text,\n \"country\" text,\n \"competition\" text,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: How many goals did he have in the bundesliga with under 7 appearances?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals\") FROM \"statistics\" WHERE \"competition\"='bundesliga' AND \"apps\"<7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" text,\n \"club\" text,\n \"country\" text,\n \"competition\" text,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What season did he have 7 appearances?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"statistics\" WHERE \"apps\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par for the score 73-71=144?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"score\"='73-71=144';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What area did Julius Boros play at?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='julius boros';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What country has a score of 74-70=144"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"score\"='74-70=144';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_partnerships\" (\n \"auckland\" text,\n \"canterbury\" text,\n \"central_districts\" text,\n \"otago\" text,\n \"wellington\" text\n);\n\nQuestion: Which of the Canterbury has a Central District of 276* M.D. Crowe & P.S. Briasco V (C) 1986/87?"
},
{
"role": "assistant",
"content": "SELECT \"canterbury\" FROM \"highest_partnerships\" WHERE \"central_districts\"='276* m.d. crowe & p.s. briasco v (c) 1986/87';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_partnerships\" (\n \"auckland\" text,\n \"canterbury\" text,\n \"central_districts\" text,\n \"otago\" text,\n \"wellington\" text\n);\n\nQuestion: What is Auckland thats got Otago of 184 R.C. Blunt & W. Hawksworth V (C) 1931/32?"
},
{
"role": "assistant",
"content": "SELECT \"auckland\" FROM \"highest_partnerships\" WHERE \"otago\"='184 r.c. blunt & w. hawksworth v (c) 1931/32';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text\n);\n\nQuestion: What tournament was after 2009?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"achievements\" WHERE \"year\">2009;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text\n);\n\nQuestion: What event was held in Chihuahua, Mexico?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"achievements\" WHERE \"venue\"='chihuahua, mexico';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"with_population_above_1_million\" (\n \"rank\" real,\n \"country_region\" text,\n \"population\" real,\n \"area_km_2\" real,\n \"density_pop_per_km_2\" real\n);\n\nQuestion: Can you tell me the total number of Rank that has the Area (km 2) smaller than 2,040, and the Population smaller than 1,234,596?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"with_population_above_1_million\" WHERE \"area_km_2\"<'2,040' AND \"population\"<'1,234,596';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"with_population_above_1_million\" (\n \"rank\" real,\n \"country_region\" text,\n \"population\" real,\n \"area_km_2\" real,\n \"density_pop_per_km_2\" real\n);\n\nQuestion: Can you tell me the sun of Population that has the Country/Region of hong kong, and the Rank smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"population\") FROM \"with_population_above_1_million\" WHERE \"country_region\"='hong kong' AND \"rank\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager_1\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: Who is the manager with the Hewlett-Packard shirt sponsor?"
},
{
"role": "assistant",
"content": "SELECT \"manager_1\" FROM \"personnel_and_kits\" WHERE \"shirt_sponsor\"='hewlett-packard';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager_1\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: Who is the captain of the team that has a kit manufacturer of Fox Leisure?"
},
{
"role": "assistant",
"content": "SELECT \"captain\" FROM \"personnel_and_kits\" WHERE \"kit_manufacturer\"='fox leisure';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager_1\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: One2one is the shirt sponsor for the captain of what team?"
},
{
"role": "assistant",
"content": "SELECT \"captain\" FROM \"personnel_and_kits\" WHERE \"shirt_sponsor\"='one2one';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager_1\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: What company is the kit manufacturer that Gareth Southgate belongs to?"
},
{
"role": "assistant",
"content": "SELECT \"kit_manufacturer\" FROM \"personnel_and_kits\" WHERE \"captain\"='gareth southgate';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_honours\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text\n);\n\nQuestion: for the tournament of world amateur championship what was the result in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"awards_and_honours\" WHERE \"year\"=2010 AND \"tournament\"='world amateur championship';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"junior_under_20_men\" (\n \"rank\" real,\n \"fastest_time_s\" real,\n \"wind_m_s\" real,\n \"athlete\" text,\n \"country\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: Which location had a race that took place on 22 July 2011 and has a rank greater than 8?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"junior_under_20_men\" WHERE \"rank\">8 AND \"date\"='22 july 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"percussion_scholastic_open_class\" (\n \"ensemble\" text,\n \"gold_medals\" real,\n \"silver_medals\" real,\n \"bronze_medals\" real,\n \"total_medals\" real\n);\n\nQuestion: How many gold medals for the school with 2 total medals and under 0 bronzes?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gold_medals\") FROM \"percussion_scholastic_open_class\" WHERE \"total_medals\"=2 AND \"bronze_medals\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"percussion_scholastic_open_class\" (\n \"ensemble\" text,\n \"gold_medals\" real,\n \"silver_medals\" real,\n \"bronze_medals\" real,\n \"total_medals\" real\n);\n\nQuestion: How many gold medals for bellbrook HS with less than 1 silver?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gold_medals\") FROM \"percussion_scholastic_open_class\" WHERE \"ensemble\"='bellbrook hs' AND \"silver_medals\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"percussion_scholastic_open_class\" (\n \"ensemble\" text,\n \"gold_medals\" real,\n \"silver_medals\" real,\n \"bronze_medals\" real,\n \"total_medals\" real\n);\n\nQuestion: How many silvers for a school with 2 golds and over 2 total?"
},
{
"role": "assistant",
"content": "SELECT \"silver_medals\" FROM \"percussion_scholastic_open_class\" WHERE \"gold_medals\"=2 AND \"total_medals\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"percussion_scholastic_open_class\" (\n \"ensemble\" text,\n \"gold_medals\" real,\n \"silver_medals\" real,\n \"bronze_medals\" real,\n \"total_medals\" real\n);\n\nQuestion: How many gold medals for the school with less than 1 total?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gold_medals\") FROM \"percussion_scholastic_open_class\" WHERE \"total_medals\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"formula_one_world_championship_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" text\n);\n\nQuestion: What is the entrant for 1967?"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"formula_one_world_championship_results\" WHERE \"year\"=1967;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"formula_one_world_championship_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" text\n);\n\nQuestion: What ist he entrant later than 1963 with an eagle MK1 chassis?"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"formula_one_world_championship_results\" WHERE \"year\">1963 AND \"chassis\"='eagle mk1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"formula_one_world_championship_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" text\n);\n\nQuestion: What is the entrant that has 0 points?"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"formula_one_world_championship_results\" WHERE \"pts\"='0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"formula_one_world_championship_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" text\n);\n\nQuestion: What is the earliest year with 16 points?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"formula_one_world_championship_results\" WHERE \"pts\"='16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"biggest_wins\" (\n \"margin\" real,\n \"score\" text,\n \"opponent\" text,\n \"venue\" text,\n \"year\" real\n);\n\nQuestion: Name the venue for margin less than 66 and opponent of north queensland cowboys"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"biggest_wins\" WHERE \"margin\"<66 AND \"opponent\"='north queensland cowboys';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.