cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`What's the transit connection in Columbia City, Seattle?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "stations" (
  "station" text,
  "line_s" text,
  "city_neighborhood" text,
  "year_opened" real,
  "transit_connections" text,
  "park_and_ride" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the transit connection in Columbia City, Seattle?`:
```sql
                SELECT "transit_connections" FROM "stations" WHERE "city_neighborhood"='Columbia City, Seattle';
```
## Task
Generate a SQL query to answer the following question:
`For small patent type of protections, what type of PCT route is available?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "availability_and_names" (
  "country" text,
  "type_of_protection" text,
  "maximum_term" text,
  "pct_route_available" text,
  "conversion_from_patent_application" text
);
### SQL
Given the database schema, here is the SQL query that answers `For small patent type of protections, what type of PCT route is available?`:
```sql
                SELECT "pct_route_available" FROM "availability_and_names" WHERE "type_of_protection"='small patent';
```
## Task
Generate a SQL query to answer the following question:
`In Tonga, what is the conversion from patent application?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "availability_and_names" (
  "country" text,
  "type_of_protection" text,
  "maximum_term" text,
  "pct_route_available" text,
  "conversion_from_patent_application" text
);
### SQL
Given the database schema, here is the SQL query that answers `In Tonga, what is the conversion from patent application?`:
```sql
                SELECT "conversion_from_patent_application" FROM "availability_and_names" WHERE "country"='Tonga';
```
## Task
Generate a SQL query to answer the following question:
`For short patent type of protections, what type of PCT route is available?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "availability_and_names" (
  "country" text,
  "type_of_protection" text,
  "maximum_term" text,
  "pct_route_available" text,
  "conversion_from_patent_application" text
);
### SQL
Given the database schema, here is the SQL query that answers `For short patent type of protections, what type of PCT route is available?`:
```sql
                SELECT "pct_route_available" FROM "availability_and_names" WHERE "type_of_protection"='short patent';
```
## Task
Generate a SQL query to answer the following question:
`In Tangier Zone, what is the PCT route availibility?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "availability_and_names" (
  "country" text,
  "type_of_protection" text,
  "maximum_term" text,
  "pct_route_available" text,
  "conversion_from_patent_application" text
);
### SQL
Given the database schema, here is the SQL query that answers `In Tangier Zone, what is the PCT route availibility?`:
```sql
                SELECT "pct_route_available" FROM "availability_and_names" WHERE "country"='Tangier Zone';
```
## Task
Generate a SQL query to answer the following question:
`When the PCT route available is yes and the maximum term is 10 years, what are the available conversions from patent applications?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "availability_and_names" (
  "country" text,
  "type_of_protection" text,
  "maximum_term" text,
  "pct_route_available" text,
  "conversion_from_patent_application" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the PCT route available is yes and the maximum term is 10 years, what are the available conversions from patent applications?`:
```sql
                SELECT "conversion_from_patent_application" FROM "availability_and_names" WHERE "maximum_term"='10 years' AND "pct_route_available"='Yes';
```
## Task
Generate a SQL query to answer the following question:
`What was the result against the team which the Cowboys have a 6-2 record against?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "schedule" (
  "game" real,
  "date" text,
  "opponent" text,
  "result" text,
  "cowboys_points" real,
  "opponents" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result against the team which the Cowboys have a 6-2 record against?`:
```sql
                SELECT "result" FROM "schedule" WHERE "record"='6-2';
```
## Task
Generate a SQL query to answer the following question:
`What is the fewest points opponents have scored when the Cowboys score 36?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "schedule" (
  "game" real,
  "date" text,
  "opponent" text,
  "result" text,
  "cowboys_points" real,
  "opponents" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the fewest points opponents have scored when the Cowboys score 36?`:
```sql
                SELECT MIN("opponents") FROM "schedule" WHERE "cowboys_points"=36;
```
## Task
Generate a SQL query to answer the following question:
`How many opponents have a 1-0 record against the Cowboys?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "schedule" (
  "game" real,
  "date" text,
  "opponent" text,
  "result" text,
  "cowboys_points" real,
  "opponents" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many opponents have a 1-0 record against the Cowboys?`:
