cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`What type of local government area is Yalata?`

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

CREATE TABLE "table1_23685890_2" (
  "local_government_area" text,
  "type" text,
  "major_town" text,
  "land_area_km" text,
  "pop_2006" real,
  "density_km_2" real,
  "towns" real,
  "est" real
);
### SQL
Given the database schema, here is the SQL query that answers `What type of local government area is Yalata?`:
```sql
                SELECT "type" FROM "table1_23685890_2" WHERE "local_government_area"='Yalata';
```
## Task
Generate a SQL query to answer the following question:
`What was the 2006 population count of the local government area where Coober Pedy is located?`

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

CREATE TABLE "table1_23685890_2" (
  "local_government_area" text,
  "type" text,
  "major_town" text,
  "land_area_km" text,
  "pop_2006" real,
  "density_km_2" real,
  "towns" real,
  "est" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the 2006 population count of the local government area where Coober Pedy is located?`:
```sql
                SELECT "pop_2006" FROM "table1_23685890_2" WHERE "major_town"='Coober Pedy';
```
## Task
Generate a SQL query to answer the following question:
`During what week was the game attended by 20114 people?`

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

CREATE TABLE "schedule" (
  "week" real,
  "date" text,
  "opponent" text,
  "location" text,
  "final_score" text,
  "attendance" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `During what week was the game attended by 20114 people?`:
```sql
                SELECT MAX("week") FROM "schedule" WHERE "attendance"=20114;
```
## Task
Generate a SQL query to answer the following question:
` What was the record in game played on July 28?`

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

CREATE TABLE "schedule" (
  "week" real,
  "date" text,
  "opponent" text,
  "location" text,
  "final_score" text,
  "attendance" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers ` What was the record in game played on July 28?`:
```sql
                SELECT "record" FROM "schedule" WHERE "date"='July 28';
```
## Task
Generate a SQL query to answer the following question:
`What was the record in the game against Eskimos?`

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

CREATE TABLE "schedule" (
  "week" real,
  "date" text,
  "opponent" text,
  "location" text,
  "final_score" text,
  "attendance" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the record in the game against Eskimos?`:
```sql
                SELECT "record" FROM "schedule" WHERE "opponent"='Eskimos';
```
## Task
Generate a SQL query to answer the following question:
`Whose WSOP earnings were $36,372? `

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

CREATE TABLE "2012" (
  "name" text,
  "starting_chip_count" real,
  "wsop_bracelets" real,
  "wsop_cashes" real,
  "wsop_earnings" text,
  "final_place" text,
  "prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `Whose WSOP earnings were $36,372? `:
```sql
                SELECT "name" FROM "2012" WHERE "wsop_earnings"='$36,372';
```
## Task
Generate a SQL query to answer the following question:
`The person who had 0 WSOP earnings had how man WSOP cashes?`

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

CREATE TABLE "2012" (
  "name" text,
  "starting_chip_count" real,
  "wsop_bracelets" real,
  "wsop_cashes" real,
  "wsop_earnings" text,
  "final_place" text,
  "prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `The person who had 0 WSOP earnings had how man WSOP cashes?`:
```sql
                SELECT "wsop_cashes" FROM "2012" WHERE "wsop_earnings"='0';
```
## Task
Generate a SQL query to answer the following question:
`Who had 2 WSOP cashes and was 6th in final place?`

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

CREATE TABLE "2012" (
  "name" text,
  "starting_chip_count" real,
  "wsop_bracelets" real,
  "wsop_cashes" real,
  "wsop_earnings" text,
  "final_place" text,
  "prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had 2 WSOP cashes and was 6th in final place?`:
```sql
                SELECT "name" FROM "2012" WHERE "wsop_cashes"=2 AND "final_place"='6th';
```
## Task
Generate a SQL query to answer the following question:
`What is the smallest amount of WSOP bracelets anyone had?`

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

CREATE TABLE "2012" (
  "name" text,
  "starting_chip_count" real,
  "wsop_bracelets" real,
  "wsop_cashes" real,
  "wsop_earnings" text,
  "final_place" text,
  "prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest amount of WSOP bracelets anyone had?`:
```sql
                SELECT MIN("wsop_bracelets") FROM "2012";
```
## Task
Generate a SQL query to answer the following question:
`The person who had $126,796 WSOP earnings had how many WSOP cashes? `

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

CREATE TABLE "2012" (
  "name" text,
  "starting_chip_count" real,
  "wsop_bracelets" real,
  "wsop_cashes" real,
  "wsop_earnings" text,
  "final_place" text,
  "prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `The person who had $126,796 WSOP earnings had how many WSOP cashes? `:
```sql
                SELECT "wsop_cashes" FROM "2012" WHERE "wsop_earnings"='$126,796';
```
## Task
Generate a SQL query to answer the following question:
`What is the high 10 profile number when the high profile is 80?`

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

CREATE TABLE "table1_237036_2" (
  "level" text,
  "luma_samples_s" real,
  "macroblocks_s" real,
  "luma_samples" real,
  "macroblocks" real,
  "baseline_extended_and_main_profiles" real,
  "high_profile" real,
  "high_10_profile" real,
  "examples_for_high_resolution_highest_frame_rate_max_stored_frames_toggle_additional_details" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the high 10 profile number when the high profile is 80?`:
```sql
                SELECT MAX("high_10_profile") FROM "table1_237036_2" WHERE "high_profile"=80;
```
## Task
Generate a SQL query to answer the following question:
`What is the baseline extended and main profiles when level is 1.3?`

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

CREATE TABLE "table1_237036_2" (
  "level" text,
  "luma_samples_s" real,
  "macroblocks_s" real,
  "luma_samples" real,
  "macroblocks" real,
  "baseline_extended_and_main_profiles" real,
  "high_profile" real,
  "high_10_profile" real,
  "examples_for_high_resolution_highest_frame_rate_max_stored_frames_toggle_additional_details" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the baseline extended and main profiles when level is 1.3?`:
```sql
                SELECT MIN("baseline_extended_and_main_profiles") FROM "table1_237036_2" WHERE "level"='1.3';
```
## Task
Generate a SQL query to answer the following question:
`What level has 11880 macroblocks and high 10 profile is 6000?`

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

CREATE TABLE "table1_237036_2" (
  "level" text,
  "luma_samples_s" real,
  "macroblocks_s" real,
  "luma_samples" real,
  "macroblocks" real,
  "baseline_extended_and_main_profiles" real,
  "high_profile" real,
  "high_10_profile" real,
  "examples_for_high_resolution_highest_frame_rate_max_stored_frames_toggle_additional_details" text
);
### SQL
Given the database schema, here is the SQL query that answers `What level has 11880 macroblocks and high 10 profile is 6000?`:
```sql
                SELECT "level" FROM "table1_237036_2" WHERE "macroblocks_s"=11880 AND "high_10_profile"=6000;
```
## Task
Generate a SQL query to answer the following question:
`What are the luma samples at level 1.3?`

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

CREATE TABLE "table1_237036_2" (
  "level" text,
  "luma_samples_s" real,
  "macroblocks_s" real,
  "luma_samples" real,
  "macroblocks" real,
  "baseline_extended_and_main_profiles" real,
  "high_profile" real,
  "high_10_profile" real,
  "examples_for_high_resolution_highest_frame_rate_max_stored_frames_toggle_additional_details" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the luma samples at level 1.3?`:
```sql
                SELECT "luma_samples_s" FROM "table1_237036_2" WHERE "level"='1.3';
```
## Task
Generate a SQL query to answer the following question:
`What is the high 10 profile when high profile is 160?`

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

CREATE TABLE "table1_237036_2" (
  "level" text,
  "luma_samples_s" real,
  "macroblocks_s" real,
  "luma_samples" real,
  "macroblocks" real,
  "baseline_extended_and_main_profiles" real,
  "high_profile" real,
  "high_10_profile" real,
  "examples_for_high_resolution_highest_frame_rate_max_stored_frames_toggle_additional_details" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the high 10 profile when high profile is 160?`:
```sql
                SELECT "high_10_profile" FROM "table1_237036_2" WHERE "high_profile"=160;
```
## Task
Generate a SQL query to answer the following question:
`What is the original air date if the ratings is 1.92 million?`

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

CREATE TABLE "table1_23705843_1" (
  "episode" text,
  "director" text,
  "writer" text,
  "original_air_date" text,
  "ratings_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the original air date if the ratings is 1.92 million?`:
```sql
                SELECT "original_air_date" FROM "table1_23705843_1" WHERE "ratings_millions"='1.92';
```
## Task
Generate a SQL query to answer the following question:
`What is the name of the writer when the ratings was 2.61 million?`

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

CREATE TABLE "table1_23705843_1" (
  "episode" text,
  "director" text,
  "writer" text,
  "original_air_date" text,
  "ratings_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the writer when the ratings was 2.61 million?`:
```sql
                SELECT "writer" FROM "table1_23705843_1" WHERE "ratings_millions"='2.61';
```
## Task
Generate a SQL query to answer the following question:
`What date did the episode "the killing (part two)" originally air?`

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

CREATE TABLE "table1_2370579_1" (
  "episode_num" real,
  "prod_num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "originalairdate" text,
  "filmed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date did the episode "the killing (part two)" originally air?`:
```sql
                SELECT "originalairdate" FROM "table1_2370579_1" WHERE "title"='\"The Killing (part two)\"';
```
## Task
Generate a SQL query to answer the following question:
`Who directed the episode written by Tony O'Grady (pseudonym of brian clemens)?`

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

CREATE TABLE "table1_2370579_1" (
  "episode_num" real,
  "prod_num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "originalairdate" text,
  "filmed" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed the episode written by Tony O'Grady (pseudonym of brian clemens)?`:
```sql
                SELECT "directed_by" FROM "table1_2370579_1" WHERE "written_by"='Tony O''Grady (pseudonym of Brian Clemens)';
```
## Task
Generate a SQL query to answer the following question:
`What is the production number for episode 23?`

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

CREATE TABLE "table1_2370579_1" (
  "episode_num" real,
  "prod_num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "originalairdate" text,
  "filmed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the production number for episode 23?`:
```sql
                SELECT MIN("prod_num") FROM "table1_2370579_1" WHERE "episode_num"=23;
```
## Task
Generate a SQL query to answer the following question:
`What month and year was "storm warning (part one)" filmed?`

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

CREATE TABLE "table1_2370579_1" (
  "episode_num" real,
  "prod_num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "originalairdate" text,
  "filmed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What month and year was "storm warning (part one)" filmed?`:
```sql
                SELECT "filmed" FROM "table1_2370579_1" WHERE "title"='\"Storm Warning (part one)\"';
```
## Task
Generate a SQL query to answer the following question:
`What is the colloquial translation of (s)he will sing? `

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

CREATE TABLE "future_tense" (
  "aromanian_gramustean_farshirot" text,
  "romanian_archaic" text,
  "romanian_colloquial" text,
  "romanian_modern" text,
  "english" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the colloquial translation of (s)he will sing? `:
```sql
                SELECT "romanian_colloquial" FROM "future_tense" WHERE "english"='(s)he will sing';
```
## Task
Generate a SQL query to answer the following question:
`What was the date of the game played in El Paso, Texas?`

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

CREATE TABLE "bowl_games" (
  "bowl_game" text,
  "date" text,
  "stadium" text,
  "city" text,
  "television" text,
  "matchup_results" text,
  "attendance" real,
  "payout_us" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game played in El Paso, Texas?`:
```sql
                SELECT "date" FROM "bowl_games" WHERE "city"='El Paso, Texas';
```
## Task
Generate a SQL query to answer the following question:
`How many different matchup/results appear in San Diego, California?`

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

CREATE TABLE "bowl_games" (
  "bowl_game" text,
  "date" text,
  "stadium" text,
  "city" text,
  "television" text,
  "matchup_results" text,
  "attendance" real,
  "payout_us" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many different matchup/results appear in San Diego, California?`:
```sql
                SELECT COUNT("matchup_results") FROM "bowl_games" WHERE "city"='San Diego, California';
```
## Task
Generate a SQL query to answer the following question:
`How many different items appear in the television column when the results where Iowa State 14, Minnesota 13?`

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

CREATE TABLE "bowl_games" (
  "bowl_game" text,
  "date" text,
  "stadium" text,
  "city" text,
  "television" text,
  "matchup_results" text,
  "attendance" real,
  "payout_us" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many different items appear in the television column when the results where Iowa State 14, Minnesota 13?`:
```sql
                SELECT COUNT("television") FROM "bowl_games" WHERE "matchup_results"='Iowa State 14, Minnesota 13';
```
## Task
Generate a SQL query to answer the following question:
`How many different items appear in he attendance column at Sun Devil Stadium?`

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

CREATE TABLE "bowl_games" (
  "bowl_game" text,
  "date" text,
  "stadium" text,
  "city" text,
  "television" text,
  "matchup_results" text,
  "attendance" real,
  "payout_us" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many different items appear in he attendance column at Sun Devil Stadium?`:
```sql
                SELECT COUNT("attendance") FROM "bowl_games" WHERE "stadium"='Sun Devil Stadium';
```
## Task
Generate a SQL query to answer the following question:
`In what bowl game was the result Oklahoma 31, Stanford 27?`

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

CREATE TABLE "bowl_games" (
  "bowl_game" text,
  "date" text,
  "stadium" text,
  "city" text,
  "television" text,
  "matchup_results" text,
  "attendance" real,
  "payout_us" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what bowl game was the result Oklahoma 31, Stanford 27?`:
```sql
                SELECT "bowl_game" FROM "bowl_games" WHERE "matchup_results"='Oklahoma 31, Stanford 27';
```
## Task
Generate a SQL query to answer the following question:
`What was the television that was dated December 28, 2009?`

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

CREATE TABLE "bowl_games" (
  "bowl_game" text,
  "date" text,
  "stadium" text,
  "city" text,
  "television" text,
  "matchup_results" text,
  "attendance" real,
  "payout_us" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the television that was dated December 28, 2009?`:
```sql
                SELECT "television" FROM "bowl_games" WHERE "date"='December 28, 2009';
```
## Task
Generate a SQL query to answer the following question:
`Which rank has a 2009 revenue of $296,000,000?`

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

CREATE TABLE "manufacturer_s_worldwide_ranking" (
  "rank" real,
  "company_name" text,
  "2008_rank" text,
  "2009_revenue" text,
  "north_american_brands" text,
  "world_headquarters" text,
  "country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which rank has a 2009 revenue of $296,000,000?`:
```sql
                SELECT "rank" FROM "manufacturer_s_worldwide_ranking" WHERE "2009_revenue"='$296,000,000';
```
## Task
Generate a SQL query to answer the following question:
`Which country has doosan infracore as then company name?`

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

CREATE TABLE "manufacturer_s_worldwide_ranking" (
  "rank" real,
  "company_name" text,
  "2008_rank" text,
  "2009_revenue" text,
  "north_american_brands" text,
  "world_headquarters" text,
  "country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which country has doosan infracore as then company name?`:
```sql
                SELECT "country" FROM "manufacturer_s_worldwide_ranking" WHERE "company_name"='Doosan Infracore';
```
## Task
Generate a SQL query to answer the following question:
`How many north american brands have world headquarters in sagamihara?`

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

CREATE TABLE "manufacturer_s_worldwide_ranking" (
  "rank" real,
  "company_name" text,
  "2008_rank" text,
  "2009_revenue" text,
  "north_american_brands" text,
  "world_headquarters" text,
  "country" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many north american brands have world headquarters in sagamihara?`:
```sql
                SELECT COUNT("north_american_brands") FROM "manufacturer_s_worldwide_ranking" WHERE "world_headquarters"='Sagamihara';
```
## Task
Generate a SQL query to answer the following question:
`Which company name has headquarters in nagaokakyo, kyoto?`

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

CREATE TABLE "manufacturer_s_worldwide_ranking" (
  "rank" real,
  "company_name" text,
  "2008_rank" text,
  "2009_revenue" text,
  "north_american_brands" text,
  "world_headquarters" text,
  "country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which company name has headquarters in nagaokakyo, kyoto?`:
```sql
                SELECT "company_name" FROM "manufacturer_s_worldwide_ranking" WHERE "world_headquarters"='Nagaokakyo, Kyoto';
```
## Task
Generate a SQL query to answer the following question:
`Which company name has a 2008 rank of n/a?`

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

CREATE TABLE "manufacturer_s_worldwide_ranking" (
  "rank" real,
  "company_name" text,
  "2008_rank" text,
  "2009_revenue" text,
  "north_american_brands" text,
  "world_headquarters" text,
  "country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which company name has a 2008 rank of n/a?`:
```sql
                SELECT COUNT("company_name") FROM "manufacturer_s_worldwide_ranking" WHERE "2008_rank"='N/A';
```
## Task
Generate a SQL query to answer the following question:
`what is the bore where the vehicle code is t214?`

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

CREATE TABLE "engines" (
  "vehicle_code" text,
  "bore_mm" text,
  "stroke_mm" text,
  "capacity_cm_3" real,
  "compression_ratio" text,
  "torque_n_m" real,
  "power_hp" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the bore where the vehicle code is t214?`:
```sql
                SELECT "bore_mm" FROM "engines" WHERE "vehicle_code"='T214';
```
## Task
Generate a SQL query to answer the following question:
`what is the compression ratio whre the torque is 208?`

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

CREATE TABLE "engines" (
  "vehicle_code" text,
  "bore_mm" text,
  "stroke_mm" text,
  "capacity_cm_3" real,
  "compression_ratio" text,
  "torque_n_m" real,
  "power_hp" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the compression ratio whre the torque is 208?`:
```sql
                SELECT "compression_ratio" FROM "engines" WHERE "torque_n_m"=208;
```
## Task
Generate a SQL query to answer the following question:
`what is the vehicle code where the bore is 79.4?`

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

CREATE TABLE "engines" (
  "vehicle_code" text,
  "bore_mm" text,
  "stroke_mm" text,
  "capacity_cm_3" real,
  "compression_ratio" text,
  "torque_n_m" real,
  "power_hp" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the vehicle code where the bore is 79.4?`:
```sql
                SELECT "vehicle_code" FROM "engines" WHERE "bore_mm"='79.4';
```
## Task
Generate a SQL query to answer the following question:
`what is the stroke where the vehicle code is t211?`

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

CREATE TABLE "engines" (
  "vehicle_code" text,
  "bore_mm" text,
  "stroke_mm" text,
  "capacity_cm_3" real,
  "compression_ratio" text,
  "torque_n_m" real,
  "power_hp" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the stroke where the vehicle code is t211?`:
```sql
                SELECT "stroke_mm" FROM "engines" WHERE "vehicle_code"='T211';
```
## Task
Generate a SQL query to answer the following question:
`What was the rating/share for 18-49 for the episode that had 5.90 million viewers? `

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

CREATE TABLE "season_1_2010" (
  "no" real,
  "episode" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "viewers_millions" text,
  "rank_timeslot" real,
  "rank_night" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the rating/share for 18-49 for the episode that had 5.90 million viewers? `:
```sql
                SELECT "rating_share_18_49" FROM "season_1_2010" WHERE "viewers_millions"='5.90';
```
## Task
Generate a SQL query to answer the following question:
`What was the title of episode 3?`

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

CREATE TABLE "season_1_2010" (
  "no" real,
  "episode" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "viewers_millions" text,
  "rank_timeslot" real,
  "rank_night" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the title of episode 3?`:
```sql
                SELECT "episode" FROM "season_1_2010" WHERE "no"=3;
```
## Task
Generate a SQL query to answer the following question:
`What number episode had a rating of 4.7?`

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

CREATE TABLE "season_1_2010" (
  "no" real,
  "episode" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "viewers_millions" text,
  "rank_timeslot" real,
  "rank_night" real
);
### SQL
Given the database schema, here is the SQL query that answers `What number episode had a rating of 4.7?`:
```sql
                SELECT MIN("no") FROM "season_1_2010" WHERE "rating"='4.7';
```
## Task
Generate a SQL query to answer the following question:
`What was the share for the "Lisa Kudrow" episode? `

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

CREATE TABLE "season_1_2010" (
  "no" real,
  "episode" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "viewers_millions" text,
  "rank_timeslot" real,
  "rank_night" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the share for the "Lisa Kudrow" episode? `:
```sql
                SELECT MIN("share") FROM "season_1_2010" WHERE "episode"='\"Lisa Kudrow\"';
```
## Task
Generate a SQL query to answer the following question:
`What was the rating for the episode that had 5.90 million viewers? `

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

CREATE TABLE "season_1_2010" (
  "no" real,
  "episode" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "viewers_millions" text,
  "rank_timeslot" real,
  "rank_night" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the rating for the episode that had 5.90 million viewers? `:
```sql
                SELECT "rating" FROM "season_1_2010" WHERE "viewers_millions"='5.90';
```
## Task
Generate a SQL query to answer the following question:
`What number episode had a 4.2 rating? `

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

CREATE TABLE "season_1_2010" (
  "no" real,
  "episode" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "viewers_millions" text,
  "rank_timeslot" real,
  "rank_night" real
);
### SQL
Given the database schema, here is the SQL query that answers `What number episode had a 4.2 rating? `:
```sql
                SELECT MIN("no") FROM "season_1_2010" WHERE "rating"='4.2';
```
## Task
Generate a SQL query to answer the following question:
`What is the winning coach total number if the top team in regular season (points) is the Kansas City Spurs (110 points)?`

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

CREATE TABLE "by_year" (
  "year" real,
  "winner_number_of_titles" text,
  "runners_up" text,
  "top_team_in_regular_season_points" text,
  "top_scorer_points" text,
  "winning_coach" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the winning coach total number if the top team in regular season (points) is the Kansas City Spurs (110 points)?`:
```sql
                SELECT COUNT("winning_coach") FROM "by_year" WHERE "top_team_in_regular_season_points"='Kansas City Spurs (110 points)';
```
## Task
Generate a SQL query to answer the following question:
`If the top team in regular season (points) is the New York Cosmos (200 points), what is the winner (number of titles)?`

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

CREATE TABLE "by_year" (
  "year" real,
  "winner_number_of_titles" text,
  "runners_up" text,
  "top_team_in_regular_season_points" text,
  "top_scorer_points" text,
  "winning_coach" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the top team in regular season (points) is the New York Cosmos (200 points), what is the winner (number of titles)?`:
```sql
                SELECT "winner_number_of_titles" FROM "by_year" WHERE "top_team_in_regular_season_points"='New York Cosmos (200 points)';
```
## Task
Generate a SQL query to answer the following question:
`If the runner-up is the Fort Lauderdale Strikers, what is the winner (number of titles)?`

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

CREATE TABLE "by_year" (
  "year" real,
  "winner_number_of_titles" text,
  "runners_up" text,
  "top_team_in_regular_season_points" text,
  "top_scorer_points" text,
  "winning_coach" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the runner-up is the Fort Lauderdale Strikers, what is the winner (number of titles)?`:
```sql
                SELECT "winner_number_of_titles" FROM "by_year" WHERE "runners_up"='Fort Lauderdale Strikers';
```
## Task
Generate a SQL query to answer the following question:
`How many figures for Other in the district where the GN division is 95?`

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

CREATE TABLE "table1_23777640_1" (
  "administrative_district" text,
  "ds_divisions" real,
  "gn_divisions" real,
  "total_area_km_2" real,
  "land_area_km_2" real,
  "sri_lankan_tamil" real,
  "sri_lankan_moors" real,
  "sinhalese" real,
  "indian_tamil" real,
  "other" real,
  "total" real,
  "population_density_km_2" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many figures for Other in the district where the GN division is 95?`:
```sql
                SELECT COUNT("other") FROM "table1_23777640_1" WHERE "gn_divisions"=95;
```
## Task
Generate a SQL query to answer the following question:
`What was the market share of the operator whose technology is CDMA EVDO GSM EDGE HSPA+?`

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

CREATE TABLE "in_operation" (
  "rank" real,
  "operators_name" text,
  "technology" text,
  "subscribers_in_millions" text,
  "ownership" text,
  "market_share" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the market share of the operator whose technology is CDMA EVDO GSM EDGE HSPA+?`:
```sql
                SELECT "market_share" FROM "in_operation" WHERE "technology"='CDMA EVDO GSM EDGE HSPA+';
```
## Task
Generate a SQL query to answer the following question:
`What was the rank of operator whose technology is CDMA EVDO?`

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

CREATE TABLE "in_operation" (
  "rank" real,
  "operators_name" text,
  "technology" text,
  "subscribers_in_millions" text,
  "ownership" text,
  "market_share" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the rank of operator whose technology is CDMA EVDO?`:
```sql
                SELECT MIN("rank") FROM "in_operation" WHERE "technology"='CDMA EVDO';
```
## Task
Generate a SQL query to answer the following question:
`What was the production code for the episode directed by Michael Morris?`

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

CREATE TABLE "table1_23793770_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 `What was the production code for the episode directed by Michael Morris?`:
```sql
                SELECT MIN("production_code") FROM "table1_23793770_1" WHERE "directed_by"='Michael Morris';
```
## Task
Generate a SQL query to answer the following question:
`What is the title the episode directed by Allison Liddi-Brown?`

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

CREATE TABLE "table1_23793770_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 `What is the title the episode directed by Allison Liddi-Brown?`:
```sql
                SELECT "title" FROM "table1_23793770_1" WHERE "directed_by"='Allison Liddi-Brown';
```
## Task
Generate a SQL query to answer the following question:
`What the production code for the episode with 16.10 U.S. viewers?`

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

CREATE TABLE "table1_23793770_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 `What the production code for the episode with 16.10 U.S. viewers?`:
```sql
                SELECT MAX("production_code") FROM "table1_23793770_1" WHERE "u_s_viewers_millions"='16.10';
```
## Task
Generate a SQL query to answer the following question:
`what is the episode title on original air date of September 30, 2007?`

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

CREATE TABLE "ratings" (
  "episode_number_production_number" text,
  "title" text,
  "original_airing" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "total_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the episode title on original air date of September 30, 2007?`:
```sql
                SELECT "title" FROM "ratings" WHERE "original_airing"='September 30, 2007';
```
## Task
Generate a SQL query to answer the following question:
`What is the rating if the rating/share (18-49) is 3.6?`

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

CREATE TABLE "ratings" (
  "episode_number_production_number" text,
  "title" text,
  "original_airing" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "total_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rating if the rating/share (18-49) is 3.6?`:
```sql
                SELECT "rating" FROM "ratings" WHERE "rating_share_18_49"='3.6';
```
## Task
Generate a SQL query to answer the following question:
`What is the rating/share total number if the total viewers is 12.75 million?`

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

CREATE TABLE "ratings" (
  "episode_number_production_number" text,
  "title" text,
  "original_airing" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "total_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rating/share total number if the total viewers is 12.75 million?`:
```sql
                SELECT COUNT("rating_share_18_49") FROM "ratings" WHERE "total_viewers_in_millions"='12.75';
```
## Task
Generate a SQL query to answer the following question:
`If the rating is 9.1, what was the total viewers?`

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

CREATE TABLE "ratings" (
  "episode_number_production_number" text,
  "title" text,
  "original_airing" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "total_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the rating is 9.1, what was the total viewers?`:
```sql
                SELECT "total_viewers_in_millions" FROM "ratings" WHERE "rating"='9.1';
```
## Task
Generate a SQL query to answer the following question:
`What was the reating share when the total viewers was 11.49 million?`

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

CREATE TABLE "ratings" (
  "episode_number_production_number" text,
  "title" text,
  "original_airing" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "total_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the reating share when the total viewers was 11.49 million?`:
```sql
                SELECT "rating_share_18_49" FROM "ratings" WHERE "total_viewers_in_millions"='11.49';
```
## Task
Generate a SQL query to answer the following question:
`What was the name of the show that had 10.47 million total viewers?`

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

CREATE TABLE "ratings" (
  "episode_number_production_number" text,
  "title" text,
  "original_airing" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "total_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the name of the show that had 10.47 million total viewers?`:
```sql
                SELECT "title" FROM "ratings" WHERE "total_viewers_in_millions"='10.47';
```
## Task
Generate a SQL query to answer the following question:
`How many shows had 12.46 total viewers?`

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

CREATE TABLE "ratings" (
  "episode_number_production_number" text,
  "title" text,
  "original_airing" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "total_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many shows had 12.46 total viewers?`:
```sql
                SELECT COUNT("title") FROM "ratings" WHERE "total_viewers_in_millions"='12.46';
```
## Task
Generate a SQL query to answer the following question:
`What episode had 10.47 total viewers? `

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

CREATE TABLE "ratings" (
  "episode_number_production_number" text,
  "title" text,
  "original_airing" text,
  "rating" text,
  "share" real,
  "rating_share_18_49" text,
  "total_viewers_in_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What episode had 10.47 total viewers? `:
```sql
                SELECT "title" FROM "ratings" WHERE "total_viewers_in_millions"='10.47';
```
## Task
Generate a SQL query to answer the following question:
`If the establishment is 49319, what is the sales, receipts or shipments maximum amount?`

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

CREATE TABLE "table1_23802822_1" (
  "sector" text,
  "establishments" real,
  "sales_receipts_or_shipments_1_000" real,
  "annual_payroll_1_000" real,
  "paid_employees" real
);
### SQL
Given the database schema, here is the SQL query that answers `If the establishment is 49319, what is the sales, receipts or shipments maximum amount?`:
```sql
                SELECT MAX("sales_receipts_or_shipments_1_000") FROM "table1_23802822_1" WHERE "establishments"=49319;
```
## Task
Generate a SQL query to answer the following question:
`If the annual payroll is 21173895, what is the establishments?`

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

CREATE TABLE "table1_23802822_1" (
  "sector" text,
  "establishments" real,
  "sales_receipts_or_shipments_1_000" real,
  "annual_payroll_1_000" real,
  "paid_employees" real
);
### SQL
Given the database schema, here is the SQL query that answers `If the annual payroll is 21173895, what is the establishments?`:
```sql
                SELECT "establishments" FROM "table1_23802822_1" WHERE "annual_payroll_1_000"=21173895;
```
## Task
Generate a SQL query to answer the following question:
`What is the sector is the establishment is 110313?`

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

CREATE TABLE "table1_23802822_1" (
  "sector" text,
  "establishments" real,
  "sales_receipts_or_shipments_1_000" real,
  "annual_payroll_1_000" real,
  "paid_employees" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sector is the establishment is 110313?`:
```sql
                SELECT "sector" FROM "table1_23802822_1" WHERE "establishments"=110313;
```
## Task
Generate a SQL query to answer the following question:
`How many different Leagues had average attendance of 3589?`

### 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,
  "avg_attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many different Leagues had average attendance of 3589?`:
```sql
                SELECT COUNT("league") FROM "year_by_year" WHERE "avg_attendance"=3589;
```
## Task
Generate a SQL query to answer the following question:
`How many people saw the 3rd, Central regular season on average?`

### 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,
  "avg_attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many people saw the 3rd, Central regular season on average?`:
```sql
                SELECT MIN("avg_attendance") FROM "year_by_year" WHERE "regular_season"='3rd, Central';
```
## Task
Generate a SQL query to answer the following question:
`What League was played in 2007?`

### 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,
  "avg_attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What League was played in 2007?`:
```sql
                SELECT "league" FROM "year_by_year" WHERE "year"=2007;
```
## Task
Generate a SQL query to answer the following question:
`When was the average attendance 789?`

### 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,
  "avg_attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `When was the average attendance 789?`:
```sql
                SELECT MIN("year") FROM "year_by_year" WHERE "avg_attendance"=789;
```
## Task
Generate a SQL query to answer the following question:
`what is the score in fg-fga if in ft-fta is 16-21`

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

CREATE TABLE "player_stats" (
  "player" text,
  "gp_gs" text,
  "min_avg" text,
  "fg_fga" text,
  "fg_pct" text,
  "3_fg_fga" text,
  "3_fg_pct" text,
  "ft_fta" text,
  "ft_pct" text,
  "reb" real,
  "ast" real,
  "blk" real,
  "stl" real,
  "pts" real,
  "avg_pts" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the score in fg-fga if in ft-fta is 16-21`:
```sql
                SELECT "fg_fga" FROM "player_stats" WHERE "ft_fta"='16-21';
```
## Task
Generate a SQL query to answer the following question:
`if the 3fg-fga is 1-20 what is the number in ft pct`

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

CREATE TABLE "player_stats" (
  "player" text,
  "gp_gs" text,
  "min_avg" text,
  "fg_fga" text,
  "fg_pct" text,
  "3_fg_fga" text,
  "3_fg_pct" text,
  "ft_fta" text,
  "ft_pct" text,
  "reb" real,
  "ast" real,
  "blk" real,
  "stl" real,
  "pts" real,
  "avg_pts" text
);
### SQL
Given the database schema, here is the SQL query that answers `if the 3fg-fga is 1-20 what is the number in ft pct`:
```sql
                SELECT COUNT("ft_pct") FROM "player_stats" WHERE "3_fg_fga"='1-20';
```
## Task
Generate a SQL query to answer the following question:
`in the ft pct .667 what is the number of gp-gs`

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

CREATE TABLE "player_stats" (
  "player" text,
  "gp_gs" text,
  "min_avg" text,
  "fg_fga" text,
  "fg_pct" text,
  "3_fg_fga" text,
  "3_fg_pct" text,
  "ft_fta" text,
  "ft_pct" text,
  "reb" real,
  "ast" real,
  "blk" real,
  "stl" real,
  "pts" real,
  "avg_pts" text
);
### SQL
Given the database schema, here is the SQL query that answers `in the ft pct .667 what is the number of gp-gs`:
```sql
                SELECT COUNT("gp_gs") FROM "player_stats" WHERE "ft_pct"='.667';
```
## Task
Generate a SQL query to answer the following question:
`Name the team number 1 for san lorenzo`

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

CREATE TABLE "matches" (
  "team_num1" text,
  "points" text,
  "team_num2" text,
  "1st_leg" text,
  "2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the team number 1 for san lorenzo`:
```sql
                SELECT "team_num1" FROM "matches" WHERE "team_num2"='San Lorenzo';
```
## Task
Generate a SQL query to answer the following question:
`Name the team #2 for river plate`

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

CREATE TABLE "matches" (
  "team_num1" text,
  "points" text,
  "team_num2" text,
  "1st_leg" text,
  "2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the team #2 for river plate`:
```sql
                SELECT "team_num2" FROM "matches" WHERE "team_num1"='River Plate';
```
## Task
Generate a SQL query to answer the following question:
`Name the points for zamora`

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

CREATE TABLE "matches" (
  "team_num1" text,
  "points" text,
  "team_num2" text,
  "1st_leg" text,
  "2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the points for zamora`:
```sql
                SELECT "points" FROM "matches" WHERE "team_num1"='Zamora';
```
## Task
Generate a SQL query to answer the following question:
`Name the 2nd leg for boca juniors`

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

CREATE TABLE "matches" (
  "team_num1" text,
  "points" text,
  "team_num2" text,
  "1st_leg" text,
  "2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 2nd leg for boca juniors`:
```sql
                SELECT "2nd_leg" FROM "matches" WHERE "team_num1"='Boca Juniors';
```