cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`What was the maximum average of the episode with a Chinese title 古靈精探b?`

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

CREATE TABLE "highest_rating_drama_series_of_2009" (
  "rank" real,
  "english_title" text,
  "chinese_title" text,
  "average" real,
  "peak" real,
  "premiere" real,
  "finale" real,
  "hk_viewers" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the maximum average of the episode with a Chinese title 古靈精探b?`:
```sql
                SELECT MAX("average") FROM "highest_rating_drama_series_of_2009" WHERE "chinese_title"='古靈精探B';
```
## Task
Generate a SQL query to answer the following question:
`How was the episode seen by 2.26 million HK viewers ranked?`

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

CREATE TABLE "highest_rating_drama_series_of_2009" (
  "rank" real,
  "english_title" text,
  "chinese_title" text,
  "average" real,
  "peak" real,
  "premiere" real,
  "finale" real,
  "hk_viewers" text
);
### SQL
Given the database schema, here is the SQL query that answers `How was the episode seen by 2.26 million HK viewers ranked?`:
```sql
                SELECT "rank" FROM "highest_rating_drama_series_of_2009" WHERE "hk_viewers"='2.26 million';
```
## Task
Generate a SQL query to answer the following question:
`What is the finale number ranked at number 7?`

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

CREATE TABLE "highest_rating_drama_series_of_2009" (
  "rank" real,
  "english_title" text,
  "chinese_title" text,
  "average" real,
  "peak" real,
  "premiere" real,
  "finale" real,
  "hk_viewers" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the finale number ranked at number 7?`:
```sql
                SELECT "finale" FROM "highest_rating_drama_series_of_2009" WHERE "rank"=7;
```
## Task
Generate a SQL query to answer the following question:
`What is every conflict in Iraq?`

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

CREATE TABLE "involvement_in_military_conflicts" (
  "start_of_conflict" real,
  "end_of_conflict" text,
  "conflict" text,
  "continent" text,
  "location" text,
  "branches_involved" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is every conflict in Iraq?`:
```sql
                SELECT "conflict" FROM "involvement_in_military_conflicts" WHERE "location"='Iraq';
```
## Task
Generate a SQL query to answer the following question:
`What is every branch involved in Afghanistan?`

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

CREATE TABLE "involvement_in_military_conflicts" (
  "start_of_conflict" real,
  "end_of_conflict" text,
  "conflict" text,
  "continent" text,
  "location" text,
  "branches_involved" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is every branch involved in Afghanistan?`:
```sql
                SELECT "branches_involved" FROM "involvement_in_military_conflicts" WHERE "location"='Afghanistan';
```
## Task
Generate a SQL query to answer the following question:
`Which conflicts took place in Yemen?`

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

CREATE TABLE "involvement_in_military_conflicts" (
  "start_of_conflict" real,
  "end_of_conflict" text,
  "conflict" text,
  "continent" text,
  "location" text,
  "branches_involved" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which conflicts took place in Yemen?`:
```sql
                SELECT "conflict" FROM "involvement_in_military_conflicts" WHERE "location"='Yemen';
```
## Task
Generate a SQL query to answer the following question:
`How many conflicts started in Afghanistan?`

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

CREATE TABLE "involvement_in_military_conflicts" (
  "start_of_conflict" real,
  "end_of_conflict" text,
  "conflict" text,
  "continent" text,
  "location" text,
  "branches_involved" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many conflicts started in Afghanistan?`:
```sql
                SELECT COUNT("start_of_conflict") FROM "involvement_in_military_conflicts" WHERE "location"='Afghanistan';
```
## Task
Generate a SQL query to answer the following question:
`When did the title "secret weapons" originally air?`

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

CREATE TABLE "table1_19229713_6" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text,
  "u_s_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the title "secret weapons" originally air?`:
```sql
                SELECT "original_air_date" FROM "table1_19229713_6" WHERE "title"='\"Secret Weapons\"';
```
## Task
Generate a SQL query to answer the following question:
`How many u.s. viewers (million) have the number 16?`

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

CREATE TABLE "table1_19229713_6" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text,
  "u_s_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many u.s. viewers (million) have the number 16?`:
```sql
                SELECT "u_s_viewers_million" FROM "table1_19229713_6" WHERE "num"=16;
```
## Task
Generate a SQL query to answer the following question:
`What is the production code of the title "secret weapons"?`

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

CREATE TABLE "table1_19229713_6" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text,
  "u_s_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the production code of the title "secret weapons"?`:
```sql
                SELECT "production_code" FROM "table1_19229713_6" WHERE "title"='\"Secret Weapons\"';
```
## Task
Generate a SQL query to answer the following question:
`How many u.s. viewers  (million) have the production code of 5.09?`

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

CREATE TABLE "table1_19229713_6" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text,
  "u_s_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many u.s. viewers  (million) have the production code of 5.09?`:
```sql
                SELECT "u_s_viewers_million" FROM "table1_19229713_6" WHERE "production_code"='5.09';
```
## Task
Generate a SQL query to answer the following question:
`When middle prut valley is the land formation what is the highest of which currently forests, km² ?`

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

CREATE TABLE "natural_habitat" (
  "land_formation" text,
  "area_km" real,
  "of_which_currently_forests_km" real,
  "pct_forests" text,
  "habitat_type" text
);
### SQL
Given the database schema, here is the SQL query that answers `When middle prut valley is the land formation what is the highest of which currently forests, km² ?`:
```sql
                SELECT MAX("of_which_currently_forests_km") FROM "natural_habitat" WHERE "land_formation"='Middle Prut Valley';
```
## Task
Generate a SQL query to answer the following question:
`When 312 is  of which currently forests, km² what is the land formation? `

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

CREATE TABLE "natural_habitat" (
  "land_formation" text,
  "area_km" real,
  "of_which_currently_forests_km" real,
  "pct_forests" text,
  "habitat_type" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 312 is  of which currently forests, km² what is the land formation? `:
```sql
                SELECT "land_formation" FROM "natural_habitat" WHERE "of_which_currently_forests_km"=312;
```
## Task
Generate a SQL query to answer the following question:
`When did the episode titled "The Fashion Show" air for the first time?`

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

CREATE TABLE "table1_19236587_4" (
  "series_no" real,
  "season_no" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "u_k_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the episode titled "The Fashion Show" air for the first time?`:
```sql
                SELECT "original_air_date" FROM "table1_19236587_4" WHERE "title"='\"The Fashion Show\"';
```
## Task
Generate a SQL query to answer the following question:
`What's the series number of the episode with season number 2?`

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

CREATE TABLE "table1_19236587_4" (
  "series_no" real,
  "season_no" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "u_k_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the series number of the episode with season number 2?`:
```sql
                SELECT MIN("series_no") FROM "table1_19236587_4" WHERE "season_no"=2;
```
## Task
Generate a SQL query to answer the following question:
`What's the series number of the episode seen by 2.43 million viewers in the UK?`

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

CREATE TABLE "table1_19236587_4" (
  "series_no" real,
  "season_no" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "u_k_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the series number of the episode seen by 2.43 million viewers in the UK?`:
```sql
                SELECT "series_no" FROM "table1_19236587_4" WHERE "u_k_viewers_million"='2.43';
```
## Task
Generate a SQL query to answer the following question:
`How many different original air dates does the episode with series number 13 have?`

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

CREATE TABLE "table1_19236587_4" (
  "series_no" real,
  "season_no" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "u_k_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many different original air dates does the episode with series number 13 have?`:
```sql
                SELECT COUNT("original_air_date") FROM "table1_19236587_4" WHERE "series_no"=13;
```
## Task
Generate a SQL query to answer the following question:
`Name the number for viewers being 1.87`

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

CREATE TABLE "table1_19229713_4" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text,
  "u_s_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the number for viewers being 1.87`:
```sql
                SELECT MAX("num") FROM "table1_19229713_4" WHERE "u_s_viewers_million"='1.87';
```
## Task
Generate a SQL query to answer the following question:
`Name the production code for viewers for 1.69`

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

CREATE TABLE "table1_19229713_4" (
  "no" real,
  "num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text,
  "u_s_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the production code for viewers for 1.69`:
```sql
                SELECT "production_code" FROM "table1_19229713_4" WHERE "u_s_viewers_million"='1.69';
```
## Task
Generate a SQL query to answer the following question:
`whare are al of the launche dates where th carrier is orange and the up is 5.76 mbit/s`

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

CREATE TABLE "table1_19246_2" (
  "carrier" text,
  "standard" text,
  "frequency" text,
  "down" text,
  "up" text,
  "launch_date_dd_mm_yyyy" text
);
### SQL
Given the database schema, here is the SQL query that answers `whare are al of the launche dates where th carrier is orange and the up is 5.76 mbit/s`:
```sql
                SELECT "launch_date_dd_mm_yyyy" FROM "table1_19246_2" WHERE "up"='5.76 Mbit/s' AND "carrier"='Orange';
```
## Task
Generate a SQL query to answer the following question:
`With the country of Sweden and the result is out, what is the song?`

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

CREATE TABLE "final" (
  "draw" real,
  "country" text,
  "language" text,
  "artist" text,
  "song" text,
  "english_translation" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `With the country of Sweden and the result is out, what is the song?`:
```sql
                SELECT "song" FROM "final" WHERE "result"='Out' AND "country"='Sweden';
```
## Task
Generate a SQL query to answer the following question:
`If the English translation is hello girl, what was the language?`

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

CREATE TABLE "final" (
  "draw" real,
  "country" text,
  "language" text,
  "artist" text,
  "song" text,
  "english_translation" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the English translation is hello girl, what was the language?`:
```sql
                SELECT "language" FROM "final" WHERE "english_translation"='Hello girl';
```
## Task
Generate a SQL query to answer the following question:
`What was the connection speed when launched on 07.06.2005?`

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

CREATE TABLE "table1_19246_1" (
  "carrier" text,
  "standard" text,
  "frequency" text,
  "connection_speed" text,
  "launch_date_dd_mm_yyyy" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the connection speed when launched on 07.06.2005?`:
```sql
                SELECT "connection_speed" FROM "table1_19246_1" WHERE "launch_date_dd_mm_yyyy"='07.06.2005';
```
## Task
Generate a SQL query to answer the following question:
`When the carrier is idc, what are the frequencies?`

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

CREATE TABLE "table1_19246_1" (
  "carrier" text,
  "standard" text,
  "frequency" text,
  "connection_speed" text,
  "launch_date_dd_mm_yyyy" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the carrier is idc, what are the frequencies?`:
```sql
                SELECT "frequency" FROM "table1_19246_1" WHERE "carrier"='IDC';
```
## Task
Generate a SQL query to answer the following question:
`When the launch date is 14.09.2005, and the frequency is 900mhz and 1800mhz, how many carriers are there?`

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

CREATE TABLE "table1_19246_1" (
  "carrier" text,
  "standard" text,
  "frequency" text,
  "connection_speed" text,
  "launch_date_dd_mm_yyyy" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the launch date is 14.09.2005, and the frequency is 900mhz and 1800mhz, how many carriers are there?`:
```sql
                SELECT COUNT("carrier") FROM "table1_19246_1" WHERE "frequency"='900MHz and 1800MHz' AND "launch_date_dd_mm_yyyy"='14.09.2005';
```
## Task
Generate a SQL query to answer the following question:
`How many standards are there, when the launch date was 17.04.2006?`

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

CREATE TABLE "table1_19246_1" (
  "carrier" text,
  "standard" text,
  "frequency" text,
  "connection_speed" text,
  "launch_date_dd_mm_yyyy" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many standards are there, when the launch date was 17.04.2006?`:
```sql
                SELECT COUNT("standard") FROM "table1_19246_1" WHERE "launch_date_dd_mm_yyyy"='17.04.2006';
```
## Task
Generate a SQL query to answer the following question:
`Name the 2 car sets for 622 `

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

CREATE TABLE "production" (
  "fiscal_year" real,
  "2_car_sets" real,
  "3_car_sets" real,
  "4_car_sets" real,
  "6_car_sets" real,
  "8_car_sets" real,
  "total_vehicles" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 2 car sets for 622 `:
```sql
                SELECT "2_car_sets" FROM "production" WHERE "total_vehicles"=622;
```
## Task
Generate a SQL query to answer the following question:
`Name the most 3 car sets`

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

CREATE TABLE "production" (
  "fiscal_year" real,
  "2_car_sets" real,
  "3_car_sets" real,
  "4_car_sets" real,
  "6_car_sets" real,
  "8_car_sets" real,
  "total_vehicles" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most 3 car sets`:
```sql
                SELECT MAX("3_car_sets") FROM "production";
```
## Task
Generate a SQL query to answer the following question:
`Name the 4 car sets for 6 car sets being 44`

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

CREATE TABLE "production" (
  "fiscal_year" real,
  "2_car_sets" real,
  "3_car_sets" real,
  "4_car_sets" real,
  "6_car_sets" real,
  "8_car_sets" real,
  "total_vehicles" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 4 car sets for 6 car sets being 44`:
```sql
                SELECT MIN("4_car_sets") FROM "production" WHERE "6_car_sets"=44;
```
## Task
Generate a SQL query to answer the following question:
`Name the least 4 car sets`

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

CREATE TABLE "production" (
  "fiscal_year" real,
  "2_car_sets" real,
  "3_car_sets" real,
  "4_car_sets" real,
  "6_car_sets" real,
  "8_car_sets" real,
  "total_vehicles" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least 4 car sets`:
```sql
                SELECT MIN("4_car_sets") FROM "production";
```
## Task
Generate a SQL query to answer the following question:
`What is the code name of the OS with Kernel version 2.6.27?`

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

CREATE TABLE "table1_19264489_1" (
  "version" text,
  "code_name" text,
  "release_date" text,
  "desktops" text,
  "servers" text,
  "kernel_version" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the code name of the OS with Kernel version 2.6.27?`:
```sql
                SELECT "code_name" FROM "table1_19264489_1" WHERE "kernel_version"='2.6.27';
```
## Task
Generate a SQL query to answer the following question:
`When was the release date of the operating system with kernel version 2.6.31?`

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

CREATE TABLE "table1_19264489_1" (
  "version" text,
  "code_name" text,
  "release_date" text,
  "desktops" text,
  "servers" text,
  "kernel_version" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the release date of the operating system with kernel version 2.6.31?`:
```sql
                SELECT "release_date" FROM "table1_19264489_1" WHERE "kernel_version"='2.6.31';
```
## Task
Generate a SQL query to answer the following question:
`What is the status of the desktop version of the OS with kernel version 2.6.31?`

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

CREATE TABLE "table1_19264489_1" (
  "version" text,
  "code_name" text,
  "release_date" text,
  "desktops" text,
  "servers" text,
  "kernel_version" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the status of the desktop version of the OS with kernel version 2.6.31?`:
```sql
                SELECT "desktops" FROM "table1_19264489_1" WHERE "kernel_version"='2.6.31';
```
## Task
Generate a SQL query to answer the following question:
`How many servers have a kernel version 3.11?`

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

CREATE TABLE "table1_19264489_1" (
  "version" text,
  "code_name" text,
  "release_date" text,
  "desktops" text,
  "servers" text,
  "kernel_version" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many servers have a kernel version 3.11?`:
```sql
                SELECT COUNT("servers") FROM "table1_19264489_1" WHERE "kernel_version"='3.11';
```
## Task
Generate a SQL query to answer the following question:
`Name the % for core moldova being 4.36%`

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

CREATE TABLE "cultural_and_ethnic_composition" (
  "self_identification" text,
  "moldovan_census" real,
  "pct_core_moldova" text,
  "transnistrian_census" real,
  "pct_transnistria_bender" text,
  "total" real,
  "pct" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the % for core moldova being 4.36%`:
```sql
                SELECT "pct" FROM "cultural_and_ethnic_composition" WHERE "pct_core_moldova"='4.36%';
```
## Task
Generate a SQL query to answer the following question:
`Name the % for total being 57613`

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

CREATE TABLE "cultural_and_ethnic_composition" (
  "self_identification" text,
  "moldovan_census" real,
  "pct_core_moldova" text,
  "transnistrian_census" real,
  "pct_transnistria_bender" text,
  "total" real,
  "pct" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the % for total being 57613`:
```sql
                SELECT "pct" FROM "cultural_and_ethnic_composition" WHERE "total"=57613;
```
## Task
Generate a SQL query to answer the following question:
`Name the total for % core moldova for 4.36%`

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

CREATE TABLE "cultural_and_ethnic_composition" (
  "self_identification" text,
  "moldovan_census" real,
  "pct_core_moldova" text,
  "transnistrian_census" real,
  "pct_transnistria_bender" text,
  "total" real,
  "pct" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total for % core moldova for 4.36%`:
```sql
                SELECT "total" FROM "cultural_and_ethnic_composition" WHERE "pct_core_moldova"='4.36%';
```
## Task
Generate a SQL query to answer the following question:
`What was the waveform of the encoding with a bit rate of 6.203?`

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

CREATE TABLE "teletext_binary_nrz_encodings" (
  "standard" text,
  "color_system" text,
  "informational_cvbs_lines" text,
  "bit_rate_mbit_s" text,
  "waveform" text,
  "bits_per_line_including_run_in" real,
  "max_characters_per_page_row" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the waveform of the encoding with a bit rate of 6.203?`:
```sql
                SELECT "waveform" FROM "teletext_binary_nrz_encodings" WHERE "bit_rate_mbit_s"='6.203';
```
## Task
Generate a SQL query to answer the following question:
`What was the informational CVBS Lines of the encoding with max character of 32 and has B (global) standard?`

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

CREATE TABLE "teletext_binary_nrz_encodings" (
  "standard" text,
  "color_system" text,
  "informational_cvbs_lines" text,
  "bit_rate_mbit_s" text,
  "waveform" text,
  "bits_per_line_including_run_in" real,
  "max_characters_per_page_row" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the informational CVBS Lines of the encoding with max character of 32 and has B (global) standard?`:
```sql
                SELECT "informational_cvbs_lines" FROM "teletext_binary_nrz_encodings" WHERE "max_characters_per_page_row"=32 AND "standard"='B (global)';
```
## Task
Generate a SQL query to answer the following question:
`How many color systems has a bit rate of 5.734?`

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

CREATE TABLE "teletext_binary_nrz_encodings" (
  "standard" text,
  "color_system" text,
  "informational_cvbs_lines" text,
  "bit_rate_mbit_s" text,
  "waveform" text,
  "bits_per_line_including_run_in" real,
  "max_characters_per_page_row" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many color systems has a bit rate of 5.734?`:
```sql
                SELECT COUNT("color_system") FROM "teletext_binary_nrz_encodings" WHERE "bit_rate_mbit_s"='5.734';
```
## Task
Generate a SQL query to answer the following question:
`What was the max character (per page row) of the encoding with a bit rate of 6.203?`

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

CREATE TABLE "teletext_binary_nrz_encodings" (
  "standard" text,
  "color_system" text,
  "informational_cvbs_lines" text,
  "bit_rate_mbit_s" text,
  "waveform" text,
  "bits_per_line_including_run_in" real,
  "max_characters_per_page_row" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the max character (per page row) of the encoding with a bit rate of 6.203?`:
```sql
                SELECT MAX("max_characters_per_page_row") FROM "teletext_binary_nrz_encodings" WHERE "bit_rate_mbit_s"='6.203';
```
## Task
Generate a SQL query to answer the following question:
`Name the after tax income for percentage of income kept being 40.6%`

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

CREATE TABLE "calculations_are_made_for_the_top_of_eac" (
  "currency_bracket" text,
  "dollars_taxed_in_bracket" text,
  "rate" text,
  "taxes_from_bracket" text,
  "after_tax_income" text,
  "percentage_of_income_kept" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the after tax income for percentage of income kept being 40.6%`:
```sql
                SELECT "after_tax_income" FROM "calculations_are_made_for_the_top_of_eac" WHERE "percentage_of_income_kept"='40.6%';
```
## Task
Generate a SQL query to answer the following question:
`Name the taxes from brqacket for percentage of income kept being 73%`

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

CREATE TABLE "calculations_are_made_for_the_top_of_eac" (
  "currency_bracket" text,
  "dollars_taxed_in_bracket" text,
  "rate" text,
  "taxes_from_bracket" text,
  "after_tax_income" text,
  "percentage_of_income_kept" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the taxes from brqacket for percentage of income kept being 73%`:
```sql
                SELECT "taxes_from_bracket" FROM "calculations_are_made_for_the_top_of_eac" WHERE "percentage_of_income_kept"='73%';
```
## Task
Generate a SQL query to answer the following question:
`How many teams won $2,089,556?`

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

CREATE TABLE "nascar_sprint_cup_series" (
  "year" real,
  "starts" real,
  "wins" real,
  "top_5" real,
  "top_10" real,
  "poles" real,
  "avg_start" text,
  "avg_finish" text,
  "winnings" text,
  "position" text,
  "team_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many teams won $2,089,556?`:
```sql
                SELECT COUNT("wins") FROM "nascar_sprint_cup_series" WHERE "winnings"='$2,089,556';
```
## Task
Generate a SQL query to answer the following question:
`HOw many top 5 starts did the team with an average start of 17.7 have?`

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

CREATE TABLE "nascar_sprint_cup_series" (
  "year" real,
  "starts" real,
  "wins" real,
  "top_5" real,
  "top_10" real,
  "poles" real,
  "avg_start" text,
  "avg_finish" text,
  "winnings" text,
  "position" text,
  "team_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `HOw many top 5 starts did the team with an average start of 17.7 have?`:
```sql
                SELECT COUNT("top_5") FROM "nascar_sprint_cup_series" WHERE "avg_start"='17.7';
```
## Task
Generate a SQL query to answer the following question:
`Who is team 1 when team 2 is koper?`

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

CREATE TABLE "second_round" (
  "tie_no" real,
  "team_1" text,
  "agg" text,
  "team_2" text,
  "1st_leg" text,
  "2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is team 1 when team 2 is koper?`:
```sql
                SELECT "team_1" FROM "second_round" WHERE "team_2"='Koper';
```
## Task
Generate a SQL query to answer the following question:
`What is the tie when team 2 is koper?`

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

CREATE TABLE "second_round" (
  "tie_no" real,
  "team_1" text,
  "agg" text,
  "team_2" text,
  "1st_leg" text,
  "2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the tie when team 2 is koper?`:
```sql
                SELECT MIN("tie_no") FROM "second_round" WHERE "team_2"='Koper';
```
## Task
Generate a SQL query to answer the following question:
`How many 1st leg have team 1 ofk belgrade?`

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

CREATE TABLE "second_round" (
  "tie_no" real,
  "team_1" text,
  "agg" text,
  "team_2" text,
  "1st_leg" text,
  "2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many 1st leg have team 1 ofk belgrade?`:
```sql
                SELECT COUNT("1st_leg") FROM "second_round" WHERE "team_1"='OFK Belgrade';
```
## Task
Generate a SQL query to answer the following question:
`How many tie no have team 1 as borac banja luka?`

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

CREATE TABLE "second_round" (
  "tie_no" real,
  "team_1" text,
  "agg" text,
  "team_2" text,
  "1st_leg" text,
  "2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many tie no have team 1 as borac banja luka?`:
```sql
                SELECT "tie_no" FROM "second_round" WHERE "team_1"='Borac Banja Luka';
```
## Task
Generate a SQL query to answer the following question:
`What's the language in the school teaching grades 4-12?`

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

CREATE TABLE "schools" (
  "school" text,
  "year_founded" text,
  "denomination" text,
  "language" text,
  "grades" text,
  "gender" text,
  "private_public" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the language in the school teaching grades 4-12?`:
```sql
                SELECT "language" FROM "schools" WHERE "grades"='4-12';
```
## Task
Generate a SQL query to answer the following question:
`What's the language of the school founded in 1949?`

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

CREATE TABLE "schools" (
  "school" text,
  "year_founded" text,
  "denomination" text,
  "language" text,
  "grades" text,
  "gender" text,
  "private_public" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the language of the school founded in 1949?`:
```sql
                SELECT "language" FROM "schools" WHERE "year_founded"='1949';
```
## Task
Generate a SQL query to answer the following question:
`What's the language of the school that teaches grades 4-12?`

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

CREATE TABLE "schools" (
  "school" text,
  "year_founded" text,
  "denomination" text,
  "language" text,
  "grades" text,
  "gender" text,
  "private_public" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the language of the school that teaches grades 4-12?`:
```sql
                SELECT "language" FROM "schools" WHERE "grades"='4-12';
```
## Task
Generate a SQL query to answer the following question:
`What's the gender of the students taught in the school founded in 1894?`

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

CREATE TABLE "schools" (
  "school" text,
  "year_founded" text,
  "denomination" text,
  "language" text,
  "grades" text,
  "gender" text,
  "private_public" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the gender of the students taught in the school founded in 1894?`:
```sql
                SELECT "gender" FROM "schools" WHERE "year_founded"='1894';
```
## Task
Generate a SQL query to answer the following question:
`What's the language of classes in the school founded in 1874?`

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

CREATE TABLE "schools" (
  "school" text,
  "year_founded" text,
  "denomination" text,
  "language" text,
  "grades" text,
  "gender" text,
  "private_public" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the language of classes in the school founded in 1874?`:
```sql
                SELECT "language" FROM "schools" WHERE "year_founded"='1874';
```
## Task
Generate a SQL query to answer the following question:
`what is the least current`

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

CREATE TABLE "by_nationality" (
  "country" text,
  "total" real,
  "champions" real,
  "current" real,
  "first_driver_s" text,
  "last_current_driver_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the least current`:
```sql
                SELECT MIN("current") FROM "by_nationality";
```
## Task
Generate a SQL query to answer the following question:
`how many total where last/current driver(s) is narain karthikeyan ( 2010 )`

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

CREATE TABLE "by_nationality" (
  "country" text,
  "total" real,
  "champions" real,
  "current" real,
  "first_driver_s" text,
  "last_current_driver_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `how many total where last/current driver(s) is narain karthikeyan ( 2010 )`:
```sql
                SELECT COUNT("total") FROM "by_nationality" WHERE "last_current_driver_s"='Narain Karthikeyan ( 2010 )';
```
## Task
Generate a SQL query to answer the following question:
`How many numbers were recorded for Qatari female when Qatari male was 97?`

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

CREATE TABLE "registered_live_births_by_nationality_an" (
  "year" real,
  "qatari_male" real,
  "qatari_female" real,
  "total_qatari" real,
  "non_qatari_male" real,
  "non_qatari_female" real,
  "total_non_qatar" real,
  "total_male" real,
  "total_female" real,
  "grand_total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many numbers were recorded for Qatari female when Qatari male was 97?`:
```sql
                SELECT COUNT("qatari_female") FROM "registered_live_births_by_nationality_an" WHERE "qatari_male"=97;
```
## Task
Generate a SQL query to answer the following question:
`How many years were there 97 qatari male births?`

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

CREATE TABLE "registered_live_births_by_nationality_an" (
  "year" real,
  "qatari_male" real,
  "qatari_female" real,
  "total_qatari" real,
  "non_qatari_male" real,
  "non_qatari_female" real,
  "total_non_qatar" real,
  "total_male" real,
  "total_female" real,
  "grand_total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many years were there 97 qatari male births?`:
```sql
                SELECT COUNT("year") FROM "registered_live_births_by_nationality_an" WHERE "qatari_male"=97;
```
## Task
Generate a SQL query to answer the following question:
`What is the national cup statistics when the Championship is 21 app / 6 goals?`

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

CREATE TABLE "career_statistics" (
  "season" text,
  "club" text,
  "country" text,
  "championship" text,
  "national_cup" text,
  "international_cup" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the national cup statistics when the Championship is 21 app / 6 goals?`:
```sql
                SELECT "national_cup" FROM "career_statistics" WHERE "championship"='21 app / 6 goals';
```
## Task
Generate a SQL query to answer the following question:
`How many runner-ups when Jason Crump placed 3rd?`

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

CREATE TABLE "calendar" (
  "round" real,
  "date" text,
  "city_and_venue" text,
  "winner" text,
  "runner_up" text,
  "3rd_placed" text,
  "4th_placed" text,
  "results" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many runner-ups when Jason Crump placed 3rd?`:
```sql
                SELECT COUNT("runner_up") FROM "calendar" WHERE "3rd_placed"='Jason Crump';
```
## Task
Generate a SQL query to answer the following question:
`Where did Grzegorz Walasek place 4th?`

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

CREATE TABLE "calendar" (
  "round" real,
  "date" text,
  "city_and_venue" text,
  "winner" text,
  "runner_up" text,
  "3rd_placed" text,
  "4th_placed" text,
  "results" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did Grzegorz Walasek place 4th?`:
```sql
                SELECT "city_and_venue" FROM "calendar" WHERE "4th_placed"='Grzegorz Walasek';
```
## Task
Generate a SQL query to answer the following question:
`Who came in 3rd place in Krško , Slovenia Matije Gubca Stadium`

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

CREATE TABLE "calendar" (
  "round" real,
  "date" text,
  "city_and_venue" text,
  "winner" text,
  "runner_up" text,
  "3rd_placed" text,
  "4th_placed" text,
  "results" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who came in 3rd place in Krško , Slovenia Matije Gubca Stadium`:
```sql
                SELECT "3rd_placed" FROM "calendar" WHERE "city_and_venue"='Krško , Slovenia Matije Gubca Stadium';
```
## Task
Generate a SQL query to answer the following question:
`How many placed 4th on April 25?`

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

CREATE TABLE "calendar" (
  "round" real,
  "date" text,
  "city_and_venue" text,
  "winner" text,
  "runner_up" text,
  "3rd_placed" text,
  "4th_placed" text,
  "results" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many placed 4th on April 25?`:
```sql
                SELECT COUNT("4th_placed") FROM "calendar" WHERE "date"='April 25';
```
## Task
Generate a SQL query to answer the following question:
`What caused the collapse of the Mausoleum at Halicarnassus?`

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

CREATE TABLE "the_seven_ancient_wonders" (
  "name" text,
  "date_of_construction" text,
  "builder" text,
  "date_of_destruction" text,
  "cause_of_destruction" text,
  "modern_location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What caused the collapse of the Mausoleum at Halicarnassus?`:
```sql
                SELECT "cause_of_destruction" FROM "the_seven_ancient_wonders" WHERE "name"='Mausoleum at Halicarnassus';
```
## Task
Generate a SQL query to answer the following question:
`How was the Temple of Artemis at Ephesus destroyed?`

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

CREATE TABLE "the_seven_ancient_wonders" (
  "name" text,
  "date_of_construction" text,
  "builder" text,
  "date_of_destruction" text,
  "cause_of_destruction" text,
  "modern_location" text
);
### SQL
Given the database schema, here is the SQL query that answers `How was the Temple of Artemis at Ephesus destroyed?`:
```sql
                SELECT "cause_of_destruction" FROM "the_seven_ancient_wonders" WHERE "name"='Temple of Artemis at Ephesus';
```
## Task
Generate a SQL query to answer the following question:
`Who came as a replacement in Sheffield United?`

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

CREATE TABLE "managerial_changes" (
  "team" text,
  "outgoing_manager" text,
  "manner_of_departure" text,
  "date_of_vacancy" text,
  "replaced_by" text,
  "date_of_appointment" text,
  "position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who came as a replacement in Sheffield United?`:
```sql
                SELECT "replaced_by" FROM "managerial_changes" WHERE "team"='Sheffield United';
```
## Task
Generate a SQL query to answer the following question:
`When was the new manager of the team on 21st position appointed?`

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

CREATE TABLE "managerial_changes" (
  "team" text,
  "outgoing_manager" text,
  "manner_of_departure" text,
  "date_of_vacancy" text,
  "replaced_by" text,
  "date_of_appointment" text,
  "position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the new manager of the team on 21st position appointed?`:
```sql
                SELECT "date_of_appointment" FROM "managerial_changes" WHERE "position_in_table"='21st';
```
## Task
Generate a SQL query to answer the following question:
`What was Gary Megson's manner of departure?`

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

CREATE TABLE "managerial_changes" (
  "team" text,
  "outgoing_manager" text,
  "manner_of_departure" text,
  "date_of_vacancy" text,
  "replaced_by" text,
  "date_of_appointment" text,
  "position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Gary Megson's manner of departure?`:
```sql
                SELECT "manner_of_departure" FROM "managerial_changes" WHERE "outgoing_manager"='Gary Megson';
```
## Task
Generate a SQL query to answer the following question:
`When did the old manager vacate his position in Plymouth Argyle?`

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

CREATE TABLE "managerial_changes" (
  "team" text,
  "outgoing_manager" text,
  "manner_of_departure" text,
  "date_of_vacancy" text,
  "replaced_by" text,
  "date_of_appointment" text,
  "position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the old manager vacate his position in Plymouth Argyle?`:
```sql
                SELECT "date_of_vacancy" FROM "managerial_changes" WHERE "team"='Plymouth Argyle';
```
## Task
Generate a SQL query to answer the following question:
`Name the best uk team for university of birmingham`

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

CREATE TABLE "winners" (
  "year" text,
  "location" text,
  "class_1" text,
  "best_uk_team" text,
  "class_1_200" text,
  "class_3" text,
  "class_1a" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the best uk team for university of birmingham`:
```sql
                SELECT COUNT("best_uk_team") FROM "winners" WHERE "class_1_200"='University of Birmingham';
```
## Task
Generate a SQL query to answer the following question:
`Name the class 1-200 for university of hertfordshire for university of warwick`

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

CREATE TABLE "winners" (
  "year" text,
  "location" text,
  "class_1" text,
  "best_uk_team" text,
  "class_1_200" text,
  "class_3" text,
  "class_1a" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the class 1-200 for university of hertfordshire for university of warwick`:
```sql
                SELECT "class_1_200" FROM "winners" WHERE "best_uk_team"='University of Hertfordshire' AND "class_1a"='University of Warwick';
```
## Task
Generate a SQL query to answer the following question:
`Name the total location for dynamic events winner`

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

CREATE TABLE "winners" (
  "year" text,
  "location" text,
  "class_1" text,
  "best_uk_team" text,
  "class_1_200" text,
  "class_3" text,
  "class_1a" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total location for dynamic events winner`:
```sql
                SELECT COUNT("location") FROM "winners" WHERE "class_1_200"='Dynamic Events Winner';
```
## Task
Generate a SQL query to answer the following question:
`Name the class 3 for silverstone rmit university`

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

CREATE TABLE "winners" (
  "year" text,
  "location" text,
  "class_1" text,
  "best_uk_team" text,
  "class_1_200" text,
  "class_3" text,
  "class_1a" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the class 3 for silverstone rmit university`:
```sql
                SELECT "class_3" FROM "winners" WHERE "location"='Silverstone' AND "class_1"='RMIT University';
```
## Task
Generate a SQL query to answer the following question:
`When 4th, great lakes is the regular season what is the league?`

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

CREATE TABLE "year_by_year" (
  "year" real,
  "division" real,
  "league" text,
  "regular_season" text,
  "playoffs" text,
  "open_cup" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 4th, great lakes is the regular season what is the league?`:
```sql
                SELECT "league" FROM "year_by_year" WHERE "regular_season"='4th, Great Lakes';
```
## Task
Generate a SQL query to answer the following question:
`When 5th is the regular season what is the highest season?`

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

CREATE TABLE "year_by_year" (
  "year" real,
  "division" real,
  "league" text,
  "regular_season" text,
  "playoffs" text,
  "open_cup" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 5th is the regular season what is the highest season?`:
```sql
                SELECT MAX("division") FROM "year_by_year" WHERE "regular_season"='5th';
```