```sql
                SELECT "opponents" FROM "schedule" WHERE "record"='1-0';
```
## Task
Generate a SQL query to answer the following question:
`What game was held against a team with a 6-3 record against the Cowboys?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "schedule" (
  "game" real,
  "date" text,
  "opponent" text,
  "result" text,
  "cowboys_points" real,
  "opponents" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What game was held against a team with a 6-3 record against the Cowboys?`:
```sql
                SELECT "game" FROM "schedule" WHERE "record"='6-3';
```
## Task
Generate a SQL query to answer the following question:
`How many names have a country of civ?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "in" (
  "n" real,
  "p" text,
  "name" text,
  "eu" text,
  "country" text,
  "age" real,
  "type" text,
  "moving_from" text,
  "transfer_window" text,
  "ends" text,
  "transfer_fee" text,
  "source" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many names have a country of civ?`:
```sql
                SELECT COUNT("name") FROM "in" WHERE "country"='CIV';
```
## Task
Generate a SQL query to answer the following question:
`Who moved from Northampton Town?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "in" (
  "n" real,
  "p" text,
  "name" text,
  "eu" text,
  "country" text,
  "age" real,
  "type" text,
  "moving_from" text,
  "transfer_window" text,
  "ends" text,
  "transfer_fee" text,
  "source" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who moved from Northampton Town?`:
```sql
                SELECT "name" FROM "in" WHERE "moving_from"='Northampton Town';
```
## Task
Generate a SQL query to answer the following question:
`Where did Kisnorbo move from?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "in" (
  "n" real,
  "p" text,
  "name" text,
  "eu" text,
  "country" text,
  "age" real,
  "type" text,
  "moving_from" text,
  "transfer_window" text,
  "ends" text,
  "transfer_fee" text,
  "source" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did Kisnorbo move from?`:
```sql
                SELECT "moving_from" FROM "in" WHERE "name"='Kisnorbo';
```
## Task
Generate a SQL query to answer the following question:
`What is the name of the player when n is 28?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "in" (
  "n" real,
  "p" text,
  "name" text,
  "eu" text,
  "country" text,
  "age" real,
  "type" text,
  "moving_from" text,
  "transfer_window" text,
  "ends" text,
  "transfer_fee" text,
  "source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the player when n is 28?`:
```sql
                SELECT "name" FROM "in" WHERE "n"=28;
```
## Task
Generate a SQL query to answer the following question:
`How much was the transfer fee when n is 2?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "in" (
  "n" real,
  "p" text,
  "name" text,
  "eu" text,
  "country" text,
  "age" real,
  "type" text,
  "moving_from" text,
  "transfer_window" text,
  "ends" text,
  "transfer_fee" text,
  "source" text
);
### SQL
Given the database schema, here is the SQL query that answers `How much was the transfer fee when n is 2?`:
```sql
                SELECT "transfer_fee" FROM "in" WHERE "n"=2;
```
## Task
Generate a SQL query to answer the following question:
`What player is 24 years old? `

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "loans_in" (
  "no" real,
  "p" text,
  "name" text,
  "country" text,
  "age" real,
  "loan_club" text,
  "started" text,
  "ended" text,
  "start_source" text,
  "end_source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What player is 24 years old? `:
