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 \"yearly_results\" (\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"third_place\" text,\n \"fourth_place\" text,\n \"jack_tompkins_trophy_mvp\" text\n);\n\nQuestion: What is the Fourth place with a Year that is 1966?"
},
{
"role": "assistant",
"content": "SELECT \"fourth_place\" FROM \"yearly_results\" WHERE \"year\"=1966;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"yearly_results\" (\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"third_place\" text,\n \"fourth_place\" text,\n \"jack_tompkins_trophy_mvp\" text\n);\n\nQuestion: What is the Champion with a Year that is 2008?"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"yearly_results\" WHERE \"year\"=2008;"
}
] |
[
{
"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\" text\n);\n\nQuestion: Who was the opponent for the game played on September 19, 1994?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='september 19, 1994';"
}
] |
[
{
"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\" text\n);\n\nQuestion: In which week was attendance at 50,814?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"attendance\"='50,814';"
}
] |
[
{
"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\" text\n);\n\nQuestion: What date after Week 6 was a Bye?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\">6 AND \"attendance\"='bye';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammar\" (\n \"m_cha\" text,\n \"indicative\" text,\n \"imperative\" text,\n \"subjunctive\" text,\n \"inverse_subjunctive\" text\n);\n\nQuestion: What subjunctive also has an inverse subjunctive of m\u00e5chadns?"
},
{
"role": "assistant",
"content": "SELECT \"subjunctive\" FROM \"grammar\" WHERE \"inverse_subjunctive\"='m\u00e5chadns';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammar\" (\n \"m_cha\" text,\n \"indicative\" text,\n \"imperative\" text,\n \"subjunctive\" text,\n \"inverse_subjunctive\" text\n);\n\nQuestion: What imperative has m\u00e5cha as 3.sg?"
},
{
"role": "assistant",
"content": "SELECT \"imperative\" FROM \"grammar\" WHERE \"m_cha\"='3.sg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammar\" (\n \"m_cha\" text,\n \"indicative\" text,\n \"imperative\" text,\n \"subjunctive\" text,\n \"inverse_subjunctive\" text\n);\n\nQuestion: The indicative of si m\u00e5chan has what as the inverse subjunctive?"
},
{
"role": "assistant",
"content": "SELECT \"inverse_subjunctive\" FROM \"grammar\" WHERE \"indicative\"='si m\u00e5chan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammar\" (\n \"m_cha\" text,\n \"indicative\" text,\n \"imperative\" text,\n \"subjunctive\" text,\n \"inverse_subjunctive\" text\n);\n\nQuestion: What inverse subjunctive has \u2014 as the imperative and a subjunctive of se m\u00e5chadn?"
},
{
"role": "assistant",
"content": "SELECT \"inverse_subjunctive\" FROM \"grammar\" WHERE \"imperative\"='\u2014' AND \"subjunctive\"='se m\u00e5chadn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammar\" (\n \"m_cha\" text,\n \"indicative\" text,\n \"imperative\" text,\n \"subjunctive\" text,\n \"inverse_subjunctive\" text\n);\n\nQuestion: With a subjunctive of du m\u00e5chast what is the imperative?"
},
{
"role": "assistant",
"content": "SELECT \"imperative\" FROM \"grammar\" WHERE \"subjunctive\"='du m\u00e5chast';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammar\" (\n \"m_cha\" text,\n \"indicative\" text,\n \"imperative\" text,\n \"subjunctive\" text,\n \"inverse_subjunctive\" text\n);\n\nQuestion: What subjunctive has the indicative of se m\u00e5chan(t)?"
},
{
"role": "assistant",
"content": "SELECT \"subjunctive\" FROM \"grammar\" WHERE \"indicative\"='se m\u00e5chan(t)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"result_summary\" (\n \"opposition\" text,\n \"span\" text,\n \"lost\" real,\n \"tied\" real,\n \"win_pct\" real\n);\n\nQuestion: What is the Win % in the Span of 2011\u20132013 with a Lost of less than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"win_pct\") FROM \"result_summary\" WHERE \"span\"='2011\u20132013' AND \"lost\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"result_summary\" (\n \"opposition\" text,\n \"span\" text,\n \"lost\" real,\n \"tied\" real,\n \"win_pct\" real\n);\n\nQuestion: How many games were Tied during the Span of 2011\u20132013 with a less than 80% Win %?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"tied\") FROM \"result_summary\" WHERE \"span\"='2011\u20132013' AND \"win_pct\"<80;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_s_20_busiest_airports_by_passenge\" (\n \"rank\" real,\n \"location\" text,\n \"total_passengers\" real,\n \"annual_change\" text,\n \"capacity\" real,\n \"capacity_in_use\" text\n);\n\nQuestion: What is the highest Capacity that has 13.14% Annual change and Total Passengers larger than 15,499,462?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"capacity\") FROM \"brazil_s_20_busiest_airports_by_passenge\" WHERE \"annual_change\"='13.14%' AND \"total_passengers\">'15,499,462';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_s_20_busiest_airports_by_passenge\" (\n \"rank\" real,\n \"location\" text,\n \"total_passengers\" real,\n \"annual_change\" text,\n \"capacity\" real,\n \"capacity_in_use\" text\n);\n\nQuestion: Which Annual change has a Capacity in use of 66.21%?"
},
{
"role": "assistant",
"content": "SELECT \"annual_change\" FROM \"brazil_s_20_busiest_airports_by_passenge\" WHERE \"capacity_in_use\"='66.21%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_s_20_busiest_airports_by_passenge\" (\n \"rank\" real,\n \"location\" text,\n \"total_passengers\" real,\n \"annual_change\" text,\n \"capacity\" real,\n \"capacity_in_use\" text\n);\n\nQuestion: Which Rank that has a Total Passengers of 15,499,462?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"brazil_s_20_busiest_airports_by_passenge\" WHERE \"total_passengers\"='15,499,462';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_s_20_busiest_airports_by_passenge\" (\n \"rank\" real,\n \"location\" text,\n \"total_passengers\" real,\n \"annual_change\" text,\n \"capacity\" real,\n \"capacity_in_use\" text\n);\n\nQuestion: How many Capacity has a Annual change of 53.4% and Total Passengers smaller than 7,822,848?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"capacity\") FROM \"brazil_s_20_busiest_airports_by_passenge\" WHERE \"annual_change\"='53.4%' AND \"total_passengers\"<'7,822,848';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_sheets\" (\n \"ecosystem\" text,\n \"date_of_issue\" text,\n \"place_of_issue\" text,\n \"no_stamps_in_sheet\" real,\n \"face_value\" text,\n \"printer\" text\n);\n\nQuestion: On what date were sheets issued in Tallahassee, Florida?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_issue\" FROM \"the_sheets\" WHERE \"place_of_issue\"='tallahassee, florida';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_sheets\" (\n \"ecosystem\" text,\n \"date_of_issue\" text,\n \"place_of_issue\" text,\n \"no_stamps_in_sheet\" real,\n \"face_value\" text,\n \"printer\" text\n);\n\nQuestion: Which printer issued sheets on October 5, 2006?"
},
{
"role": "assistant",
"content": "SELECT \"printer\" FROM \"the_sheets\" WHERE \"date_of_issue\"='october 5, 2006';"
}
] |
[
{
"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 \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the least amount of silver medals won by Total with more than 1 bronze and more than 18 total medals won?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"bronze\">1 AND \"nation\"='total' AND \"total\">18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many positions have points against less than 28, americano-sp as the team, with a played greater than 8?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"position\") FROM \"campeonato_paulista\" WHERE \"against\"<28 AND \"team\"='americano-sp' AND \"played\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many losses have points against less than 15?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lost\") FROM \"campeonato_paulista\" WHERE \"against\"<15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What average played has an against less than 15?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"played\") FROM \"campeonato_paulista\" WHERE \"against\"<15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many losses have a played greater than 8, ypiranga-sp as the team, with a position greater than 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lost\") FROM \"campeonato_paulista\" WHERE \"played\">8 AND \"team\"='ypiranga-sp' AND \"position\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What lost has a position greater than 2, a drawn greater than 0, with an against greater than 15?"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"campeonato_paulista\" WHERE \"position\">2 AND \"drawn\">0 AND \"against\">15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ethnicities_by_region\" (\n \"state\" text,\n \"white_pct\" real,\n \"brown_pct\" real,\n \"black_pct\" real,\n \"asian_or_amerindian_pct\" real\n);\n\nQuestion: What is the sum of White (%), when Black (%) is less than 5,8, and when Asian or Amerindian (%) is less than 0,2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"white_pct\") FROM \"ethnicities_by_region\" WHERE \"black_pct\"<'5,8' AND \"asian_or_amerindian_pct\"<'0,2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ethnicities_by_region\" (\n \"state\" text,\n \"white_pct\" real,\n \"brown_pct\" real,\n \"black_pct\" real,\n \"asian_or_amerindian_pct\" real\n);\n\nQuestion: What is the sum of Asian or Amerindian (%), when State is Sergipe, and when Brown (%) is greater than 61,3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"asian_or_amerindian_pct\") FROM \"ethnicities_by_region\" WHERE \"state\"='sergipe' AND \"brown_pct\">'61,3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ethnicities_by_region\" (\n \"state\" text,\n \"white_pct\" real,\n \"brown_pct\" real,\n \"black_pct\" real,\n \"asian_or_amerindian_pct\" real\n);\n\nQuestion: What is the total number of White (%), when Brown (%) is less than 54,6, when Asian or Amerindian (%) is greater than 1,3, and when Black (%) is less than 5,3?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"white_pct\") FROM \"ethnicities_by_region\" WHERE \"brown_pct\"<'54,6' AND \"asian_or_amerindian_pct\">'1,3' AND \"black_pct\"<'5,3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ethnicities_by_region\" (\n \"state\" text,\n \"white_pct\" real,\n \"brown_pct\" real,\n \"black_pct\" real,\n \"asian_or_amerindian_pct\" real\n);\n\nQuestion: What is the sum of Asian or Amerindian (%), when Black (%) is 9,7, and when White (%) is greater than 45,7?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"asian_or_amerindian_pct\") FROM \"ethnicities_by_region\" WHERE \"black_pct\"='9,7' AND \"white_pct\">'45,7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_league\" (\n \"team\" text,\n \"match\" real,\n \"points\" real,\n \"draw\" real,\n \"lost\" real\n);\n\nQuestion: How many points were there when there more than 6 losses and less than 14 matches?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"first_league\" WHERE \"lost\">6 AND \"match\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_league\" (\n \"team\" text,\n \"match\" real,\n \"points\" real,\n \"draw\" real,\n \"lost\" real\n);\n\nQuestion: How few losses were the least number of losses and points higher than 23?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lost\") FROM \"first_league\" WHERE \"points\">23;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_league\" (\n \"team\" text,\n \"match\" real,\n \"points\" real,\n \"draw\" real,\n \"lost\" real\n);\n\nQuestion: What is the highest number of matches with more than 18 points and more than 1 draw?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"match\") FROM \"first_league\" WHERE \"points\">18 AND \"draw\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"runner_up\" text\n);\n\nQuestion: Who was the champion in the game played at the St. Andrews Links with Dick Chapman as the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"winners\" WHERE \"runner_up\"='dick chapman' AND \"venue\"='st. andrews links';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"runner_up\" text\n);\n\nQuestion: What is the score of the match won by Willie Hunter at the Royal Liverpool Golf Club?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"winners\" WHERE \"venue\"='royal liverpool golf club' AND \"champion\"='willie hunter';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"runner_up\" text\n);\n\nQuestion: What player from England was the runner-up at the match played at the Royal Porthcawl Golf Club?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"winners\" WHERE \"country\"='england' AND \"venue\"='royal porthcawl golf club';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"runner_up\" text\n);\n\nQuestion: Who was the champion in the match where C.A. Palmer was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"winners\" WHERE \"runner_up\"='c.a. palmer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"runner_up\" text\n);\n\nQuestion: What player was the champion in the match where E.A. Lassen was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"winners\" WHERE \"runner_up\"='e.a. lassen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"runner_up\" text\n);\n\nQuestion: What is the score of the match played in England where Peter McEvoy was the champion and Paul McKellar was runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"winners\" WHERE \"country\"='england' AND \"champion\"='peter mcevoy' AND \"runner_up\"='paul mckellar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"federal_representation\" (\n \"federal_state\" text,\n \"number_of_members\" real,\n \"pct_of_total_members\" text,\n \"population_on_the_census_also_called_censo_2010\" text,\n \"pct_of_the_population_censo_2010\" text,\n \"representativeness_inhabitants_mr\" text,\n \"representatives_of_national_average\" text,\n \"deputies_required_ignoring_the_limits\" real\n);\n\nQuestion: Which federal state has 6 representatives of national average?"
},
{
"role": "assistant",
"content": "SELECT \"federal_state\" FROM \"federal_representation\" WHERE \"representatives_of_national_average\"='6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"federal_representation\" (\n \"federal_state\" text,\n \"number_of_members\" real,\n \"pct_of_total_members\" text,\n \"population_on_the_census_also_called_censo_2010\" text,\n \"pct_of_the_population_censo_2010\" text,\n \"representativeness_inhabitants_mr\" text,\n \"representatives_of_national_average\" text,\n \"deputies_required_ignoring_the_limits\" real\n);\n\nQuestion: According to the 2010 census, what was the population for the federal state that had less than -6 deputies required ignoring the limits?"
},
{
"role": "assistant",
"content": "SELECT \"population_on_the_census_also_called_censo_2010\" FROM \"federal_representation\" WHERE \"deputies_required_ignoring_the_limits\"<-6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2004_summer_olympics_m\" (\n \"name\" text,\n \"date_of_birth\" text,\n \"height\" real,\n \"weight\" real,\n \"spike\" real,\n \"block\" real\n);\n\nQuestion: What is the lowest number of blocks for players with height of 206 and more than 356 spikes?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"block\") FROM \"volleyball_at_the_2004_summer_olympics_m\" WHERE \"height\"=206 AND \"spike\">356;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2004_summer_olympics_m\" (\n \"name\" text,\n \"date_of_birth\" text,\n \"height\" real,\n \"weight\" real,\n \"spike\" real,\n \"block\" real\n);\n\nQuestion: What is the number of weight values associated with 340 blocks and more than 353 spikes?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"weight\") FROM \"volleyball_at_the_2004_summer_olympics_m\" WHERE \"block\"=340 AND \"spike\">353;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"year\" real,\n \"actor\" text,\n \"award\" text,\n \"motion_picture\" text,\n \"result\" text\n);\n\nQuestion: What award did Forest Whitaker win in 1989?"
},
{
"role": "assistant",
"content": "SELECT \"award\" FROM \"men\" WHERE \"actor\"='forest whitaker' AND \"year\"=1989;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"year\" real,\n \"actor\" text,\n \"award\" text,\n \"motion_picture\" text,\n \"result\" text\n);\n\nQuestion: For what motion picture did Samuel L. Jackson win the best supporting actor award before 1997?"
},
{
"role": "assistant",
"content": "SELECT \"motion_picture\" FROM \"men\" WHERE \"award\"='best supporting actor' AND \"actor\"='samuel l. jackson' AND \"year\"<1997;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"year\" real,\n \"actor\" text,\n \"award\" text,\n \"motion_picture\" text,\n \"result\" text\n);\n\nQuestion: Which actor won in 1966?"
},
{
"role": "assistant",
"content": "SELECT \"actor\" FROM \"men\" WHERE \"year\"=1966;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nice_system\" (\n \"member_state\" text,\n \"population_millions\" real,\n \"me_ps\" real,\n \"inhabitants_per_mep\" real,\n \"influence\" real\n);\n\nQuestion: What is the lowest population in millions that has inhabitants per MEP less than 414,538, and an influence of 2.06, and MEPs less than 13?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"population_millions\") FROM \"nice_system\" WHERE \"inhabitants_per_mep\"<'414,538' AND \"influence\"=2.06 AND \"me_ps\"<13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nice_system\" (\n \"member_state\" text,\n \"population_millions\" real,\n \"me_ps\" real,\n \"inhabitants_per_mep\" real,\n \"influence\" real\n);\n\nQuestion: What is the lowest influence with population in the millions less than 60.64, and MEPs less than 22, and 454,059 inhabitant per MEP?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"influence\") FROM \"nice_system\" WHERE \"population_millions\"<60.64 AND \"me_ps\"<22 AND \"inhabitants_per_mep\"='454,059';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nice_system\" (\n \"member_state\" text,\n \"population_millions\" real,\n \"me_ps\" real,\n \"inhabitants_per_mep\" real,\n \"influence\" real\n);\n\nQuestion: What is the highest population in the millions that has an influence of 1.02?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"population_millions\") FROM \"nice_system\" WHERE \"influence\"=1.02;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nice_system\" (\n \"member_state\" text,\n \"population_millions\" real,\n \"me_ps\" real,\n \"inhabitants_per_mep\" real,\n \"influence\" real\n);\n\nQuestion: What is the total number of MEPs that has 465,955 inhabitants per MEP and an influence smaller than 1.79?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"me_ps\") FROM \"nice_system\" WHERE \"inhabitants_per_mep\"='465,955' AND \"influence\"<1.79;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nice_system\" (\n \"member_state\" text,\n \"population_millions\" real,\n \"me_ps\" real,\n \"inhabitants_per_mep\" real,\n \"influence\" real\n);\n\nQuestion: What is the sum of the population in millions that has an influence less than 2.91, a MEP smaller than 13, a member of Latvia, and more than 286,875 inhabitants per MEP?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"population_millions\") FROM \"nice_system\" WHERE \"influence\"<2.91 AND \"me_ps\"<13 AND \"member_state\"='latvia' AND \"inhabitants_per_mep\">'286,875';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nice_system\" (\n \"member_state\" text,\n \"population_millions\" real,\n \"me_ps\" real,\n \"inhabitants_per_mep\" real,\n \"influence\" real\n);\n\nQuestion: What is the highest number of inhabitants per MEP that has MEPs larger than 50, a member of Germany, and a population less than 82.43 million?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"inhabitants_per_mep\") FROM \"nice_system\" WHERE \"me_ps\">50 AND \"member_state\"='germany' AND \"population_millions\"<82.43;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"200_meters\" (\n \"year\" real,\n \"result\" real,\n \"world_rank\" text,\n \"location\" text,\n \"date\" text\n);\n\nQuestion: Which World Rank has a Year smaller than 1977, and a Location of eugene?"
},
{
"role": "assistant",
"content": "SELECT \"world_rank\" FROM \"200_meters\" WHERE \"year\"<1977 AND \"location\"='eugene';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"200_meters\" (\n \"year\" real,\n \"result\" real,\n \"world_rank\" text,\n \"location\" text,\n \"date\" text\n);\n\nQuestion: What's the lowest Year with a World Rank of 5th, with a Result greater than 20.31?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"200_meters\" WHERE \"world_rank\"='5th' AND \"result\">20.31;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"200_meters\" (\n \"year\" real,\n \"result\" real,\n \"world_rank\" text,\n \"location\" text,\n \"date\" text\n);\n\nQuestion: Which Year has a Result smaller than 20.26, and a Location of eugene?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"200_meters\" WHERE \"result\"<20.26 AND \"location\"='eugene';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"200_meters\" (\n \"year\" real,\n \"result\" real,\n \"world_rank\" text,\n \"location\" text,\n \"date\" text\n);\n\nQuestion: What is the Result with a Location of brussels?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"200_meters\" WHERE \"location\"='brussels';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"200_meters\" (\n \"year\" real,\n \"result\" real,\n \"world_rank\" text,\n \"location\" text,\n \"date\" text\n);\n\nQuestion: What Year has a Result smaller than 20.31, and a World Rank of 5th?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"200_meters\" WHERE \"result\"<20.31 AND \"world_rank\"='5th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: What is the record when the Nuggets are the home team?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"january\" WHERE \"home\"='nuggets';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gp3_series\" (\n \"year\" real,\n \"drivers\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"fast_laps\" real,\n \"points\" real,\n \"d_c\" text,\n \"t_c\" text\n);\n\nQuestion: What is the lowest number of points for Drivers that have raced in more than 16 Races?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"gp3_series\" WHERE \"races\">16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gp3_series\" (\n \"year\" real,\n \"drivers\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"fast_laps\" real,\n \"points\" real,\n \"d_c\" text,\n \"t_c\" text\n);\n\nQuestion: What is the least number of Races for a Racer with less than 0 Points?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"races\") FROM \"gp3_series\" WHERE \"points\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gp3_series\" (\n \"year\" real,\n \"drivers\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"fast_laps\" real,\n \"points\" real,\n \"d_c\" text,\n \"t_c\" text\n);\n\nQuestion: What is the average Year during which the Driver Adrian Quaife-Hobbs has fewer than 2 Poles, and 0 Fast laps?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"gp3_series\" WHERE \"poles\"<2 AND \"fast_laps\"=0 AND \"drivers\"='adrian quaife-hobbs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television_stations\" (\n \"city_of_license_market\" text,\n \"station\" text,\n \"channel_tv_dt\" text,\n \"years_owned\" text,\n \"current_affiliation\" text\n);\n\nQuestion: Which city contains the KPIX station?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license_market\" FROM \"television_stations\" WHERE \"station\"='kpix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television_stations\" (\n \"city_of_license_market\" text,\n \"station\" text,\n \"channel_tv_dt\" text,\n \"years_owned\" text,\n \"current_affiliation\" text\n);\n\nQuestion: Which station has channel TV (DT) of 3 (26)?"
},
{
"role": "assistant",
"content": "SELECT \"station\" FROM \"television_stations\" WHERE \"channel_tv_dt\"='3 (26)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television_stations\" (\n \"city_of_license_market\" text,\n \"station\" text,\n \"channel_tv_dt\" text,\n \"years_owned\" text,\n \"current_affiliation\" text\n);\n\nQuestion: What is the current affiliation when the years owned is between 1955\u20131995?"
},
{
"role": "assistant",
"content": "SELECT \"current_affiliation\" FROM \"television_stations\" WHERE \"years_owned\"='1955\u20131995';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television_stations\" (\n \"city_of_license_market\" text,\n \"station\" text,\n \"channel_tv_dt\" text,\n \"years_owned\" text,\n \"current_affiliation\" text\n);\n\nQuestion: What is the city containing the KDKA-TV station?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license_market\" FROM \"television_stations\" WHERE \"station\"='kdka-tv';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television_stations\" (\n \"city_of_license_market\" text,\n \"station\" text,\n \"channel_tv_dt\" text,\n \"years_owned\" text,\n \"current_affiliation\" text\n);\n\nQuestion: Which Channel TV is located in Baltimore?"
},
{
"role": "assistant",
"content": "SELECT \"channel_tv_dt\" FROM \"television_stations\" WHERE \"city_of_license_market\"='baltimore';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"topscorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"play_offs\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"total\" real\n);\n\nQuestion: What is the least number of goals scored in the play-offs among the players that have scored 2 in the FA Cup?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"play_offs\") FROM \"topscorers_in_order_of_league_goals\" WHERE \"fa_cup\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"topscorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"play_offs\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"total\" real\n);\n\nQuestion: What is the average number of goals scored in the FA Cup among players that have more than 20 total goals, less than 1 FA Trophy goals, and less than 25 league goals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"fa_cup\") FROM \"topscorers_in_order_of_league_goals\" WHERE \"total\">20 AND \"fa_trophy\"<1 AND \"league\"<25;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_unmanned_soft_landings_1966_1968\" (\n \"u_s_mission\" text,\n \"mass_kg\" real,\n \"booster\" text,\n \"launched\" text,\n \"mission_goal\" text,\n \"landing_zone\" text,\n \"lat_lon\" text\n);\n\nQuestion: What is the latitude and longitude for Surveyor 3?"
},
{
"role": "assistant",
"content": "SELECT \"lat_lon\" FROM \"u_s_unmanned_soft_landings_1966_1968\" WHERE \"u_s_mission\"='surveyor 3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_unmanned_soft_landings_1966_1968\" (\n \"u_s_mission\" text,\n \"mass_kg\" real,\n \"booster\" text,\n \"launched\" text,\n \"mission_goal\" text,\n \"landing_zone\" text,\n \"lat_lon\" text\n);\n\nQuestion: What is the largest mass for Tycho Crater?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"mass_kg\") FROM \"u_s_unmanned_soft_landings_1966_1968\" WHERE \"landing_zone\"='tycho crater';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_geothermal_power_stations\" (\n \"name\" text,\n \"location\" text,\n \"field\" text,\n \"capacity_mw\" real,\n \"annual_generation_average_g_wh\" text,\n \"commissioned\" text\n);\n\nQuestion: What Field was Commissioned in 1958, 2005?"
},
{
"role": "assistant",
"content": "SELECT \"field\" FROM \"list_of_geothermal_power_stations\" WHERE \"commissioned\"='1958, 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_geothermal_power_stations\" (\n \"name\" text,\n \"location\" text,\n \"field\" text,\n \"capacity_mw\" real,\n \"annual_generation_average_g_wh\" text,\n \"commissioned\" text\n);\n\nQuestion: What is the Annual Generation at Kawerau (Bope)?"
},
{
"role": "assistant",
"content": "SELECT \"annual_generation_average_g_wh\" FROM \"list_of_geothermal_power_stations\" WHERE \"name\"='kawerau (bope)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_geothermal_power_stations\" (\n \"name\" text,\n \"location\" text,\n \"field\" text,\n \"capacity_mw\" real,\n \"annual_generation_average_g_wh\" text,\n \"commissioned\" text\n);\n\nQuestion: What is the Name of the power station with a Capacity of 25 MW?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"list_of_geothermal_power_stations\" WHERE \"capacity_mw\"=25;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_geothermal_power_stations\" (\n \"name\" text,\n \"location\" text,\n \"field\" text,\n \"capacity_mw\" real,\n \"annual_generation_average_g_wh\" text,\n \"commissioned\" text\n);\n\nQuestion: What is the Name of the power station in the Field of Mokai?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"list_of_geothermal_power_stations\" WHERE \"field\"='mokai';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"year\" text,\n \"gp_gs\" text,\n \"goals\" text,\n \"assists\" text,\n \"total_points\" text\n);\n\nQuestion: How many goals were scored in 2004 when the gp/gs was \"did not play\"?"
},
{
"role": "assistant",
"content": "SELECT \"goals\" FROM \"national_team\" WHERE \"gp_gs\"='did not play' AND \"year\"='2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"year\" text,\n \"gp_gs\" text,\n \"goals\" text,\n \"assists\" text,\n \"total_points\" text\n);\n\nQuestion: How many assists were there when the total points was 2?"
},
{
"role": "assistant",
"content": "SELECT \"assists\" FROM \"national_team\" WHERE \"total_points\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"year\" text,\n \"gp_gs\" text,\n \"goals\" text,\n \"assists\" text,\n \"total_points\" text\n);\n\nQuestion: What was the total number of points when there were 7 assists?"
},
{
"role": "assistant",
"content": "SELECT \"total_points\" FROM \"national_team\" WHERE \"assists\"='7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"year\" text,\n \"gp_gs\" text,\n \"goals\" text,\n \"assists\" text,\n \"total_points\" text\n);\n\nQuestion: What was the gp/gs when the assists was 1?"
},
{
"role": "assistant",
"content": "SELECT \"gp_gs\" FROM \"national_team\" WHERE \"assists\"='1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"year\" text,\n \"gp_gs\" text,\n \"goals\" text,\n \"assists\" text,\n \"total_points\" text\n);\n\nQuestion: what was the gp/gs in 2003 when the total points was \"did not play\"?"
},
{
"role": "assistant",
"content": "SELECT \"gp_gs\" FROM \"national_team\" WHERE \"total_points\"='did not play' AND \"year\"='2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_titles_17\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What was the outcome for Jan Pisecky and his partner?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_titles_17\" WHERE \"partner\"='jan pisecky';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: What player weight 235?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"contestants\" WHERE \"weight\"=235;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: What is the height of the F who weighs less than 195?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"contestants\" WHERE \"pos\"='f' AND \"weight\"<195;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: What team does F Trey Gilder play for?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"contestants\" WHERE \"pos\"='f' AND \"player\"='trey gilder';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: What player plays for the Dakota Wizards?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"contestants\" WHERE \"team\"='dakota wizards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: Which player who weighs 210 plays for the Reno Bighorns?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"contestants\" WHERE \"weight\"=210 AND \"team\"='reno bighorns';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: What position does Brian Butch play?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"contestants\" WHERE \"player\"='brian butch';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"l\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Position has a Player of tyronn lue, and a Years in Orlando of 2003\u20132004?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"l\" WHERE \"player\"='tyronn lue' AND \"years_in_orlando\"='2003\u20132004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"l\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which School/Club Team has a Player of deandre liggins?"
},
{
"role": "assistant",
"content": "SELECT \"school_club_team\" FROM \"l\" WHERE \"player\"='deandre liggins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"l\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Position has a Years in Orlando of 1997\u20131998?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"l\" WHERE \"years_in_orlando\"='1997\u20131998';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"l\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Position has a School/Club Team of stanford?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"l\" WHERE \"school_club_team\"='stanford';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"l\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which School/Club Team has a Years in Orlando of 1997\u20131998?"
},
{
"role": "assistant",
"content": "SELECT \"school_club_team\" FROM \"l\" WHERE \"years_in_orlando\"='1997\u20131998';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"l\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Position has a Years in Orlando of 2003\u20132004?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"l\" WHERE \"years_in_orlando\"='2003\u20132004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the High assists with a Date that is february 27?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"date\"='february 27';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the High points with a Game that is 56?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"game\"=56;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_08_season_as_a_three_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" real,\n \"time\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: In what Distance has a Venue of sale?"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"2007_08_season_as_a_three_year_old\" WHERE \"venue\"='sale';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_08_season_as_a_three_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" real,\n \"time\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: WHo is Winner/2nd that has c. symons?"
},
{
"role": "assistant",
"content": "SELECT \"winner_2nd\" FROM \"2007_08_season_as_a_three_year_old\" WHERE \"jockey\"='c. symons';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_08_season_as_a_three_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" real,\n \"time\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: Which Race that Jockey of d. nikolic is in?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"2007_08_season_as_a_three_year_old\" WHERE \"jockey\"='d. nikolic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_08_season_as_a_three_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" real,\n \"time\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: Name The Result that has a Distance of 1200m, and a Weight (kg) of 55.5?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"2007_08_season_as_a_three_year_old\" WHERE \"distance\"='1200m' AND \"weight_kg\"=55.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selections\" (\n \"pos\" text,\n \"nationality\" text,\n \"previous_team\" text,\n \"nba_years_a\" real,\n \"career_with_the_franchise_b\" text\n);\n\nQuestion: What is the previous team of the United States player who had 2 NBA years and played the F position?"
},
{
"role": "assistant",
"content": "SELECT \"previous_team\" FROM \"selections\" WHERE \"nationality\"='united states' AND \"nba_years_a\"=2 AND \"pos\"='f';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Team has a Score of 108-107?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"playoffs\" WHERE \"score\"='108-107';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Record has a Date of may 31?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"playoffs\" WHERE \"date\"='may 31';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.