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 \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Where did they play the San Diego Chargers?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"opponent\"='San Diego Chargers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: How many times during the season were the seahawks 8-6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"schedule\" WHERE \"record\"='8-6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: On what day was the team playing at milwaukee county stadium?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"game_site\"='Milwaukee County Stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: How many times did the team play at oakland-alameda county coliseum?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"date\") FROM \"schedule\" WHERE \"game_site\"='Oakland-Alameda County Coliseum';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13301516_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Which episode was watched by 11.75 million U.S. viewers?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_13301516_1\" WHERE \"u_s_viewers_millions\"='11.75';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13301516_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many U.S. viewers, in millions, watched the episode that aired on November 13, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"u_s_viewers_millions\" FROM \"table1_13301516_1\" WHERE \"original_air_date\"='November 13, 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13301516_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many episodes originally aired on April 29, 2008?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no_in_series\") FROM \"table1_13301516_1\" WHERE \"original_air_date\"='April 29, 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13301516_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many millions of U.S. viewers watched episode 185?"
},
{
"role": "assistant",
"content": "SELECT \"u_s_viewers_millions\" FROM \"table1_13301516_1\" WHERE \"no_in_series\"=185;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13301516_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who directed the episode that originally aired on January 15, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_13301516_1\" WHERE \"original_air_date\"='January 15, 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team\" (\n \"shirt_no\" real,\n \"player\" text,\n \"birth_date\" text,\n \"weight\" real,\n \"height\" real\n);\n\nQuestion: How many players weight 95?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"player\") FROM \"team\" WHERE \"weight\"=95;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team\" (\n \"shirt_no\" real,\n \"player\" text,\n \"birth_date\" text,\n \"weight\" real,\n \"height\" real\n);\n\nQuestion: What's Enrique de la Fuente's weight?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"weight\") FROM \"team\" WHERE \"player\"='Enrique de la Fuente';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passages\" (\n \"incumbent\" text,\n \"reason_for_vacancy\" text,\n \"appointed_successor\" text,\n \"date_of_appointment\" text,\n \"elected_successor\" text,\n \"date_of_election\" text\n);\n\nQuestion: What was the election date for H. Brent Coles?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_election\" FROM \"passages\" WHERE \"appointed_successor\"='H. Brent Coles';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passages\" (\n \"incumbent\" text,\n \"reason_for_vacancy\" text,\n \"appointed_successor\" text,\n \"date_of_appointment\" text,\n \"elected_successor\" text,\n \"date_of_election\" text\n);\n\nQuestion: What was the election date for Arthur Hodges?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_election\" FROM \"passages\" WHERE \"elected_successor\"='Arthur Hodges';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_rankings\" (\n \"num\" real,\n \"player\" text,\n \"country\" text,\n \"points\" real,\n \"events\" real,\n \"reset_points\" real\n);\n\nQuestion: What is the country for # 8"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"regular_season_rankings\" WHERE \"num\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_rankings\" (\n \"num\" real,\n \"player\" text,\n \"country\" text,\n \"points\" real,\n \"events\" real,\n \"reset_points\" real\n);\n\nQuestion: what is the country where the player is phil mickelson?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"regular_season_rankings\" WHERE \"player\"='Phil Mickelson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_rankings\" (\n \"num\" real,\n \"player\" text,\n \"country\" text,\n \"points\" real,\n \"events\" real,\n \"reset_points\" real\n);\n\nQuestion: What is the highest reset points where the events is 23?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"reset_points\") FROM \"regular_season_rankings\" WHERE \"events\"=23;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: What round was held at Knowsley Road, resulting in a lose."
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"fixtures_results\" WHERE \"venue\"='Knowsley Road' AND \"result\"='Lose';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: What's the score of the QF round?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fixtures_results\" WHERE \"round\"='QF';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: How many rounds ended with a score of 16-52?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"fixtures_results\" WHERE \"score\"='16-52';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: Who was the opponent in round 2?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"fixtures_results\" WHERE \"round\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: When was the game happening at Halton Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fixtures_results\" WHERE \"venue\"='Halton Stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: What competition ended with a score of 38-14?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"fixtures_results\" WHERE \"score\"='38-14';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ethnic_distribution_in_2005_population_e\" (\n \"country\" text,\n \"population\" real,\n \"native_american\" text,\n \"whites\" text,\n \"s_mestizo\" text,\n \"es_mulatto\" text,\n \"blacks\" text,\n \"s_zambo\" text,\n \"asians\" text\n);\n\nQuestion: what's the\u00a0population\u00a0with\u00a0country\u00a0being chile"
},
{
"role": "assistant",
"content": "SELECT \"population\" FROM \"ethnic_distribution_in_2005_population_e\" WHERE \"country\"='Chile';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ethnic_distribution_in_2005_population_e\" (\n \"country\" text,\n \"population\" real,\n \"native_american\" text,\n \"whites\" text,\n \"s_mestizo\" text,\n \"es_mulatto\" text,\n \"blacks\" text,\n \"s_zambo\" text,\n \"asians\" text\n);\n\nQuestion: what's the\u00a0s mestizo\u00a0with\u00a0asians\u00a0being 0.2% and\u00a0whites\u00a0being 74.8%"
},
{
"role": "assistant",
"content": "SELECT \"s_mestizo\" FROM \"ethnic_distribution_in_2005_population_e\" WHERE \"asians\"='0.2%' AND \"whites\"='74.8%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ethnic_distribution_in_2005_population_e\" (\n \"country\" text,\n \"population\" real,\n \"native_american\" text,\n \"whites\" text,\n \"s_mestizo\" text,\n \"es_mulatto\" text,\n \"blacks\" text,\n \"s_zambo\" text,\n \"asians\" text\n);\n\nQuestion: what's the\u00a0country\u00a0with\u00a0es mulatto\u00a0being 3.5%"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"ethnic_distribution_in_2005_population_e\" WHERE \"es_mulatto\"='3.5%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ethnic_distribution_in_2005_population_e\" (\n \"country\" text,\n \"population\" real,\n \"native_american\" text,\n \"whites\" text,\n \"s_mestizo\" text,\n \"es_mulatto\" text,\n \"blacks\" text,\n \"s_zambo\" text,\n \"asians\" text\n);\n\nQuestion: what's the\u00a0s mestizo\u00a0with\u00a0population\u00a0being 29461933"
},
{
"role": "assistant",
"content": "SELECT \"s_mestizo\" FROM \"ethnic_distribution_in_2005_population_e\" WHERE \"population\"=29461933;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ethnic_distribution_in_2005_population_e\" (\n \"country\" text,\n \"population\" real,\n \"native_american\" text,\n \"whites\" text,\n \"s_mestizo\" text,\n \"es_mulatto\" text,\n \"blacks\" text,\n \"s_zambo\" text,\n \"asians\" text\n);\n\nQuestion: what's the\u00a0native american\u00a0with\u00a0es mulatto\u00a0being 0.7%"
},
{
"role": "assistant",
"content": "SELECT \"native_american\" FROM \"ethnic_distribution_in_2005_population_e\" WHERE \"es_mulatto\"='0.7%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ethnic_distribution_in_2005_population_e\" (\n \"country\" text,\n \"population\" real,\n \"native_american\" text,\n \"whites\" text,\n \"s_mestizo\" text,\n \"es_mulatto\" text,\n \"blacks\" text,\n \"s_zambo\" text,\n \"asians\" text\n);\n\nQuestion: how many\u00a0native american\u00a0with\u00a0whites\u00a0being 1.0%"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"native_american\") FROM \"ethnic_distribution_in_2005_population_e\" WHERE \"whites\"='1.0%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13336122_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: When did the episode directed by David Duchovny originally air?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_13336122_3\" WHERE \"directed_by\"='David Duchovny';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13336122_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What's the title of the episode directed by David von Ancken, with a episode number bigger than 16.0?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_13336122_3\" WHERE \"directed_by\"='David Von Ancken' AND \"no_in_series\">16.0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13336122_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: How many episodes have been directed by David Duchovny?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"title\") FROM \"table1_13336122_3\" WHERE \"directed_by\"='David Duchovny';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13336122_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What's the smallest episode number of an episode whose number in the series is 22?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"no_in_season\") FROM \"table1_13336122_3\" WHERE \"no_in_series\"=22;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13336122_6\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Name the number of shows when there was 2 million views"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"u_s_viewers_million\") FROM \"table1_13336122_6\" WHERE \"no_in_season\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13336122_6\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What is the episode number for \"here I go again\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"no_in_series\") FROM \"table1_13336122_6\" WHERE \"title\"='\\\"Here I Go Again\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13336122_5\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: what is the original air date for the episoe written by vanessa reisen?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_13336122_5\" WHERE \"written_by\"='Vanessa Reisen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13336122_5\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What is the u.s. viewers (million) for the title \"the recused\""
},
{
"role": "assistant",
"content": "SELECT \"u_s_viewers_million\" FROM \"table1_13336122_5\" WHERE \"title\"='\\\"The Recused\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"buildings_completed_as_of_february_2011\" (\n \"rank\" real,\n \"building\" text,\n \"address\" text,\n \"height\" text,\n \"storeys\" real,\n \"completed\" real\n);\n\nQuestion: what is the maximum completed for delta bessborough"
},
{
"role": "assistant",
"content": "SELECT MAX(\"completed\") FROM \"buildings_completed_as_of_february_2011\" WHERE \"building\"='Delta Bessborough';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"buildings_completed_as_of_february_2011\" (\n \"rank\" real,\n \"building\" text,\n \"address\" text,\n \"height\" text,\n \"storeys\" real,\n \"completed\" real\n);\n\nQuestion: what is the maximum completed for address on 410 22nd st e"
},
{
"role": "assistant",
"content": "SELECT \"completed\" FROM \"buildings_completed_as_of_february_2011\" WHERE \"address\"='410 22nd St E';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"buildings_completed_as_of_february_2011\" (\n \"rank\" real,\n \"building\" text,\n \"address\" text,\n \"height\" text,\n \"storeys\" real,\n \"completed\" real\n);\n\nQuestion: what is the total number of building for address on 201 1st avenue south"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"building\") FROM \"buildings_completed_as_of_february_2011\" WHERE \"address\"='201 1st Avenue South';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"buildings_completed_as_of_february_2011\" (\n \"rank\" real,\n \"building\" text,\n \"address\" text,\n \"height\" text,\n \"storeys\" real,\n \"completed\" real\n);\n\nQuestion: what are all the building with 12 storeys"
},
{
"role": "assistant",
"content": "SELECT \"building\" FROM \"buildings_completed_as_of_february_2011\" WHERE \"storeys\"=12;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"buildings_completed_as_of_february_2011\" (\n \"rank\" real,\n \"building\" text,\n \"address\" text,\n \"height\" text,\n \"storeys\" real,\n \"completed\" real\n);\n\nQuestion: what is the minimum storeys on 325 5th ave n"
},
{
"role": "assistant",
"content": "SELECT MIN(\"storeys\") FROM \"buildings_completed_as_of_february_2011\" WHERE \"address\"='325 5th Ave N';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1337525_1\" (\n \"complete_series\" text,\n \"region_1\" text,\n \"region_2\" text,\n \"region_4\" text,\n \"dvd_extras_and_bonus_features\" text,\n \"number_of_discs\" real\n);\n\nQuestion: What is the region 2 for the complete fifth series?"
},
{
"role": "assistant",
"content": "SELECT \"region_2\" FROM \"table1_1337525_1\" WHERE \"complete_series\"='The Complete Fifth Series';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1337525_1\" (\n \"complete_series\" text,\n \"region_1\" text,\n \"region_2\" text,\n \"region_4\" text,\n \"dvd_extras_and_bonus_features\" text,\n \"number_of_discs\" real\n);\n\nQuestion: What is the number of region 4 for the series of the complete seventh series?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"region_4\") FROM \"table1_1337525_1\" WHERE \"complete_series\"='The Complete Seventh Series';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1337525_1\" (\n \"complete_series\" text,\n \"region_1\" text,\n \"region_2\" text,\n \"region_4\" text,\n \"dvd_extras_and_bonus_features\" text,\n \"number_of_discs\" real\n);\n\nQuestion: What is the region 1 where region 4 is tba is the complete eighth series?"
},
{
"role": "assistant",
"content": "SELECT \"region_1\" FROM \"table1_1337525_1\" WHERE \"region_4\"='TBA' AND \"complete_series\"='The Complete Eighth Series';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1337525_1\" (\n \"complete_series\" text,\n \"region_1\" text,\n \"region_2\" text,\n \"region_4\" text,\n \"dvd_extras_and_bonus_features\" text,\n \"number_of_discs\" real\n);\n\nQuestion: Name the region 4 for the complete fifth series"
},
{
"role": "assistant",
"content": "SELECT \"region_4\" FROM \"table1_1337525_1\" WHERE \"complete_series\"='The Complete Fifth Series';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many tries were against when the number won was 14?"
},
{
"role": "assistant",
"content": "SELECT \"tries_against\" FROM \"2009_2010_table\" WHERE \"won\"='14';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What was the number of bonus tries when there were 522 points against?"
},
{
"role": "assistant",
"content": "SELECT \"try_bonus\" FROM \"2009_2010_table\" WHERE \"points_against\"='522';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many numbers were listed under losing bonus when there were 68 tries for?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losing_bonus\") FROM \"2009_2010_table\" WHERE \"tries_for\"='68';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What amount of points for were there when there was 52 points?"
},
{
"role": "assistant",
"content": "SELECT \"points_for\" FROM \"2009_2010_table\" WHERE \"points\"='52';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What was the number of points against when the amount won is 10?"
},
{
"role": "assistant",
"content": "SELECT \"points_against\" FROM \"2009_2010_table\" WHERE \"won\"='10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is listed under try bonus when listed under Tries for is tries for?"
},
{
"role": "assistant",
"content": "SELECT \"try_bonus\" FROM \"2009_2010_table\" WHERE \"tries_for\"='Tries for';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13403120_1\" (\n \"num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"originalairdate\" text,\n \"repeatairdate_s\" text,\n \"prod_code\" text\n);\n\nQuestion: What is the original date of the repeat air date of 26/01/1969?"
},
{
"role": "assistant",
"content": "SELECT \"originalairdate\" FROM \"table1_13403120_1\" WHERE \"repeatairdate_s\"='26/01/1969';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13403120_1\" (\n \"num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"originalairdate\" text,\n \"repeatairdate_s\" text,\n \"prod_code\" text\n);\n\nQuestion: What is the repeat date of the episode that aired 22/12/1968?"
},
{
"role": "assistant",
"content": "SELECT \"repeatairdate_s\" FROM \"table1_13403120_1\" WHERE \"originalairdate\"='22/12/1968';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13403120_1\" (\n \"num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"originalairdate\" text,\n \"repeatairdate_s\" text,\n \"prod_code\" text\n);\n\nQuestion: who is the writer of the episode with prod.code 30-17"
},
{
"role": "assistant",
"content": "SELECT \"writer_s\" FROM \"table1_13403120_1\" WHERE \"prod_code\"='30-17';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13403120_1\" (\n \"num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"originalairdate\" text,\n \"repeatairdate_s\" text,\n \"prod_code\" text\n);\n\nQuestion: what is the prod.code of the episode with original air date 01/12/1968?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"prod_code\") FROM \"table1_13403120_1\" WHERE \"originalairdate\"='01/12/1968';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: In the 2008/2009 season one team had a season total points of 31, for that team how many total points were scored against them?"
},
{
"role": "assistant",
"content": "SELECT \"points_against\" FROM \"2008_2009_table\" WHERE \"points\"='31';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: In the 2008/2009 season one team had 1 losing bonus, How many points did that team score that year?"
},
{
"role": "assistant",
"content": "SELECT \"points_for\" FROM \"2008_2009_table\" WHERE \"losing_bonus\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: In the 2008/2009 season one team had 47 tries against, how many games did they win that year?"
},
{
"role": "assistant",
"content": "SELECT \"won\" FROM \"2008_2009_table\" WHERE \"tries_against\"='47';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: In the 2008/2009 season one team had 39 tries against, how many losing bonuses did they have that year?"
},
{
"role": "assistant",
"content": "SELECT \"losing_bonus\" FROM \"2008_2009_table\" WHERE \"tries_against\"='39';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"massachusetts\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates when ed markey was the incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"massachusetts\" WHERE \"incumbent\"='Ed Markey';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"massachusetts\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many times was the incumbent mike capuano"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"massachusetts\" WHERE \"incumbent\"='Mike Capuano';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"massachusetts\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates when Barney Frank was the incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"massachusetts\" WHERE \"incumbent\"='Barney Frank';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"massachusetts\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the earliest year someone was first elected from Massachusetts 3"
},
{
"role": "assistant",
"content": "SELECT MIN(\"first_elected\") FROM \"massachusetts\" WHERE \"district\"='Massachusetts 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"maryland\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What party did incumbent Albert Wynn belong to? "
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"maryland\" WHERE \"incumbent\"='Albert Wynn';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"maryland\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result of the election in the Maryland 7 district? "
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"maryland\" WHERE \"district\"='Maryland 7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"maryland\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: How many candidates ran in the election where Wayne Gilchrest was the incumbent?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"candidates\") FROM \"maryland\" WHERE \"incumbent\"='Wayne Gilchrest';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"maryland\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What were the results in the election where Albert Wynn was the incumbent? "
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"maryland\" WHERE \"incumbent\"='Albert Wynn';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"maryland\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates in the Maryland 5 district election? "
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"maryland\" WHERE \"district\"='Maryland 5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1341423_13\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What district is Henry Hyde in"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"table1_1341423_13\" WHERE \"incumbent\"='Henry Hyde';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1341423_13\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What year was Luis Gutierrez election"
},
{
"role": "assistant",
"content": "SELECT MIN(\"first_elected\") FROM \"table1_1341423_13\" WHERE \"incumbent\"='Luis Gutierrez';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"massachusetts\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Which district is Joe Moakley?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"massachusetts\" WHERE \"incumbent\"='Joe Moakley';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"massachusetts\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What is the lowest first elected?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"first_elected\") FROM \"massachusetts\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"new_york\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Name the first election for john mchugh"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"first_elected\") FROM \"new_york\" WHERE \"incumbent\"='John McHugh';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"new_york\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Name the results for district new york 24"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"new_york\" WHERE \"district\"='New York 24';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"new_york\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Name the district for carolyn mccarthy"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"new_york\" WHERE \"incumbent\"='Carolyn McCarthy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"new_york\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Name the number of party for new york 29"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"party\") FROM \"new_york\" WHERE \"district\"='New York 29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"michigan\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Which party does the incumbent first elected in 1994 belong to?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"michigan\" WHERE \"first_elected\"=1994;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"michigan\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: How many districts have Bart Stupak as the incumbent?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"michigan\" WHERE \"incumbent\"='Bart Stupak';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ohio\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Who was elected in 1972"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"ohio\" WHERE \"first_elected\"=1972;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: what is the earliest first elected with the results re-elected in the district south carolina 3?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"first_elected\") FROM \"south_carolina\" WHERE \"results\"='Re-elected' AND \"district\"='South Carolina 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: what is the party with the incumbent jim demint?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"south_carolina\" WHERE \"incumbent\"='Jim DeMint';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: what is the party for the district south carolina 4?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"south_carolina\" WHERE \"district\"='South Carolina 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: what is the party when candidates is jim demint (r) 80%?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"south_carolina\" WHERE \"candidates\"='Jim DeMint (R) 80%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: what is the party when candidates is jim demint (r) 80%?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"south_carolina\" WHERE \"candidates\"='Jim DeMint (R) 80%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: who are the candidates when the incumbent is lindsey graham?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"south_carolina\" WHERE \"incumbent\"='Lindsey Graham';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oklahoma\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What was the results when the incumbent was ernest istook?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"oklahoma\" WHERE \"incumbent\"='Ernest Istook';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oklahoma\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What was the results for the district oklahoma 3?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"oklahoma\" WHERE \"district\"='Oklahoma 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oklahoma\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: How many party were listed for district oklahoma 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"party\") FROM \"oklahoma\" WHERE \"district\"='Oklahoma 5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oklahoma\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What is the party when the candidates were ernest istook (r) 69% garland mcwatters (d) 28%?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"oklahoma\" WHERE \"candidates\"='Ernest Istook (R) 69% Garland McWatters (D) 28%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oklahoma\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: when was the first elected for districk oklahoma 1?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"oklahoma\" WHERE \"district\"='Oklahoma 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oklahoma\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What were the results for the district oklahoma 5?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"oklahoma\" WHERE \"district\"='Oklahoma 5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: How many parties is the incumbent Bob Brady a member of?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"party\") FROM \"pennsylvania\" WHERE \"incumbent\"='Bob Brady';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: How many candidates were there in the district won by Joe Hoeffel?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"candidates\") FROM \"pennsylvania\" WHERE \"incumbent\"='Joe Hoeffel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates in district Pennsylvania 3?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"pennsylvania\" WHERE \"district\"='Pennsylvania 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What's the first elected year of the district whose incumbent is Jim Greenwood?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"first_elected\") FROM \"pennsylvania\" WHERE \"incumbent\"='Jim Greenwood';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1341423_46\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result of the election featuring incumbent norman sisisky?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"table1_1341423_46\" WHERE \"incumbent\"='Norman Sisisky';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wisconsin\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates in the district first elected in 1998 whose incumbent ended up being Paul Ryan?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"wisconsin\" WHERE \"first_elected\"=1998 AND \"incumbent\"='Paul Ryan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wisconsin\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Who ran in the district elections won by Tom Petri?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"wisconsin\" WHERE \"incumbent\"='Tom Petri';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wisconsin\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: When was the first election in the district whose incumbent is Ron Kind?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"first_elected\") FROM \"wisconsin\" WHERE \"incumbent\"='Ron Kind';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wisconsin\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What year was the first election in the district whose election now was won by Ron Kind?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"first_elected\") FROM \"wisconsin\" WHERE \"incumbent\"='Ron Kind';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.