```sql
                SELECT "name" FROM "loans_in" WHERE "age"=24;
```
## Task
Generate a SQL query to answer the following question:
`Name the ted morris memorial trophy for november 22, 2008`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "table1_228149_1" (
  "game" text,
  "date" text,
  "champion" text,
  "score" text,
  "runner_up" text,
  "stadium" text,
  "city" text,
  "ted_morris_memorial_trophy_game_mvp" text,
  "bruce_coulter_award" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the ted morris memorial trophy for november 22, 2008`:
```sql
                SELECT "ted_morris_memorial_trophy_game_mvp" FROM "table1_228149_1" WHERE "date"='November 22, 2008';
```
## Task
Generate a SQL query to answer the following question:
`Name the ted morris memorial trophy 34th game`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "table1_228149_1" (
  "game" text,
  "date" text,
  "champion" text,
  "score" text,
  "runner_up" text,
  "stadium" text,
  "city" text,
  "ted_morris_memorial_trophy_game_mvp" text,
  "bruce_coulter_award" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the ted morris memorial trophy 34th game`:
```sql
                SELECT "ted_morris_memorial_trophy_game_mvp" FROM "table1_228149_1" WHERE "game"='34th';
```
## Task
Generate a SQL query to answer the following question:
`Nam the total number for bruce coulter award for 9th game`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "table1_228149_1" (
  "game" text,
  "date" text,
  "champion" text,
  "score" text,
  "runner_up" text,
  "stadium" text,
  "city" text,
  "ted_morris_memorial_trophy_game_mvp" text,
  "bruce_coulter_award" text
);
### SQL
Given the database schema, here is the SQL query that answers `Nam the total number for bruce coulter award for 9th game`:
```sql
                SELECT COUNT("bruce_coulter_award") FROM "table1_228149_1" WHERE "game"='9th';
```
## Task
Generate a SQL query to answer the following question:
`Name the bruce coulter award for forrest kennerd`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "table1_228149_1" (
  "game" text,
  "date" text,
  "champion" text,
  "score" text,
  "runner_up" text,
  "stadium" text,
  "city" text,
  "ted_morris_memorial_trophy_game_mvp" text,
  "bruce_coulter_award" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the bruce coulter award for forrest kennerd`:
```sql
                SELECT "bruce_coulter_award" FROM "table1_228149_1" WHERE "ted_morris_memorial_trophy_game_mvp"='Forrest Kennerd';
```
## Task
Generate a SQL query to answer the following question:
`How many opponents were there when the opponent was Arizona State?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "schedule" (
  "game" real,
  "date" text,
  "opponent" text,
  "result" text,
  "cowboys_points" real,
  "opponents" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many opponents were there when the opponent was Arizona State?`:
```sql
                SELECT MIN("opponents") FROM "schedule" WHERE "opponent"='Arizona State';
```
## Task
Generate a SQL query to answer the following question:
`How many records show Utah as the opponent?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "schedule" (
  "game" real,
  "date" text,
  "opponent" text,
  "result" text,
  "cowboys_points" real,
  "opponents" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many records show Utah as the opponent?`:
```sql
                SELECT COUNT("record") FROM "schedule" WHERE "opponent"='Utah';
```
## Task
Generate a SQL query to answer the following question:
`How many opponents are there when cowboy points were 10?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "schedule" (
  "game" real,
  "date" text,
  "opponent" text,
  "result" text,
  "cowboys_points" real,
  "opponents" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many opponents are there when cowboy points were 10?`:
```sql
                SELECT "opponents" FROM "schedule" WHERE "cowboys_points"=10;
```
## Task
Generate a SQL query to answer the following question:
`How many records were there when opponents were 9?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "schedule" (
  "game" real,
  "date" text,
  "opponent" text,
  "result" text,
  "cowboys_points" real,
  "opponents" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many records were there when opponents were 9?`:
```sql
                SELECT COUNT("record") FROM "schedule" WHERE "opponents"=9;
```
## Task
Generate a SQL query to answer the following question:
`Name the number of record for 12 cowboys points`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "schedule" (
  "game" real,
  "date" text,
  "opponent" text,
  "result" text,
  "cowboys_points" real,
  "opponents" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the number of record for 12 cowboys points`:
```sql
                SELECT COUNT("record") FROM "schedule" WHERE "cowboys_points"=12;
```
## Task
Generate a SQL query to answer the following question:
`Name the most game for record 4-0`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "schedule" (
  "game" real,
  "date" text,
  "opponent" text,
  "result" text,
  "cowboys_points" real,
  "opponents" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most game for record 4-0`:
```sql
                SELECT MAX("game") FROM "schedule" WHERE "record"='4-0';
```
## Task
Generate a SQL query to answer the following question:
`Name the result for cowboys points being 23`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "schedule" (
  "game" real,
  "date" text,
  "opponent" text,
  "result" text,
  "cowboys_points" real,
  "opponents" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the result for cowboys points being 23`:
```sql
                SELECT COUNT("result") FROM "schedule" WHERE "cowboys_points"=23;
```
## Task
Generate a SQL query to answer the following question:
`Name the record for arizona`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "schedule" (
  "game" real,
  "date" text,
  "opponent" text,
  "result" text,
  "cowboys_points" real,
  "opponents" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the record for arizona`:
```sql
                SELECT "record" FROM "schedule" WHERE "opponent"='Arizona';
```
## Task
Generate a SQL query to answer the following question:
`Name the unemployment rate for 34024`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the unemployment rate for 34024`:
```sql
                SELECT COUNT("unemployment_rate") FROM "list_of_appalachian_regional_commission_" WHERE "population"=34024;
```
## Task
Generate a SQL query to answer the following question:
`Name the total number of population for craig`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of population for craig`:
```sql
                SELECT COUNT("population") FROM "list_of_appalachian_regional_commission_" WHERE "county"='Craig';
```
## Task
Generate a SQL query to answer the following question:
`Name the unemployment rate for botetourt`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the unemployment rate for botetourt`:
```sql
                SELECT "unemployment_rate" FROM "list_of_appalachian_regional_commission_" WHERE "county"='Botetourt';
```
## Task
Generate a SQL query to answer the following question:
`Name the status for unemployment rate being 6.7%`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the status for unemployment rate being 6.7%`:
```sql
                SELECT "status" FROM "list_of_appalachian_regional_commission_" WHERE "unemployment_rate"='6.7%';
```
## Task
Generate a SQL query to answer the following question:
`What is the status of the county that has a 14.7% poverty rate?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the status of the county that has a 14.7% poverty rate?`:
```sql
                SELECT "status" FROM "list_of_appalachian_regional_commission_" WHERE "poverty_rate"='14.7%';
```
## Task
Generate a SQL query to answer the following question:
`What is the poverty rate in the county that has a market income per capita of $16,420?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the poverty rate in the county that has a market income per capita of $16,420?`:
```sql
                SELECT "poverty_rate" FROM "list_of_appalachian_regional_commission_" WHERE "market_income_per_capita"='$16,420';
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest population in a county with market income per capita of $24,383?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest population in a county with market income per capita of $24,383?`:
```sql
                SELECT MIN("population") FROM "list_of_appalachian_regional_commission_" WHERE "market_income_per_capita"='$24,383';
```
## Task
Generate a SQL query to answer the following question:
`What is the povery rate of the county with market income per capita of $20,518?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the povery rate of the county with market income per capita of $20,518?`:
```sql
                SELECT "poverty_rate" FROM "list_of_appalachian_regional_commission_" WHERE "market_income_per_capita"='$20,518';
```
## Task
Generate a SQL query to answer the following question:
`what is the market income per capita where the county is hancock?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the market income per capita where the county is hancock?`:
```sql
                SELECT "market_income_per_capita" FROM "list_of_appalachian_regional_commission_" WHERE "county"='Hancock';
```
## Task
Generate a SQL query to answer the following question:
`what is the county where the market income per capita is $25,006?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the county where the market income per capita is $25,006?`:
```sql
                SELECT "county" FROM "list_of_appalachian_regional_commission_" WHERE "market_income_per_capita"='$25,006';
```
## Task
Generate a SQL query to answer the following question:
`what is the unemployment rate where the market income per capita is $16,406?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the unemployment rate where the market income per capita is $16,406?`:
```sql
                SELECT "unemployment_rate" FROM "list_of_appalachian_regional_commission_" WHERE "market_income_per_capita"='$16,406';
```
## Task
Generate a SQL query to answer the following question:
`what is the unemployment rate for wayne county?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the unemployment rate for wayne county?`:
```sql
                SELECT "unemployment_rate" FROM "list_of_appalachian_regional_commission_" WHERE "county"='Wayne';
```
## Task
Generate a SQL query to answer the following question:
`What is the original air date of the episode with a production code of 105? `

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "table1_22815870_1" (
  "series_num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "prod_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the original air date of the episode with a production code of 105? `:
```sql
                SELECT "original_air_date" FROM "table1_22815870_1" WHERE "prod_code"=105;
```
## Task
Generate a SQL query to answer the following question:
`What is the original air date of the episode titled "Pilot"?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "table1_22815870_1" (
  "series_num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "prod_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the original air date of the episode titled "Pilot"?`:
```sql
                SELECT "original_air_date" FROM "table1_22815870_1" WHERE "title"='\"Pilot\"';
```
## Task
Generate a SQL query to answer the following question:
`Who wrote the episode titled "Christmas"? `

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "table1_22815870_1" (
  "series_num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "prod_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who wrote the episode titled "Christmas"? `:
```sql
                SELECT "written_by" FROM "table1_22815870_1" WHERE "title"='\"Christmas\"';
```
## Task
Generate a SQL query to answer the following question:
`What is the production code of the episode titled "Lenny"?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "table1_22815870_1" (
  "series_num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "prod_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the production code of the episode titled "Lenny"?`:
```sql
                SELECT MAX("prod_code") FROM "table1_22815870_1" WHERE "title"='\"Lenny\"';
```
## Task
Generate a SQL query to answer the following question:
`What is the original air date of the episode titled "Mom at the Bar/Train Buddy" that was written b Adrienne Carter? `

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "table1_22815870_1" (
  "series_num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "prod_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the original air date of the episode titled "Mom at the Bar/Train Buddy" that was written b Adrienne Carter? `:
```sql
                SELECT "original_air_date" FROM "table1_22815870_1" WHERE "written_by"='Adrienne Carter' AND "title"='\"Mom at the Bar/Train Buddy\"';
```
## Task
Generate a SQL query to answer the following question:
`What is the original air date of the episode titled "Commercial/Coach DMV"? `

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "table1_22815870_1" (
  "series_num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "prod_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the original air date of the episode titled "Commercial/Coach DMV"? `:
```sql
                SELECT "original_air_date" FROM "table1_22815870_1" WHERE "title"='\"Commercial/Coach DMV\"';
```
## Task
Generate a SQL query to answer the following question:
`How many counties have a population of 2266?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many counties have a population of 2266?`:
```sql
                SELECT COUNT("county") FROM "list_of_appalachian_regional_commission_" WHERE "population"=2266;
```
## Task
Generate a SQL query to answer the following question:
`How many statuses are listed for Wayne county? `

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many statuses are listed for Wayne county? `:
```sql
                SELECT COUNT("status") FROM "list_of_appalachian_regional_commission_" WHERE "county"='Wayne';
```
## Task
Generate a SQL query to answer the following question:
`What is the market income per capita in a county where the status is distressed and the unemployment rate is at 10.5%? `

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the market income per capita in a county where the status is distressed and the unemployment rate is at 10.5%? `:
```sql
                SELECT "market_income_per_capita" FROM "list_of_appalachian_regional_commission_" WHERE "status"='Distressed' AND "unemployment_rate"='10.5%';
```
## Task
Generate a SQL query to answer the following question:
`What is the status for all the counties that have a poverty rate of 36.6%? `

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the status for all the counties that have a poverty rate of 36.6%? `:
```sql
                SELECT "status" FROM "list_of_appalachian_regional_commission_" WHERE "poverty_rate"='36.6%';
```
## Task
Generate a SQL query to answer the following question:
`What is the status if the poverty rate is 11.4%?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the status if the poverty rate is 11.4%?`:
```sql
                SELECT "status" FROM "list_of_appalachian_regional_commission_" WHERE "poverty_rate"='11.4%';
```
## Task
Generate a SQL query to answer the following question:
`If the poverty rate is 12.9%, what is the county?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the poverty rate is 12.9%, what is the county?`:
```sql
                SELECT "county" FROM "list_of_appalachian_regional_commission_" WHERE "poverty_rate"='12.9%';
```
## Task
Generate a SQL query to answer the following question:
`What is the population maximum?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the population maximum?`:
```sql
                SELECT MAX("population") FROM "list_of_appalachian_regional_commission_";
```
## Task
Generate a SQL query to answer the following question:
`What county is the unemployment rate 4.8%?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What county is the unemployment rate 4.8%?`:
```sql
                SELECT "county" FROM "list_of_appalachian_regional_commission_" WHERE "unemployment_rate"='4.8%';
```
## Task
Generate a SQL query to answer the following question:
`If the poverty rate is 12.9%, what is the market income per capita?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "list_of_appalachian_regional_commission_" (
  "county" text,
  "population" real,
  "unemployment_rate" text,
  "market_income_per_capita" text,
  "poverty_rate" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the poverty rate is 12.9%, what is the market income per capita?`:
```sql
                SELECT "market_income_per_capita" FROM "list_of_appalachian_regional_commission_" WHERE "poverty_rate"='12.9%';
```
## Task
Generate a SQL query to answer the following question:
`Name the viewers for 2.1 rating`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "ratings_chart" (
  "order" real,
  "episode" text,
  "airdate" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "viewers_millions" text,
  "rank_night" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the viewers for 2.1 rating`:
```sql
                SELECT "viewers_millions" FROM "ratings_chart" WHERE "rating"='2.1';
```
## Task
Generate a SQL query to answer the following question:
`Name the most share for 2.76 million viewers `

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "ratings_chart" (
  "order" real,
  "episode" text,
  "airdate" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "viewers_millions" text,
  "rank_night" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most share for 2.76 million viewers `:
```sql
                SELECT MAX("share") FROM "ratings_chart" WHERE "viewers_millions"='2.76';
```
## Task
Generate a SQL query to answer the following question:
`Name the viewers for 1.2/4 rating`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "ratings_chart" (
  "order" real,
  "episode" text,
  "airdate" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "viewers_millions" text,
  "rank_night" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the viewers for 1.2/4 rating`:
```sql
                SELECT "viewers_millions" FROM "ratings_chart" WHERE "rating_share_18_49"='1.2/4';
```
## Task
Generate a SQL query to answer the following question:
`Name the rating for 3.79 viewers`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "ratings_chart" (
  "order" real,
  "episode" text,
  "airdate" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "viewers_millions" text,
  "rank_night" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the rating for 3.79 viewers`:
```sql
                SELECT "rating_share_18_49" FROM "ratings_chart" WHERE "viewers_millions"='3.79';
```
## Task
Generate a SQL query to answer the following question:
`Name the least europa league`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "top_scorers" (
  "r" real,
  "player" text,
  "scottish_premier_league" real,
  "scottish_cup" real,
  "scottish_league_cup" real,
  "champions_league_qualifying" real,
  "europa_league" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least europa league`:
```sql
                SELECT MIN("europa_league") FROM "top_scorers";
```
## Task
Generate a SQL query to answer the following question:
`Name the max total for aiden mcgeady`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "top_scorers" (
  "r" real,
  "player" text,
  "scottish_premier_league" real,
  "scottish_cup" real,
  "scottish_league_cup" real,
  "champions_league_qualifying" real,
  "europa_league" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the max total for aiden mcgeady`:
```sql
                SELECT MAX("total") FROM "top_scorers" WHERE "player"='Aiden McGeady';
```
## Task
Generate a SQL query to answer the following question:
`Name the scottish premier league georgios samaras`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "top_scorers" (
  "r" real,
  "player" text,
  "scottish_premier_league" real,
  "scottish_cup" real,
  "scottish_league_cup" real,
  "champions_league_qualifying" real,
  "europa_league" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the scottish premier league georgios samaras`:
```sql
                SELECT "scottish_premier_league" FROM "top_scorers" WHERE "player"='Georgios Samaras';
```
## Task
Generate a SQL query to answer the following question:
`Name the total number of r for josh thompson`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "top_scorers" (
  "r" real,
  "player" text,
  "scottish_premier_league" real,
  "scottish_cup" real,
  "scottish_league_cup" real,
  "champions_league_qualifying" real,
  "europa_league" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of r for josh thompson`:
```sql
                SELECT COUNT("r") FROM "top_scorers" WHERE "player"='Josh Thompson';
```
## Task
Generate a SQL query to answer the following question:
`What was the total number of rebounds on november 27?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "game_log" (
  "game" real,
  "date" text,
  "team" text,
  "score" text,
  "high_points" text,
  "high_rebounds" text,
  "high_assists" text,
  "location_attendance" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the total number of rebounds on november 27?`:
```sql
                SELECT COUNT("high_rebounds") FROM "game_log" WHERE "date"='November 27';
```
## Task
Generate a SQL query to answer the following question:
`On what date did the Pistons play @ toronto?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "game_log" (
  "game" real,
  "date" text,
  "team" text,
  "score" text,
  "high_points" text,
  "high_rebounds" text,
  "high_assists" text,
  "location_attendance" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date did the Pistons play @ toronto?`:
```sql
                SELECT "date" FROM "game_log" WHERE "team"='@ Toronto';
```
## Task
Generate a SQL query to answer the following question:
`List the location and number of fans in attendance for game 7/`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "game_log" (
  "game" real,
  "date" text,
  "team" text,
  "score" text,
  "high_points" text,
  "high_rebounds" text,
  "high_assists" text,
  "location_attendance" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `List the location and number of fans in attendance for game 7/`:
```sql
                SELECT COUNT("location_attendance") FROM "game_log" WHERE "game"=7;
```
## Task
Generate a SQL query to answer the following question:
`How many interceptions for the team who played 31 games?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "player_stats" (
  "player" text,
  "games_played" real,
  "field_goals" real,
  "free_throws" real,
  "rebounds" real,
  "assists" real,
  "blocks" real,
  "steals" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many interceptions for the team who played 31 games?`:
```sql
                SELECT "steals" FROM "player_stats" WHERE "games_played"=31;
```
## Task
Generate a SQL query to answer the following question:
`How many steals for the player who had 121 rebounds?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "player_stats" (
  "player" text,
  "games_played" real,
  "field_goals" real,
  "free_throws" real,
  "rebounds" real,
  "assists" real,
  "blocks" real,
  "steals" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many steals for the player who had 121 rebounds?`:
```sql
                SELECT MIN("steals") FROM "player_stats" WHERE "rebounds"=121;
```
## Task
Generate a SQL query to answer the following question:
`What date was the Piston's record at 23-47?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "game_log" (
  "game" real,
  "date" text,
  "team" text,
  "score" text,
  "high_points" text,
  "high_rebounds" text,
  "high_assists" text,
  "location_attendance" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the Piston's record at 23-47?`:
```sql
                SELECT "date" FROM "game_log" WHERE "record"='23-47';
```
## Task
Generate a SQL query to answer the following question:
`Who had the highest rebounds during the game with a record of 23-47?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "game_log" (
  "game" real,
  "date" text,
  "team" text,
  "score" text,
  "high_points" text,
  "high_rebounds" text,
  "high_assists" text,
  "location_attendance" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had the highest rebounds during the game with a record of 23-47?`:
```sql
                SELECT "high_rebounds" FROM "game_log" WHERE "record"='23-47';
```
## Task
Generate a SQL query to answer the following question:
`How many rebound did the person who scored 147 points have?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "player_stats" (
  "player" text,
  "games_played" real,
  "minutes" real,
  "field_goals" real,
  "three_pointers" real,
  "free_throws" real,
  "rebounds" real,
  "assists" real,
  "blocks" real,
  "steals" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many rebound did the person who scored 147 points have?`:
```sql
                SELECT COUNT("rebounds") FROM "player_stats" WHERE "points"=147;
```
## Task
Generate a SQL query to answer the following question:
`Of the players with 50 free throws, what is the lowest number of three pointers?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "player_stats" (
  "player" text,
  "games_played" real,
  "minutes" real,
  "field_goals" real,
  "three_pointers" real,
  "free_throws" real,
  "rebounds" real,
  "assists" real,
  "blocks" real,
  "steals" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Of the players with 50 free throws, what is the lowest number of three pointers?`:
```sql
                SELECT MIN("three_pointers") FROM "player_stats" WHERE "free_throws"=50;
```
## Task
Generate a SQL query to answer the following question:
`Who are all the players with 156 rebounds?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "player_stats" (
  "player" text,
  "games_played" real,
  "minutes" real,
  "field_goals" real,
  "three_pointers" real,
  "free_throws" real,
  "rebounds" real,
  "assists" real,
  "blocks" real,
  "steals" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who are all the players with 156 rebounds?`:
```sql
                SELECT "player" FROM "player_stats" WHERE "rebounds"=156;
```
## Task
Generate a SQL query to answer the following question:
`Of the players who scored 5 three pointers, what is the highest number of games played?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "player_stats" (
  "player" text,
  "games_played" real,
  "minutes" real,
  "field_goals" real,
  "three_pointers" real,
  "free_throws" real,
  "rebounds" real,
  "assists" real,
  "blocks" real,
  "steals" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Of the players who scored 5 three pointers, what is the highest number of games played?`:
```sql
                SELECT MAX("games_played") FROM "player_stats" WHERE "three_pointers"=5;
```