cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`How many original air dates were there for episodes with a production code of 4398016?`

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

CREATE TABLE "table1_21164557_1" (
  "no_in_series" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" real,
  "u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many original air dates were there for episodes with a production code of 4398016?`:
```sql
                SELECT COUNT("original_air_date") FROM "table1_21164557_1" WHERE "production_code"=4398016;
```
## Task
Generate a SQL query to answer the following question:
`How many dates did the episode "out of sight" originally air on?`

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

CREATE TABLE "table1_21164557_1" (
  "no_in_series" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" real,
  "u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many dates did the episode "out of sight" originally air on?`:
```sql
                SELECT COUNT("original_air_date") FROM "table1_21164557_1" WHERE "title"='\"Out of Sight\"';
```
## Task
Generate a SQL query to answer the following question:
`Name the rank that premiered september 25, 2001`

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

CREATE TABLE "nielsen_ratings" (
  "season" real,
  "season_premiere" text,
  "season_finale" text,
  "tv_season" text,
  "rank" text,
  "viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the rank that premiered september 25, 2001`:
```sql
                SELECT "rank" FROM "nielsen_ratings" WHERE "season_premiere"='September 25, 2001';
```
## Task
Generate a SQL query to answer the following question:
`Name the rank for 14.80 viewers`

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

CREATE TABLE "nielsen_ratings" (
  "season" real,
  "season_premiere" text,
  "season_finale" text,
  "tv_season" text,
  "rank" text,
  "viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the rank for 14.80 viewers`:
```sql
                SELECT "rank" FROM "nielsen_ratings" WHERE "viewers_in_millions"='14.80';
```
## Task
Generate a SQL query to answer the following question:
`Name the number of rank for season 6`

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

CREATE TABLE "nielsen_ratings" (
  "season" real,
  "season_premiere" text,
  "season_finale" text,
  "tv_season" text,
  "rank" text,
  "viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the number of rank for season 6`:
```sql
                SELECT COUNT("rank") FROM "nielsen_ratings" WHERE "season"=6;
```
## Task
Generate a SQL query to answer the following question:
`What date did the episode with a production code of 4301085 originally air?`

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

CREATE TABLE "table1_21172539_1" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" real,
  "u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date did the episode with a production code of 4301085 originally air?`:
```sql
                SELECT "original_air_date" FROM "table1_21172539_1" WHERE "production_code"=4301085;
```
## Task
Generate a SQL query to answer the following question:
`What date did episode 15 of the season originally air?`

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

CREATE TABLE "table1_21172539_1" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" real,
  "u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date did episode 15 of the season originally air?`:
```sql
                SELECT "original_air_date" FROM "table1_21172539_1" WHERE "no_in_season"=15;
```
## Task
Generate a SQL query to answer the following question:
`How many items are listed under the column of U.S. viewers for episode "Bite Me"?`

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

CREATE TABLE "table1_21172539_1" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" real,
  "u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many items are listed under the column of U.S. viewers for episode "Bite Me"?`:
```sql
                SELECT COUNT("u_s_viewers_millions") FROM "table1_21172539_1" WHERE "title"='\"Bite Me\"';
```
## Task
Generate a SQL query to answer the following question:
`Name the remarks for sawhouse`

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

CREATE TABLE "nomenclature" (
  "chinese_industrial_designation" text,
  "export_type_designation" text,
  "nato_reporting_name" text,
  "nato_u_s_dod_code" text,
  "remarks" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the remarks for sawhouse`:
```sql
                SELECT "remarks" FROM "nomenclature" WHERE "nato_reporting_name"='SAWHOUSE';
```
## Task
Generate a SQL query to answer the following question:
`Name the nato/ us dod code for sabbot`

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

CREATE TABLE "nomenclature" (
  "chinese_industrial_designation" text,
  "export_type_designation" text,
  "nato_reporting_name" text,
  "nato_u_s_dod_code" text,
  "remarks" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the nato/ us dod code for sabbot`:
```sql
                SELECT "nato_u_s_dod_code" FROM "nomenclature" WHERE "nato_reporting_name"='SABBOT';
```
## Task
Generate a SQL query to answer the following question:
`When autodromo nazionale monza is the circuit what is the report?`

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

CREATE TABLE "race_calendar_and_results" (
  "round" real,
  "country" text,
  "circuit" text,
  "date" text,
  "pole_position" text,
  "fastest_lap" text,
  "winning_rider" text,
  "winning_team" text,
  "report" text
);
### SQL
Given the database schema, here is the SQL query that answers `When autodromo nazionale monza is the circuit what is the report?`:
```sql
                SELECT "report" FROM "race_calendar_and_results" WHERE "circuit"='Autodromo Nazionale Monza';
```
## Task
Generate a SQL query to answer the following question:
`When michele pirro is the pole position what is the date?`

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

CREATE TABLE "race_calendar_and_results" (
  "round" real,
  "country" text,
  "circuit" text,
  "date" text,
  "pole_position" text,
  "fastest_lap" text,
  "winning_rider" text,
  "winning_team" text,
  "report" text
);
### SQL
Given the database schema, here is the SQL query that answers `When michele pirro is the pole position what is the date?`:
```sql
                SELECT "date" FROM "race_calendar_and_results" WHERE "pole_position"='Michele Pirro';
```
## Task
Generate a SQL query to answer the following question:
`When Netherlands is the country what is the report? `

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

CREATE TABLE "race_calendar_and_results" (
  "round" real,
  "country" text,
  "circuit" text,
  "date" text,
  "pole_position" text,
  "fastest_lap" text,
  "winning_rider" text,
  "winning_team" text,
  "report" text
);
### SQL
Given the database schema, here is the SQL query that answers `When Netherlands is the country what is the report? `:
```sql
                SELECT "report" FROM "race_calendar_and_results" WHERE "country"='Netherlands';
```
## Task
Generate a SQL query to answer the following question:
`When circuit ricardo tormo is the circuit who is the winning team?`

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

CREATE TABLE "race_calendar_and_results" (
  "round" real,
  "country" text,
  "circuit" text,
  "date" text,
  "pole_position" text,
  "fastest_lap" text,
  "winning_rider" text,
  "winning_team" text,
  "report" text
);
### SQL
Given the database schema, here is the SQL query that answers `When circuit ricardo tormo is the circuit who is the winning team?`:
```sql
                SELECT "winning_team" FROM "race_calendar_and_results" WHERE "circuit"='Circuit Ricardo Tormo';
```
## Task
Generate a SQL query to answer the following question:
`When circuit ricardo tormo is the circuit what is the round?`

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

CREATE TABLE "race_calendar_and_results" (
  "round" real,
  "country" text,
  "circuit" text,
  "date" text,
  "pole_position" text,
  "fastest_lap" text,
  "winning_rider" text,
  "winning_team" text,
  "report" text
);
### SQL
Given the database schema, here is the SQL query that answers `When circuit ricardo tormo is the circuit what is the round?`:
```sql
                SELECT COUNT("round") FROM "race_calendar_and_results" WHERE "circuit"='Circuit Ricardo Tormo';
```
## Task
Generate a SQL query to answer the following question:
`How many opponents were there when the record was 6-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 `How many opponents were there when the record was 6-0?`:
```sql
                SELECT COUNT("opponent") FROM "schedule" WHERE "record"='6-0';
```
## Task
Generate a SQL query to answer the following question:
`How many opponents were there when the record was 6-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 `How many opponents were there when the record was 6-0?`:
```sql
                SELECT "date" FROM "schedule" WHERE "record"='6-0';
```
## Task
Generate a SQL query to answer the following question:
`What was the team record when the team played @ Utah?`

### 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 team record when the team played @ Utah?`:
```sql
                SELECT "record" FROM "schedule" WHERE "opponent"='@ Utah';
```
## Task
Generate a SQL query to answer the following question:
`How many points did the Cowboys have when they had a 7-0 record?`

### 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 points did the Cowboys have when they had a 7-0 record?`:
```sql
                SELECT "cowboys_points" FROM "schedule" WHERE "record"='7-0';
```
## Task
Generate a SQL query to answer the following question:
`Name the scoreboard for total being 23.5`

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

CREATE TABLE "table1_21234111_6" (
  "order" real,
  "couple" text,
  "karen" text,
  "nicky" text,
  "jason" text,
  "ruthie" text,
  "robin" text,
  "total" text,
  "scoreboard" text,
  "song" text,
  "public_vote_pct" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the scoreboard for total being 23.5`:
```sql
                SELECT "scoreboard" FROM "table1_21234111_6" WHERE "total"='23.5';
```
## Task
Generate a SQL query to answer the following question:
`Name the jason for public vote being 19.20%`

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

CREATE TABLE "table1_21234111_6" (
  "order" real,
  "couple" text,
  "karen" text,
  "nicky" text,
  "jason" text,
  "ruthie" text,
  "robin" text,
  "total" text,
  "scoreboard" text,
  "song" text,
  "public_vote_pct" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the jason for public vote being 19.20%`:
```sql
                SELECT "jason" FROM "table1_21234111_6" WHERE "public_vote_pct"='19.20%';
```
## Task
Generate a SQL query to answer the following question:
`Name the nicky for  " take a chance on me "– abba`

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

CREATE TABLE "table1_21234111_6" (
  "order" real,
  "couple" text,
  "karen" text,
  "nicky" text,
  "jason" text,
  "ruthie" text,
  "robin" text,
  "total" text,
  "scoreboard" text,
  "song" text,
  "public_vote_pct" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the nicky for  " take a chance on me "– abba`:
```sql
                SELECT "nicky" FROM "table1_21234111_6" WHERE "song"='\" Take a Chance on Me \"– ABBA';
```
## Task
Generate a SQL query to answer the following question:
`Name the number of song for scoreboard being 3rd`

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

CREATE TABLE "table1_21234111_6" (
  "order" real,
  "couple" text,
  "karen" text,
  "nicky" text,
  "jason" text,
  "ruthie" text,
  "robin" text,
  "total" text,
  "scoreboard" text,
  "song" text,
  "public_vote_pct" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the number of song for scoreboard being 3rd`:
```sql
                SELECT COUNT("song") FROM "table1_21234111_6" WHERE "scoreboard"='3rd';
```
## Task
Generate a SQL query to answer the following question:
`state the opponent on halliwell jones stadium in super league xiv`

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

CREATE TABLE "fixtures_and_results" (
  "competition" text,
  "round" text,
  "opponent" text,
  "result" text,
  "score" text,
  "home_away" text,
  "venue" text,
  "attendance" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `state the opponent on halliwell jones stadium in super league xiv`:
```sql
                SELECT "opponent" FROM "fixtures_and_results" WHERE "venue"='Halliwell Jones Stadium' AND "competition"='Super League XIV';
```
## Task
Generate a SQL query to answer the following question:
`how many venues were played on in round 1`

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

CREATE TABLE "fixtures_and_results" (
  "competition" text,
  "round" text,
  "opponent" text,
  "result" text,
  "score" text,
  "home_away" text,
  "venue" text,
  "attendance" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `how many venues were played on in round 1`:
```sql
                SELECT COUNT("venue") FROM "fixtures_and_results" WHERE "round"='1';
```
## Task
Generate a SQL query to answer the following question:
`state the round that had a game score 50-10`

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

CREATE TABLE "fixtures_and_results" (
  "competition" text,
  "round" text,
  "opponent" text,
  "result" text,
  "score" text,
  "home_away" text,
  "venue" text,
  "attendance" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `state the round that had a game score 50-10`:
```sql
                SELECT "round" FROM "fixtures_and_results" WHERE "score"='50-10';
```
## Task
Generate a SQL query to answer the following question:
`state the round that had a game attended attended by 9359 people`

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

CREATE TABLE "fixtures_and_results" (
  "competition" text,
  "round" text,
  "opponent" text,
  "result" text,
  "score" text,
  "home_away" text,
  "venue" text,
  "attendance" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `state the round that had a game attended attended by 9359 people`:
```sql
                SELECT "round" FROM "fixtures_and_results" WHERE "attendance"=9359;
```
## Task
Generate a SQL query to answer the following question:
`how many rounds had the score 44-22`

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

CREATE TABLE "fixtures_and_results" (
  "competition" text,
  "round" text,
  "opponent" text,
  "result" text,
  "score" text,
  "home_away" text,
  "venue" text,
  "attendance" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `how many rounds had the score 44-22`:
```sql
                SELECT COUNT("round") FROM "fixtures_and_results" WHERE "score"='44-22';
```
## Task
Generate a SQL query to answer the following question:
`what's the score against crusaders`

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

CREATE TABLE "fixtures_and_results" (
  "competition" text,
  "round" text,
  "opponent" text,
  "result" text,
  "score" text,
  "home_away" text,
  "venue" text,
  "attendance" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the score against crusaders`:
```sql
                SELECT "score" FROM "fixtures_and_results" WHERE "opponent"='Crusaders';
```
## Task
Generate a SQL query to answer the following question:
`How many Small catagories are there for the department that has a medium of 17101? `

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

CREATE TABLE "irrigation_infrastructure" (
  "department" text,
  "micro_10ha" real,
  "small_100ha" real,
  "medium_500ha" real,
  "big_500ha" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Small catagories are there for the department that has a medium of 17101? `:
```sql
                SELECT COUNT("small_100ha") FROM "irrigation_infrastructure" WHERE "medium_500ha"=17101;
```
## Task
Generate a SQL query to answer the following question:
`What is the total for Chuquisaca?`

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

CREATE TABLE "irrigation_infrastructure" (
  "department" text,
  "micro_10ha" real,
  "small_100ha" real,
  "medium_500ha" real,
  "big_500ha" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total for Chuquisaca?`:
```sql
                SELECT "total" FROM "irrigation_infrastructure" WHERE "department"='Chuquisaca';
```
## Task
Generate a SQL query to answer the following question:
`Which department has a small of 11370? `

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

CREATE TABLE "irrigation_infrastructure" (
  "department" text,
  "micro_10ha" real,
  "small_100ha" real,
  "medium_500ha" real,
  "big_500ha" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which department has a small of 11370? `:
```sql
                SELECT "department" FROM "irrigation_infrastructure" WHERE "small_100ha"=11370;
```
## Task
Generate a SQL query to answer the following question:
`How many total catagories are there for La Paz? `

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

CREATE TABLE "irrigation_infrastructure" (
  "department" text,
  "micro_10ha" real,
  "small_100ha" real,
  "medium_500ha" real,
  "big_500ha" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many total catagories are there for La Paz? `:
```sql
                SELECT COUNT("total") FROM "irrigation_infrastructure" WHERE "department"='La Paz';
```
## Task
Generate a SQL query to answer the following question:
`What is the largest micro when the big is 1080? `

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

CREATE TABLE "irrigation_infrastructure" (
  "department" text,
  "micro_10ha" real,
  "small_100ha" real,
  "medium_500ha" real,
  "big_500ha" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest micro when the big is 1080? `:
```sql
                SELECT MAX("micro_10ha") FROM "irrigation_infrastructure" WHERE "big_500ha"=1080;
```
## Task
Generate a SQL query to answer the following question:
`How many points under par was the winner of the Miyagi TV Cup Dunlop Ladies Open?`

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

CREATE TABLE "jlpga_tour_15" (
  "no" real,
  "date" text,
  "tournament" text,
  "winning_score" text,
  "to_par" text,
  "margin_of_victory" text,
  "runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many points under par was the winner of the Miyagi TV Cup Dunlop Ladies Open?`:
```sql
                SELECT "to_par" FROM "jlpga_tour_15" WHERE "tournament"='Miyagi TV Cup Dunlop Ladies Open';
```
## Task
Generate a SQL query to answer the following question:
`What was the winning score of the Vernal Ladies tournament?`

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

CREATE TABLE "jlpga_tour_15" (
  "no" real,
  "date" text,
  "tournament" text,
  "winning_score" text,
  "to_par" text,
  "margin_of_victory" text,
  "runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the winning score of the Vernal Ladies tournament?`:
```sql
                SELECT "winning_score" FROM "jlpga_tour_15" WHERE "tournament"='Vernal Ladies';
```
## Task
Generate a SQL query to answer the following question:
`Name the athlete for 3`

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

CREATE TABLE "final_standings" (
  "place" real,
  "athlete" text,
  "long_jump" real,
  "javelin" real,
  "200_m" real,
  "discus" real,
  "1500_m" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the athlete for 3`:
```sql
                SELECT "athlete" FROM "final_standings" WHERE "place"=3;
```
## Task
Generate a SQL query to answer the following question:
`Name the least total for 1500m for 2`

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

CREATE TABLE "final_standings" (
  "place" real,
  "athlete" text,
  "long_jump" real,
  "javelin" real,
  "200_m" real,
  "discus" real,
  "1500_m" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least total for 1500m for 2`:
```sql
                SELECT MIN("total") FROM "final_standings" WHERE "1500_m"=2;
```
## Task
Generate a SQL query to answer the following question:
`Name the max javelin for 200m for 5`

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

CREATE TABLE "final_standings" (
  "place" real,
  "athlete" text,
  "long_jump" real,
  "javelin" real,
  "200_m" real,
  "discus" real,
  "1500_m" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the max javelin for 200m for 5`:
```sql
                SELECT MAX("javelin") FROM "final_standings" WHERE "200_m"=5;
```
## Task
Generate a SQL query to answer the following question:
`Name the number of long jump for 1500m being 2`

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

CREATE TABLE "final_standings" (
  "place" real,
  "athlete" text,
  "long_jump" real,
  "javelin" real,
  "200_m" real,
  "discus" real,
  "1500_m" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the number of long jump for 1500m being 2`:
```sql
                SELECT COUNT("long_jump") FROM "final_standings" WHERE "1500_m"=2;
```
## Task
Generate a SQL query to answer the following question:
`Name the result for round 13`

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

CREATE TABLE "fixtures_and_results" (
  "competition" text,
  "round" text,
  "opponent" text,
  "result" text,
  "score" text,
  "home_away" text,
  "venue" text,
  "attendance" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the result for round 13`:
```sql
                SELECT "result" FROM "fixtures_and_results" WHERE "round"='13';
```
## Task
Generate a SQL query to answer the following question:
`Name the attendance for loss result and salford city reds`

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

CREATE TABLE "fixtures_and_results" (
  "competition" text,
  "round" text,
  "opponent" text,
  "result" text,
  "score" text,
  "home_away" text,
  "venue" text,
  "attendance" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the attendance for loss result and salford city reds`:
```sql
                SELECT "attendance" FROM "fixtures_and_results" WHERE "result"='Loss' AND "opponent"='Salford City Reds';
```
## Task
Generate a SQL query to answer the following question:
`Name the total number of date for round 26`

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

CREATE TABLE "fixtures_and_results" (
  "competition" text,
  "round" text,
  "opponent" text,
  "result" text,
  "score" text,
  "home_away" text,
  "venue" text,
  "attendance" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of date for round 26`:
```sql
                SELECT COUNT("date") FROM "fixtures_and_results" WHERE "round"='26';
```
## Task
Generate a SQL query to answer the following question:
`Name the attendace for 23 round`

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

CREATE TABLE "fixtures_and_results" (
  "competition" text,
  "round" text,
  "opponent" text,
  "result" text,
  "score" text,
  "home_away" text,
  "venue" text,
  "attendance" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the attendace for 23 round`:
```sql
                SELECT "attendance" FROM "fixtures_and_results" WHERE "round"='23';
```
## Task
Generate a SQL query to answer the following question:
`Name the total number of opponets for  05/09/2009`

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

CREATE TABLE "fixtures_and_results" (
  "competition" text,
  "round" text,
  "opponent" text,
  "result" text,
  "score" text,
  "home_away" text,
  "venue" text,
  "attendance" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of opponets for  05/09/2009`:
```sql
                SELECT COUNT("opponent") FROM "fixtures_and_results" WHERE "date"='05/09/2009';
```
## Task
Generate a SQL query to answer the following question:
`What is the only city name with a population density of 200?`

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

CREATE TABLE "list" (
  "name" text,
  "municipal_status" text,
  "census_division" text,
  "population_2011" real,
  "population_2006" real,
  "change_pct" text,
  "area_km" text,
  "population_density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the only city name with a population density of 200?`:
```sql
                SELECT "name" FROM "list" WHERE "population_density"='200';
```
## Task
Generate a SQL query to answer the following question:
`What is the census division for the name Stratford?`

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

CREATE TABLE "list" (
  "name" text,
  "municipal_status" text,
  "census_division" text,
  "population_2011" real,
  "population_2006" real,
  "change_pct" text,
  "area_km" text,
  "population_density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the census division for the name Stratford?`:
```sql
                SELECT "census_division" FROM "list" WHERE "name"='Stratford';
```
## Task
Generate a SQL query to answer the following question:
`What is the change (%) when the area size (km2) is 247.21?`

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

CREATE TABLE "list" (
  "name" text,
  "municipal_status" text,
  "census_division" text,
  "population_2011" real,
  "population_2006" real,
  "change_pct" text,
  "area_km" text,
  "population_density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the change (%) when the area size (km2) is 247.21?`:
```sql
                SELECT "change_pct" FROM "list" WHERE "area_km"='247.21';
```
## Task
Generate a SQL query to answer the following question:
`What is the municipal status where the population density is 895.5?`

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

CREATE TABLE "list" (
  "name" text,
  "municipal_status" text,
  "census_division" text,
  "population_2011" real,
  "population_2006" real,
  "change_pct" text,
  "area_km" text,
  "population_density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the municipal status where the population density is 895.5?`:
```sql
                SELECT "municipal_status" FROM "list" WHERE "population_density"='895.5';
```
## Task
Generate a SQL query to answer the following question:
`What is the census division for the city named Kenora?`

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

CREATE TABLE "list" (
  "name" text,
  "municipal_status" text,
  "census_division" text,
  "population_2011" real,
  "population_2006" real,
  "change_pct" text,
  "area_km" text,
  "population_density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the census division for the city named Kenora?`:
```sql
                SELECT "census_division" FROM "list" WHERE "name"='Kenora';
```
## Task
Generate a SQL query to answer the following question:
`If there are 18 villages, what is the minimum area ?`

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

CREATE TABLE "administrative_divisions" (
  "nr" real,
  "district" text,
  "former_name" text,
  "area_ha" real,
  "population_2005" real,
  "no_of_villages" real,
  "density_persons_ha" text
);
### SQL
Given the database schema, here is the SQL query that answers `If there are 18 villages, what is the minimum area ?`:
```sql
                SELECT MIN("area_ha") FROM "administrative_divisions" WHERE "no_of_villages"=18;
```
## Task
Generate a SQL query to answer the following question:
`With the population in 2005 of 572, what is the former name?`

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

CREATE TABLE "administrative_divisions" (
  "nr" real,
  "district" text,
  "former_name" text,
  "area_ha" real,
  "population_2005" real,
  "no_of_villages" real,
  "density_persons_ha" text
);
### SQL
Given the database schema, here is the SQL query that answers `With the population in 2005 of 572, what is the former name?`:
```sql
                SELECT "former_name" FROM "administrative_divisions" WHERE "population_2005"=572;
```
## Task
Generate a SQL query to answer the following question:
`How many villages have a density persons/ha of 5.5?`

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

CREATE TABLE "administrative_divisions" (
  "nr" real,
  "district" text,
  "former_name" text,
  "area_ha" real,
  "population_2005" real,
  "no_of_villages" real,
  "density_persons_ha" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many villages have a density persons/ha of 5.5?`:
```sql
                SELECT COUNT("no_of_villages") FROM "administrative_divisions" WHERE "density_persons_ha"='5.5';
```
## Task
Generate a SQL query to answer the following question:
`What were the scores for matches with irving wright hazel hotchkiss wightman?`

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

CREATE TABLE "mixed_doubles_8_3_titles_5_runner_ups" (
  "outcome" text,
  "year" real,
  "championship" text,
  "surface" text,
  "partner" text,
  "opponents" text,
  "score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the scores for matches with irving wright hazel hotchkiss wightman?`:
```sql
                SELECT "score" FROM "mixed_doubles_8_3_titles_5_runner_ups" WHERE "opponents"='Irving Wright Hazel Hotchkiss Wightman';
```
## Task
Generate a SQL query to answer the following question:
`How many years had scores of 10–12, 6–1, 6–3?`

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

CREATE TABLE "mixed_doubles_8_3_titles_5_runner_ups" (
  "outcome" text,
  "year" real,
  "championship" text,
  "surface" text,
  "partner" text,
  "opponents" text,
  "score" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years had scores of 10–12, 6–1, 6–3?`:
```sql
                SELECT COUNT("year") FROM "mixed_doubles_8_3_titles_5_runner_ups" WHERE "score"='10–12, 6–1, 6–3';
```
## Task
Generate a SQL query to answer the following question:
`Who were the partners during times that harry johnson hazel hotchkiss wightman was the opponent?`

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

CREATE TABLE "mixed_doubles_8_3_titles_5_runner_ups" (
  "outcome" text,
  "year" real,
  "championship" text,
  "surface" text,
  "partner" text,
  "opponents" text,
  "score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the partners during times that harry johnson hazel hotchkiss wightman was the opponent?`:
```sql
                SELECT "partner" FROM "mixed_doubles_8_3_titles_5_runner_ups" WHERE "opponents"='Harry Johnson Hazel Hotchkiss Wightman';
```
## Task
Generate a SQL query to answer the following question:
`What were the outcomes of matches with bill tilden florence ballin as opponents?`

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

CREATE TABLE "mixed_doubles_8_3_titles_5_runner_ups" (
  "outcome" text,
  "year" real,
  "championship" text,
  "surface" text,
  "partner" text,
  "opponents" text,
  "score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the outcomes of matches with bill tilden florence ballin as opponents?`:
```sql
                SELECT "outcome" FROM "mixed_doubles_8_3_titles_5_runner_ups" WHERE "opponents"='Bill Tilden Florence Ballin';
```
## Task
Generate a SQL query to answer the following question:
`What is the earliest year?`

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

CREATE TABLE "mixed_doubles_8_3_titles_5_runner_ups" (
  "outcome" text,
  "year" real,
  "championship" text,
  "surface" text,
  "partner" text,
  "opponents" text,
  "score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year?`:
```sql
                SELECT MIN("year") FROM "mixed_doubles_8_3_titles_5_runner_ups";
```
## Task
Generate a SQL query to answer the following question:
`What was the survivor count for the episode directed by Gwyneth Horder-Payton?`

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

CREATE TABLE "table1_21304131_2" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "survivor_count" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the survivor count for the episode directed by Gwyneth Horder-Payton?`:
```sql
                SELECT "survivor_count" FROM "table1_21304131_2" WHERE "directed_by"='Gwyneth Horder-Payton';
```
## Task
Generate a SQL query to answer the following question:
`When did series number 65 originally air?`

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

CREATE TABLE "table1_21304131_2" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "survivor_count" real
);
### SQL
Given the database schema, here is the SQL query that answers `When did series number 65 originally air?`:
```sql
                SELECT "original_air_date" FROM "table1_21304131_2" WHERE "no_in_series"=65;
```
## Task
Generate a SQL query to answer the following question:
`What is the production code of the episode directed by David Solomon? `

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

CREATE TABLE "table1_21304155_1" (
  "no_in_series" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text,
  "u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the production code of the episode directed by David Solomon? `:
```sql
                SELECT "production_code" FROM "table1_21304155_1" WHERE "directed_by"='David Solomon';
```
## Task
Generate a SQL query to answer the following question:
`Who wrote the episode with the production code of BN103? `

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

CREATE TABLE "table1_21304155_1" (
  "no_in_series" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text,
  "u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who wrote the episode with the production code of BN103? `:
```sql
                SELECT "written_by" FROM "table1_21304155_1" WHERE "production_code"='BN103';
```
## Task
Generate a SQL query to answer the following question:
`What was the original air date of the episode that had 4.08 million U.S. viewers? `

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

CREATE TABLE "table1_21304155_1" (
  "no_in_series" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text,
  "u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the original air date of the episode that had 4.08 million U.S. viewers? `:
```sql
                SELECT "original_air_date" FROM "table1_21304155_1" WHERE "u_s_viewers_millions"='4.08';
```
## Task
Generate a SQL query to answer the following question:
`List all the locations where net capacity is 950?`

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

CREATE TABLE "table1_213088_1" (
  "location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4" text,
  "reactor_type" text,
  "status" text,
  "net_capacity_mw" real,
  "gross_capacity_mw" real
);
### SQL
Given the database schema, here is the SQL query that answers `List all the locations where net capacity is 950?`:
```sql
                SELECT "location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4" FROM "table1_213088_1" WHERE "net_capacity_mw"=950;
```
## Task
Generate a SQL query to answer the following question:
`List all the locations with a RBMK-1000 reactor.`

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

CREATE TABLE "table1_213088_1" (
  "location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4" text,
  "reactor_type" text,
  "status" text,
  "net_capacity_mw" real,
  "gross_capacity_mw" real
);
### SQL
Given the database schema, here is the SQL query that answers `List all the locations with a RBMK-1000 reactor.`:
```sql
                SELECT "location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4" FROM "table1_213088_1" WHERE "reactor_type"='RBMK-1000';
```
## Task
Generate a SQL query to answer the following question:
`What is the gross capacity where the net capacity is 1380?`

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

CREATE TABLE "table1_213088_1" (
  "location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4" text,
  "reactor_type" text,
  "status" text,
  "net_capacity_mw" real,
  "gross_capacity_mw" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the gross capacity where the net capacity is 1380?`:
```sql
                SELECT MIN("gross_capacity_mw") FROM "table1_213088_1" WHERE "net_capacity_mw"=1380;
```
## Task
Generate a SQL query to answer the following question:
`when was the premiere when a 3.3 millions of North American watched the episode whose writer was Rob Wright?`

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

CREATE TABLE "table1_21313498_1" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text,
  "u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `when was the premiere when a 3.3 millions of North American watched the episode whose writer was Rob Wright?`:
```sql
                SELECT "original_air_date" FROM "table1_21313498_1" WHERE "u_s_viewers_millions"='3.3' AND "written_by"='Rob Wright';
```
## Task
Generate a SQL query to answer the following question:
`what is the name of the episode which the production code is 62015-08-162`

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

CREATE TABLE "table1_21313498_1" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text,
  "u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the name of the episode which the production code is 62015-08-162`:
```sql
                SELECT "title" FROM "table1_21313498_1" WHERE "production_code"='62015-08-162';
```
## Task
Generate a SQL query to answer the following question:
`in the number of episode in season is 11, who was the writer?`

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

CREATE TABLE "table1_21313498_1" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text,
  "u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `in the number of episode in season is 11, who was the writer?`:
```sql
                SELECT "written_by" FROM "table1_21313498_1" WHERE "no_in_season"=11;
```
## Task
Generate a SQL query to answer the following question:
`What is the production code for the episode title "A Wrong Day's Journey into Right"?`

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

CREATE TABLE "table1_21312959_1" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" real,
  "us_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the production code for the episode title "A Wrong Day's Journey into Right"?`:
```sql
                SELECT "production_code" FROM "table1_21312959_1" WHERE "title"='\"A Wrong Day''s Journey into Right\"';
```
## Task
Generate a SQL query to answer the following question:
`How many episodes had the us viewers (millions) figure of 5.0?`

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

CREATE TABLE "table1_21312959_1" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" real,
  "us_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many episodes had the us viewers (millions) figure of 5.0?`:
```sql
                SELECT COUNT("no_in_season") FROM "table1_21312959_1" WHERE "us_viewers_millions"='5.0';
```