cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`When 2005 is the year played what is the lowest year drafted?`

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

CREATE TABLE "florida_league_alumni_top_5_round_picks_" (
  "player" text,
  "fcsl_team" text,
  "years_played" text,
  "year_drafted" real,
  "round" text,
  "mlb_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 2005 is the year played what is the lowest year drafted?`:
```sql
                SELECT MIN("year_drafted") FROM "florida_league_alumni_top_5_round_picks_" WHERE "years_played"='2005';
```
## Task
Generate a SQL query to answer the following question:
`When winter pines is the fcsl team how many mlb teams are there?`

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

CREATE TABLE "florida_league_alumni_top_5_round_picks_" (
  "player" text,
  "fcsl_team" text,
  "years_played" text,
  "year_drafted" real,
  "round" text,
  "mlb_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `When winter pines is the fcsl team how many mlb teams are there?`:
```sql
                SELECT COUNT("mlb_team") FROM "florida_league_alumni_top_5_round_picks_" WHERE "fcsl_team"='Winter Pines';
```
## Task
Generate a SQL query to answer the following question:
`When 2006 is the year played and winter park is the fcsl team who is the player?`

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

CREATE TABLE "florida_league_alumni_top_5_round_picks_" (
  "player" text,
  "fcsl_team" text,
  "years_played" text,
  "year_drafted" real,
  "round" text,
  "mlb_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 2006 is the year played and winter park is the fcsl team who is the player?`:
```sql
                SELECT "player" FROM "florida_league_alumni_top_5_round_picks_" WHERE "fcsl_team"='Winter Park' AND "years_played"='2006';
```
## Task
Generate a SQL query to answer the following question:
`Which operators offer a genre of music?`

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

CREATE TABLE "table1_1837570_1" (
  "frequency_in_kuala_lumpur_selangor_putrajaya_and_environs" text,
  "station" text,
  "operator" text,
  "language" text,
  "genre" text,
  "coverage_area" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which operators offer a genre of music?`:
```sql
                SELECT "operator" FROM "table1_1837570_1" WHERE "genre"='music';
```
## Task
Generate a SQL query to answer the following question:
`Which languages are offered in the coverage area of klang petaling jaya shah alam?`

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

CREATE TABLE "table1_1837570_1" (
  "frequency_in_kuala_lumpur_selangor_putrajaya_and_environs" text,
  "station" text,
  "operator" text,
  "language" text,
  "genre" text,
  "coverage_area" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which languages are offered in the coverage area of klang petaling jaya shah alam?`:
```sql
                SELECT "language" FROM "table1_1837570_1" WHERE "coverage_area"='Klang Petaling Jaya Shah Alam';
```
## Task
Generate a SQL query to answer the following question:
`Name the macedonian for  il/elle avait entendu`

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

CREATE TABLE "table_of_forms" (
  "english" text,
  "german" text,
  "dutch" text,
  "latin" text,
  "romanian" text,
  "portuguese" text,
  "spanish" text,
  "italian" text,
  "french" text,
  "greek_modern" text,
  "bulgarian" text,
  "macedonian" text,
  "polish_extinct" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the macedonian for  il/elle avait entendu`:
```sql
                SELECT "macedonian" FROM "table_of_forms" WHERE "french"='il/elle avait entendu';
```
## Task
Generate a SQL query to answer the following question:
`Name the greek modern for  słyszałeś był / słyszałaś była`

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

CREATE TABLE "table_of_forms" (
  "english" text,
  "german" text,
  "dutch" text,
  "latin" text,
  "romanian" text,
  "portuguese" text,
  "spanish" text,
  "italian" text,
  "french" text,
  "greek_modern" text,
  "bulgarian" text,
  "macedonian" text,
  "polish_extinct" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the greek modern for  słyszałeś był / słyszałaś była`:
```sql
                SELECT "greek_modern" FROM "table_of_forms" WHERE "polish_extinct"='słyszałeś był / słyszałaś była';
```
## Task
Generate a SQL query to answer the following question:
`Name the bulgarian for  jullie hadden gehoord`

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

CREATE TABLE "table_of_forms" (
  "english" text,
  "german" text,
  "dutch" text,
  "latin" text,
  "romanian" text,
  "portuguese" text,
  "spanish" text,
  "italian" text,
  "french" text,
  "greek_modern" text,
  "bulgarian" text,
  "macedonian" text,
  "polish_extinct" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the bulgarian for  jullie hadden gehoord`:
```sql
                SELECT "bulgarian" FROM "table_of_forms" WHERE "dutch"='jullie hadden gehoord';
```
## Task
Generate a SQL query to answer the following question:
`Name the english for  j'avais entendu`

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

CREATE TABLE "table_of_forms" (
  "english" text,
  "german" text,
  "dutch" text,
  "latin" text,
  "romanian" text,
  "portuguese" text,
  "spanish" text,
  "italian" text,
  "french" text,
  "greek_modern" text,
  "bulgarian" text,
  "macedonian" text,
  "polish_extinct" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the english for  j'avais entendu`:
```sql
                SELECT "english" FROM "table_of_forms" WHERE "french"='j''avais entendu';
```
## Task
Generate a SQL query to answer the following question:
`What was the air date in the U.S. for the episode that had 1.452 million Canadian viewers?`

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

CREATE TABLE "table1_18424435_4" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "canadian_air_date" text,
  "u_s_air_date" text,
  "production_code" real,
  "canadian_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the air date in the U.S. for the episode that had 1.452 million Canadian viewers?`:
```sql
                SELECT "u_s_air_date" FROM "table1_18424435_4" WHERE "canadian_viewers_million"='1.452';
```
## Task
Generate a SQL query to answer the following question:
`What number episode in the series was directed by Kelly Makin and written by Mark Ellis & Stephanie Morgenstern?`

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

CREATE TABLE "table1_18424435_4" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "canadian_air_date" text,
  "u_s_air_date" text,
  "production_code" real,
  "canadian_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `What number episode in the series was directed by Kelly Makin and written by Mark Ellis & Stephanie Morgenstern?`:
```sql
                SELECT "no" FROM "table1_18424435_4" WHERE "directed_by"='Kelly Makin' AND "written_by"='Mark Ellis & Stephanie Morgenstern';
```
## Task
Generate a SQL query to answer the following question:
`What is the maximum number of episodes in the series listed?`

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

CREATE TABLE "table1_18424435_4" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "canadian_air_date" text,
  "u_s_air_date" text,
  "production_code" real,
  "canadian_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the maximum number of episodes in the series listed?`:
```sql
                SELECT MAX("no") FROM "table1_18424435_4";
```
## Task
Generate a SQL query to answer the following question:
`What is the total number of episodes listed with a production code of 306?`

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

CREATE TABLE "table1_18424435_4" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "canadian_air_date" text,
  "u_s_air_date" text,
  "production_code" real,
  "canadian_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of episodes listed with a production code of 306?`:
```sql
                SELECT COUNT("num") FROM "table1_18424435_4" WHERE "production_code"=306;
```
## Task
Generate a SQL query to answer the following question:
`Who directed the episode with a production code of 301?`

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

CREATE TABLE "table1_18424435_4" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "canadian_air_date" text,
  "u_s_air_date" text,
  "production_code" real,
  "canadian_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed the episode with a production code of 301?`:
```sql
                SELECT "directed_by" FROM "table1_18424435_4" WHERE "production_code"=301;
```
## Task
Generate a SQL query to answer the following question:
`Who wrote the episodes watched by 1.816 million people in Canada?`

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

CREATE TABLE "table1_18424435_3" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "canadian_air_date" text,
  "u_s_air_date" text,
  "production_code" real,
  "canadian_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who wrote the episodes watched by 1.816 million people in Canada?`:
```sql
                SELECT "written_by" FROM "table1_18424435_3" WHERE "canadian_viewers_million"='1.816';
```
## Task
Generate a SQL query to answer the following question:
`Who wrote the episodes watched by 1.575 million people in Canada?`

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

CREATE TABLE "table1_18424435_3" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "canadian_air_date" text,
  "u_s_air_date" text,
  "production_code" real,
  "canadian_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who wrote the episodes watched by 1.575 million people in Canada?`:
```sql
                SELECT "written_by" FROM "table1_18424435_3" WHERE "canadian_viewers_million"='1.575';
```
## Task
Generate a SQL query to answer the following question:
`Who directed the episode aired on February 27, 2009?`

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

CREATE TABLE "table1_18424435_3" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "canadian_air_date" text,
  "u_s_air_date" text,
  "production_code" real,
  "canadian_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed the episode aired on February 27, 2009?`:
```sql
                SELECT "directed_by" FROM "table1_18424435_3" WHERE "u_s_air_date"='February 27, 2009';
```
## Task
Generate a SQL query to answer the following question:
`Which episodes had production code 217?`

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

CREATE TABLE "table1_18424435_3" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "canadian_air_date" text,
  "u_s_air_date" text,
  "production_code" real,
  "canadian_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which episodes had production code 217?`:
```sql
                SELECT "title" FROM "table1_18424435_3" WHERE "production_code"=217;
```
## Task
Generate a SQL query to answer the following question:
`For upper Arlington, what was the median household income?`

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

CREATE TABLE "ohio_locations_ranked_by_per_capita_inco" (
  "rank" real,
  "place" text,
  "county" text,
  "per_capita_income" text,
  "median_house_hold_income" text,
  "population" real,
  "number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `For upper Arlington, what was the median household income?`:
```sql
                SELECT "median_house_hold_income" FROM "ohio_locations_ranked_by_per_capita_inco" WHERE "place"='Upper Arlington';
```
## Task
Generate a SQL query to answer the following question:
`With a per capita income of $30,298, what was the total number of households?`

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

CREATE TABLE "ohio_locations_ranked_by_per_capita_inco" (
  "rank" real,
  "place" text,
  "county" text,
  "per_capita_income" text,
  "median_house_hold_income" text,
  "population" real,
  "number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `With a per capita income of $30,298, what was the total number of households?`:
```sql
                SELECT COUNT("number_of_households") FROM "ohio_locations_ranked_by_per_capita_inco" WHERE "per_capita_income"='$30,298';
```
## Task
Generate a SQL query to answer the following question:
`If the population is 2188, what was the median household income?`

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

CREATE TABLE "ohio_locations_ranked_by_per_capita_inco" (
  "rank" real,
  "place" text,
  "county" text,
  "per_capita_income" text,
  "median_house_hold_income" text,
  "population" real,
  "number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `If the population is 2188, what was the median household income?`:
```sql
                SELECT "median_house_hold_income" FROM "ohio_locations_ranked_by_per_capita_inco" WHERE "population"=2188;
```
## Task
Generate a SQL query to answer the following question:
`For Pigeon Creek what is the per capita income?`

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

CREATE TABLE "ohio_locations_ranked_by_per_capita_inco" (
  "rank" real,
  "place" text,
  "county" text,
  "per_capita_income" text,
  "median_house_hold_income" text,
  "population" real,
  "number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `For Pigeon Creek what is the per capita income?`:
```sql
                SELECT "per_capita_income" FROM "ohio_locations_ranked_by_per_capita_inco" WHERE "place"='Pigeon Creek';
```
## Task
Generate a SQL query to answer the following question:
`If the median income is $57,407, what is the per capita income?`

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

CREATE TABLE "ohio_locations_ranked_by_per_capita_inco" (
  "rank" real,
  "place" text,
  "county" text,
  "per_capita_income" text,
  "median_house_hold_income" text,
  "population" real,
  "number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `If the median income is $57,407, what is the per capita income?`:
```sql
                SELECT "per_capita_income" FROM "ohio_locations_ranked_by_per_capita_inco" WHERE "median_house_hold_income"='$57,407';
```
## Task
Generate a SQL query to answer the following question:
`How many production codes have the title "the better man"?`

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

CREATE TABLE "table1_18424435_5" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "canadian_air_date" text,
  "u_s_air_date" text,
  "production_code" real,
  "canadian_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many production codes have the title "the better man"?`:
```sql
                SELECT COUNT("production_code") FROM "table1_18424435_5" WHERE "title"='\"The Better Man\"';
```
## Task
Generate a SQL query to answer the following question:
`Who directed the episode that aired on July 29, 2011?`

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

CREATE TABLE "table1_18424435_5" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "canadian_air_date" text,
  "u_s_air_date" text,
  "production_code" real,
  "canadian_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed the episode that aired on July 29, 2011?`:
```sql
                SELECT "directed_by" FROM "table1_18424435_5" WHERE "u_s_air_date"='July 29, 2011';
```
## Task
Generate a SQL query to answer the following question:
`How many air dates where directed by jim donovan?`

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

CREATE TABLE "table1_18424435_5" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "canadian_air_date" text,
  "u_s_air_date" text,
  "production_code" real,
  "canadian_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many air dates where directed by jim donovan?`:
```sql
                SELECT COUNT("u_s_air_date") FROM "table1_18424435_5" WHERE "directed_by"='Jim Donovan';
```
## Task
Generate a SQL query to answer the following question:
`What is the smallest number?`

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

CREATE TABLE "table1_18424435_5" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "canadian_air_date" text,
  "u_s_air_date" text,
  "production_code" real,
  "canadian_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest number?`:
```sql
                SELECT MIN("num") FROM "table1_18424435_5";
```
## Task
Generate a SQL query to answer the following question:
`Which air dates have 1.229 canadian viewers (millions)?`

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

CREATE TABLE "table1_18424435_5" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "canadian_air_date" text,
  "u_s_air_date" text,
  "production_code" real,
  "canadian_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which air dates have 1.229 canadian viewers (millions)?`:
```sql
                SELECT "u_s_air_date" FROM "table1_18424435_5" WHERE "canadian_viewers_million"='1.229';
```
## Task
Generate a SQL query to answer the following question:
`In what district is the city listed in Serial number 9?`

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

CREATE TABLE "punjab" (
  "serial_no" real,
  "district" text,
  "headquartered_city" text,
  "city_population_2009" real,
  "city_area_km_2" real
);
### SQL
Given the database schema, here is the SQL query that answers `In what district is the city listed in Serial number 9?`:
```sql
                SELECT COUNT("district") FROM "punjab" WHERE "serial_no"=9;
```
## Task
Generate a SQL query to answer the following question:
`What is the area of the city in the Sargodha district?`

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

CREATE TABLE "punjab" (
  "serial_no" real,
  "district" text,
  "headquartered_city" text,
  "city_population_2009" real,
  "city_area_km_2" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the area of the city in the Sargodha district?`:
```sql
                SELECT COUNT("city_area_km_2") FROM "punjab" WHERE "district"='Sargodha District';
```
## Task
Generate a SQL query to answer the following question:
`What is the smallest city area?`

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

CREATE TABLE "punjab" (
  "serial_no" real,
  "district" text,
  "headquartered_city" text,
  "city_population_2009" real,
  "city_area_km_2" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest city area?`:
```sql
                SELECT MIN("city_area_km_2") FROM "punjab";
```
## Task
Generate a SQL query to answer the following question:
`If Di Drew is the director, what was the original air date for episode A Whole Lot to Lose?`

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

CREATE TABLE "episodes" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `If Di Drew is the director, what was the original air date for episode A Whole Lot to Lose?`:
```sql
                SELECT "original_air_date" FROM "episodes" WHERE "directed_by"='Di Drew';
```
## Task
Generate a SQL query to answer the following question:
`What is the population (2010 census) if s barangay is 51?`

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

CREATE TABLE "administrative_districts" (
  "district" text,
  "s_barangay" real,
  "population_2010_census" real,
  "area_has" text,
  "pop_density_per_km2" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the population (2010 census) if s barangay is 51?`:
```sql
                SELECT COUNT("population_2010_census") FROM "administrative_districts" WHERE "s_barangay"=51;
```
## Task
Generate a SQL query to answer the following question:
`What is the population  (2010 census) if the area is 66.11?`

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

CREATE TABLE "administrative_districts" (
  "district" text,
  "s_barangay" real,
  "population_2010_census" real,
  "area_has" text,
  "pop_density_per_km2" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the population  (2010 census) if the area is 66.11?`:
```sql
                SELECT MIN("population_2010_census") FROM "administrative_districts" WHERE "area_has"='66.11';
```
## Task
Generate a SQL query to answer the following question:
`How many entered the match with a time of 14:42? `

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

CREATE TABLE "elimination_chamber_entrances_and_elimin" (
  "eliminated" real,
  "wrestler" text,
  "entered" real,
  "eliminated_by" text,
  "method_of_elimination" text,
  "time" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many entered the match with a time of 14:42? `:
```sql
                SELECT "entered" FROM "elimination_chamber_entrances_and_elimin" WHERE "time"='14:42';
```
## Task
Generate a SQL query to answer the following question:
`What was the time for the match with Cena? `

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

CREATE TABLE "elimination_chamber_entrances_and_elimin" (
  "eliminated" real,
  "wrestler" text,
  "entered" real,
  "eliminated_by" text,
  "method_of_elimination" text,
  "time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the time for the match with Cena? `:
```sql
                SELECT "time" FROM "elimination_chamber_entrances_and_elimin" WHERE "wrestler"='Cena';
```
## Task
Generate a SQL query to answer the following question:
`What was the time of the match where Chris Jericho eliminated the wrestler? `

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

CREATE TABLE "elimination_chamber_entrances_and_elimin" (
  "eliminated" real,
  "wrestler" text,
  "entered" real,
  "eliminated_by" text,
  "method_of_elimination" text,
  "time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the time of the match where Chris Jericho eliminated the wrestler? `:
```sql
                SELECT "time" FROM "elimination_chamber_entrances_and_elimin" WHERE "eliminated_by"='Chris Jericho';
```
## Task
Generate a SQL query to answer the following question:
`What are all the stations with a license in Cincinnati?`

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

CREATE TABLE "television_stations" (
  "city_of_license_market" text,
  "station" text,
  "channel_tv_rf" text,
  "owned_since" real,
  "affiliation" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are all the stations with a license in Cincinnati?`:
```sql
                SELECT "station" FROM "television_stations" WHERE "city_of_license_market"='Cincinnati';
```
## Task
Generate a SQL query to answer the following question:
`What station is affiliated with kmgh-tv?`

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

CREATE TABLE "television_stations" (
  "city_of_license_market" text,
  "station" text,
  "channel_tv_rf" text,
  "owned_since" real,
  "affiliation" text
);
### SQL
Given the database schema, here is the SQL query that answers `What station is affiliated with kmgh-tv?`:
```sql
                SELECT "affiliation" FROM "television_stations" WHERE "station"='KMGH-TV';
```
## Task
Generate a SQL query to answer the following question:
`How many stations have been owned since wfts-tv?`

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

CREATE TABLE "television_stations" (
  "city_of_license_market" text,
  "station" text,
  "channel_tv_rf" text,
  "owned_since" real,
  "affiliation" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many stations have been owned since wfts-tv?`:
```sql
                SELECT "owned_since" FROM "television_stations" WHERE "station"='WFTS-TV';
```
## Task
Generate a SQL query to answer the following question:
`What city of license/market has the channel of 41?`

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

CREATE TABLE "television_stations" (
  "city_of_license_market" text,
  "station" text,
  "channel_tv_rf" text,
  "owned_since" real,
  "affiliation" text
);
### SQL
Given the database schema, here is the SQL query that answers `What city of license/market has the channel of 41?`:
```sql
                SELECT "city_of_license_market" FROM "television_stations" WHERE "channel_tv_rf"='41';
```
## Task
Generate a SQL query to answer the following question:
`What is the minimum stations owned since kero-tv?`

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

CREATE TABLE "television_stations" (
  "city_of_license_market" text,
  "station" text,
  "channel_tv_rf" text,
  "owned_since" real,
  "affiliation" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the minimum stations owned since kero-tv?`:
```sql
                SELECT MIN("owned_since") FROM "television_stations" WHERE "station"='KERO-TV';
```
## Task
Generate a SQL query to answer the following question:
`What is the lyric fm for rnag 93.2?`

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

CREATE TABLE "main_sites" (
  "transmitter" text,
  "service_area" text,
  "radio_1_m_hz" text,
  "2_fm_m_hz" text,
  "rna_g_m_hz" text,
  "lyric_fm_m_hz" text,
  "erp_k_w" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lyric fm for rnag 93.2?`:
```sql
                SELECT "lyric_fm_m_hz" FROM "main_sites" WHERE "rna_g_m_hz"='93.2';
```
## Task
Generate a SQL query to answer the following question:
`What are the 2fm's for erp 16?`

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

CREATE TABLE "main_sites" (
  "transmitter" text,
  "service_area" text,
  "radio_1_m_hz" text,
  "2_fm_m_hz" text,
  "rna_g_m_hz" text,
  "lyric_fm_m_hz" text,
  "erp_k_w" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the 2fm's for erp 16?`:
```sql
                SELECT "2_fm_m_hz" FROM "main_sites" WHERE "erp_k_w"='16';
```
## Task
Generate a SQL query to answer the following question:
`What is the rnag for kippure transmitter? `

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

CREATE TABLE "main_sites" (
  "transmitter" text,
  "service_area" text,
  "radio_1_m_hz" text,
  "2_fm_m_hz" text,
  "rna_g_m_hz" text,
  "lyric_fm_m_hz" text,
  "erp_k_w" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rnag for kippure transmitter? `:
```sql
                SELECT "rna_g_m_hz" FROM "main_sites" WHERE "transmitter"='Kippure';
```
## Task
Generate a SQL query to answer the following question:
`What is the rnag for  lyric fm 98.7? `

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

CREATE TABLE "main_sites" (
  "transmitter" text,
  "service_area" text,
  "radio_1_m_hz" text,
  "2_fm_m_hz" text,
  "rna_g_m_hz" text,
  "lyric_fm_m_hz" text,
  "erp_k_w" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rnag for  lyric fm 98.7? `:
```sql
                SELECT "rna_g_m_hz" FROM "main_sites" WHERE "lyric_fm_m_hz"='98.7';
```
## Task
Generate a SQL query to answer the following question:
`What is the 2fm for rnag 94.4?`

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

CREATE TABLE "main_sites" (
  "transmitter" text,
  "service_area" text,
  "radio_1_m_hz" text,
  "2_fm_m_hz" text,
  "rna_g_m_hz" text,
  "lyric_fm_m_hz" text,
  "erp_k_w" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 2fm for rnag 94.4?`:
```sql
                SELECT "2_fm_m_hz" FROM "main_sites" WHERE "rna_g_m_hz"='94.4';
```
## Task
Generate a SQL query to answer the following question:
`How many reasons were given when A. Willis Robertson (D) resigned?`

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

CREATE TABLE "senate" (
  "state_class" text,
  "vacator" text,
  "reason_for_change" text,
  "successor" text,
  "date_of_successors_formal_installation" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many reasons were given when A. Willis Robertson (D) resigned?`:
```sql
                SELECT COUNT("reason_for_change") FROM "senate" WHERE "vacator"='A. Willis Robertson (D)';
```
## Task
Generate a SQL query to answer the following question:
`Who vacated his post when his successor was formally installed on May 11, 1966?`

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

CREATE TABLE "senate" (
  "state_class" text,
  "vacator" text,
  "reason_for_change" text,
  "successor" text,
  "date_of_successors_formal_installation" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who vacated his post when his successor was formally installed on May 11, 1966?`:
```sql
                SELECT "vacator" FROM "senate" WHERE "date_of_successors_formal_installation"='May 11, 1966';
```
## Task
Generate a SQL query to answer the following question:
`What was the state (class) where the new successor was formally installed on May 11, 1966?`

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

CREATE TABLE "senate" (
  "state_class" text,
  "vacator" text,
  "reason_for_change" text,
  "successor" text,
  "date_of_successors_formal_installation" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the state (class) where the new successor was formally installed on May 11, 1966?`:
```sql
                SELECT "state_class" FROM "senate" WHERE "date_of_successors_formal_installation"='May 11, 1966';
```
## Task
Generate a SQL query to answer the following question:
`When abba is the artist what is the album?`

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

CREATE TABLE "best_selling_albums_in_the_uk" (
  "no" real,
  "album" text,
  "artist" text,
  "record_label" text,
  "released" text,
  "chart_peak" real,
  "number_of_times_certified_platinum" text
);
### SQL
Given the database schema, here is the SQL query that answers `When abba is the artist what is the album?`:
```sql
                SELECT "album" FROM "best_selling_albums_in_the_uk" WHERE "artist"='ABBA';
```
## Task
Generate a SQL query to answer the following question:
`When 35 is the number what is the album?`

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

CREATE TABLE "best_selling_albums_in_the_uk" (
  "no" real,
  "album" text,
  "artist" text,
  "record_label" text,
  "released" text,
  "chart_peak" real,
  "number_of_times_certified_platinum" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 35 is the number what is the album?`:
```sql
                SELECT "album" FROM "best_selling_albums_in_the_uk" WHERE "no"=35;
```
## Task
Generate a SQL query to answer the following question:
`When bat out of hell is the album what is the lowest number?`

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

CREATE TABLE "best_selling_albums_in_the_uk" (
  "no" real,
  "album" text,
  "artist" text,
  "record_label" text,
  "released" text,
  "chart_peak" real,
  "number_of_times_certified_platinum" text
);
### SQL
Given the database schema, here is the SQL query that answers `When bat out of hell is the album what is the lowest number?`:
```sql
                SELECT MIN("no") FROM "best_selling_albums_in_the_uk" WHERE "album"='Bat Out of Hell';
```
## Task
Generate a SQL query to answer the following question:
`When cannot handle non-empty timestamp argument! 2007 is released what is the no.?  `

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

CREATE TABLE "best_selling_albums_in_the_uk" (
  "no" real,
  "album" text,
  "artist" text,
  "record_label" text,
  "released" text,
  "chart_peak" real,
  "number_of_times_certified_platinum" text
);
### SQL
Given the database schema, here is the SQL query that answers `When cannot handle non-empty timestamp argument! 2007 is released what is the no.?  `:
```sql
                SELECT "no" FROM "best_selling_albums_in_the_uk" WHERE "released"='Cannot handle non-empty timestamp argument! 2007';
```
## Task
Generate a SQL query to answer the following question:
`Which district did Ralph Harvey (r) vacated when he resigned?`

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

CREATE TABLE "table1_1847180_4" (
  "district" text,
  "vacator" text,
  "reason_for_change" text,
  "successor" text,
  "date_successor_seated" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which district did Ralph Harvey (r) vacated when he resigned?`:
```sql
                SELECT "district" FROM "table1_1847180_4" WHERE "vacator"='Ralph Harvey (R)';
```
## Task
Generate a SQL query to answer the following question:
`Who did Walter B. Jones, Sr. (d) succeeded in office?`

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

CREATE TABLE "table1_1847180_4" (
  "district" text,
  "vacator" text,
  "reason_for_change" text,
  "successor" text,
  "date_successor_seated" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who did Walter B. Jones, Sr. (d) succeeded in office?`:
```sql
                SELECT "vacator" FROM "table1_1847180_4" WHERE "successor"='Walter B. Jones, Sr. (D)';
```
## Task
Generate a SQL query to answer the following question:
`What number episode in the series was titled "Never the Bride"?`

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

CREATE TABLE "table1_18481791_2" (
  "no_in_series" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "u_s_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What number episode in the series was titled "Never the Bride"?`:
```sql
                SELECT "no_in_series" FROM "table1_18481791_2" WHERE "title"='\"Never the Bride\"';
```
## Task
Generate a SQL query to answer the following question:
`Who wrote the episode titled "Trojan Horst"?`

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

CREATE TABLE "table1_18481791_2" (
  "no_in_series" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "u_s_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who wrote the episode titled "Trojan Horst"?`:
```sql
                SELECT "written_by" FROM "table1_18481791_2" WHERE "title"='\"Trojan Horst\"';
```
## Task
Generate a SQL query to answer the following question:
`What was the title of the episode directed by John T. Kretchmer? `

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

CREATE TABLE "table1_18481791_2" (
  "no_in_series" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "u_s_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the title of the episode directed by John T. Kretchmer? `:
```sql
                SELECT "title" FROM "table1_18481791_2" WHERE "directed_by"='John T. Kretchmer';
```
## Task
Generate a SQL query to answer the following question:
`How many seasons were directed by Bryan Spicer?`

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

CREATE TABLE "table1_18481791_3" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "u_s_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many seasons were directed by Bryan Spicer?`:
```sql
                SELECT MIN("no_in_season") FROM "table1_18481791_3" WHERE "directed_by"='Bryan Spicer';
```
## Task
Generate a SQL query to answer the following question:
`What is the title of series 23?`

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

CREATE TABLE "table1_18481791_3" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "u_s_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the title of series 23?`:
```sql
                SELECT "title" FROM "table1_18481791_3" WHERE "no_in_series"=23;
```
## Task
Generate a SQL query to answer the following question:
`When did the title "training video" originally air?`

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

CREATE TABLE "table1_18481791_3" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "u_s_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the title "training video" originally air?`:
```sql
                SELECT "original_air_date" FROM "table1_18481791_3" WHERE "title"='\"Training Video\"';
```
## Task
Generate a SQL query to answer the following question:
`Who directed season 1?`

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

CREATE TABLE "table1_18481791_3" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "u_s_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed season 1?`:
```sql
                SELECT "directed_by" FROM "table1_18481791_3" WHERE "no_in_season"=1;
```
## Task
Generate a SQL query to answer the following question:
`What is the title when u.s. viewers (millions) is 3.97?`

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

CREATE TABLE "table1_18481791_3" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "u_s_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the title when u.s. viewers (millions) is 3.97?`:
```sql
                SELECT "title" FROM "table1_18481791_3" WHERE "u_s_viewers_in_millions"='3.97';
```
## Task
Generate a SQL query to answer the following question:
`how many people commentated where broadcaster is orf`

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

CREATE TABLE "table1_184803_4" (
  "voting_order" real,
  "country" text,
  "spokespersons" text,
  "commentator" text,
  "broadcaster" text
);
### SQL
Given the database schema, here is the SQL query that answers `how many people commentated where broadcaster is orf`:
```sql
                SELECT COUNT("commentator") FROM "table1_184803_4" WHERE "broadcaster"='ORF';
```
## Task
Generate a SQL query to answer the following question:
`list the spokespersons where voting order is 9`

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

CREATE TABLE "table1_184803_4" (
  "voting_order" real,
  "country" text,
  "spokespersons" text,
  "commentator" text,
  "broadcaster" text
);
### SQL
Given the database schema, here is the SQL query that answers `list the spokespersons where voting order is 9`:
```sql
                SELECT "spokespersons" FROM "table1_184803_4" WHERE "voting_order"=9;
```
## Task
Generate a SQL query to answer the following question:
`which countries were commentated on by gordana bonetti`

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

CREATE TABLE "table1_184803_4" (
  "voting_order" real,
  "country" text,
  "spokespersons" text,
  "commentator" text,
  "broadcaster" text
);
### SQL
Given the database schema, here is the SQL query that answers `which countries were commentated on by gordana bonetti`:
```sql
                SELECT "country" FROM "table1_184803_4" WHERE "commentator"='Gordana Bonetti';
```
## Task
Generate a SQL query to answer the following question:
`wich spokesperson talked on luxembourg`

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

CREATE TABLE "table1_184803_4" (
  "voting_order" real,
  "country" text,
  "spokespersons" text,
  "commentator" text,
  "broadcaster" text
);
### SQL
Given the database schema, here is the SQL query that answers `wich spokesperson talked on luxembourg`:
```sql
                SELECT "spokespersons" FROM "table1_184803_4" WHERE "country"='Luxembourg';
```
## Task
Generate a SQL query to answer the following question:
`who was the commentator when spokesperson was claude darget`

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

CREATE TABLE "table1_184803_4" (
  "voting_order" real,
  "country" text,
  "spokespersons" text,
  "commentator" text,
  "broadcaster" text
);
### SQL
Given the database schema, here is the SQL query that answers `who was the commentator when spokesperson was claude darget`:
```sql
                SELECT "commentator" FROM "table1_184803_4" WHERE "spokespersons"='Claude Darget';
```
## Task
Generate a SQL query to answer the following question:
`List all institutions with a team name of the Cardinals. `

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

CREATE TABLE "membership" (
  "institution" text,
  "location" text,
  "founded" real,
  "years_in_iiac_approx" text,
  "team_nickname" text
);
### SQL
Given the database schema, here is the SQL query that answers `List all institutions with a team name of the Cardinals. `:
```sql
                SELECT "institution" FROM "membership" WHERE "team_nickname"='Cardinals';
```
## Task
Generate a SQL query to answer the following question:
`List the total number of institutions founded in Rock Island, Illinois.`

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

CREATE TABLE "membership" (
  "institution" text,
  "location" text,
  "founded" real,
  "years_in_iiac_approx" text,
  "team_nickname" text
);
### SQL
Given the database schema, here is the SQL query that answers `List the total number of institutions founded in Rock Island, Illinois.`:
```sql
                SELECT COUNT("founded") FROM "membership" WHERE "location"='Rock Island, Illinois';
```
## Task
Generate a SQL query to answer the following question:
`How many viewers in millions watched the episode 23:55 minutes long?`

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

CREATE TABLE "table1_1849243_1" (
  "episode" text,
  "broadcast_date" text,
  "run_time" text,
  "viewers_in_millions" text,
  "archive" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many viewers in millions watched the episode 23:55 minutes long?`:
```sql
                SELECT "viewers_in_millions" FROM "table1_1849243_1" WHERE "run_time"='23:55';
```
## Task
Generate a SQL query to answer the following question:
`What is the broadcast date of the 16mm t/r episode?`

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

CREATE TABLE "table1_1849243_1" (
  "episode" text,
  "broadcast_date" text,
  "run_time" text,
  "viewers_in_millions" text,
  "archive" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the broadcast date of the 16mm t/r episode?`:
```sql
                SELECT "broadcast_date" FROM "table1_1849243_1" WHERE "archive"='16mm t/r';
```
## Task
Generate a SQL query to answer the following question:
`How many viewers watched the 16mm t/r episode?`

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

CREATE TABLE "table1_1849243_1" (
  "episode" text,
  "broadcast_date" text,
  "run_time" text,
  "viewers_in_millions" text,
  "archive" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many viewers watched the 16mm t/r episode?`:
```sql
                SELECT "viewers_in_millions" FROM "table1_1849243_1" WHERE "archive"='16mm t/r';
```