cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`Which Game is the average one that has a February larger than 20, and a Record of 41–17–4, and Points smaller than 86?`

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

CREATE TABLE "regular_season" (
  "game" real,
  "february" real,
  "opponent" text,
  "score" text,
  "record" text,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Game is the average one that has a February larger than 20, and a Record of 41–17–4, and Points smaller than 86?`:
```sql
                SELECT AVG("game") FROM "regular_season" WHERE "february">20 AND "record"='41–17–4' AND "points"<86;
```
## Task
Generate a SQL query to answer the following question:
`what country hosted david toms`

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

CREATE TABLE "third_round" (
  "place" text,
  "player" text,
  "country" text,
  "score" text,
  "to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `what country hosted david toms`:
```sql
                SELECT "country" FROM "third_round" WHERE "player"='david toms';
```
## Task
Generate a SQL query to answer the following question:
`What was the score for game 18?`

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

CREATE TABLE "schedule_and_results" (
  "game" real,
  "date" real,
  "opponent" text,
  "score" text,
  "location_attendance" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score for game 18?`:
```sql
                SELECT "score" FROM "schedule_and_results" WHERE "game"=18;
```
## Task
Generate a SQL query to answer the following question:
`What is the kickoff time for the game that was at Ralph Wilson Stadium?`

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

CREATE TABLE "regular_season" (
  "week" real,
  "date" text,
  "opponent" text,
  "result" text,
  "game_site" text,
  "kickoff_et" text,
  "nfl_recap" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the kickoff time for the game that was at Ralph Wilson Stadium?`:
```sql
                SELECT "kickoff_et" FROM "regular_season" WHERE "game_site"='ralph wilson stadium';
```
## Task
Generate a SQL query to answer the following question:
`What is the record for the game against the New England Patriots with a recap?`

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

CREATE TABLE "regular_season" (
  "week" real,
  "date" text,
  "opponent" text,
  "result" text,
  "game_site" text,
  "kickoff_et" text,
  "nfl_recap" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record for the game against the New England Patriots with a recap?`:
```sql
                SELECT "record" FROM "regular_season" WHERE "nfl_recap"='recap' AND "opponent"='new england patriots';
```
## Task
Generate a SQL query to answer the following question:
`What is the result of the game on week 11?`

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

CREATE TABLE "regular_season" (
  "week" real,
  "date" text,
  "opponent" text,
  "result" text,
  "game_site" text,
  "kickoff_et" text,
  "nfl_recap" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result of the game on week 11?`:
```sql
                SELECT "result" FROM "regular_season" WHERE "week"=11;
```
## Task
Generate a SQL query to answer the following question:
`Who was the visitor that led to a 3-0-2 record?`

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

CREATE TABLE "october" (
  "date" text,
  "visitor" text,
  "score" text,
  "home" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the visitor that led to a 3-0-2 record?`:
```sql
                SELECT "visitor" FROM "october" WHERE "record"='3-0-2';
```
## Task
Generate a SQL query to answer the following question:
`What is the original title of the Gypsy Magic film title used in nomination?`

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

CREATE TABLE "submissions" (
  "year_ceremony" text,
  "film_title_used_in_nomination" text,
  "original_title" text,
  "language_s" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the original title of the Gypsy Magic film title used in nomination?`:
```sql
                SELECT "original_title" FROM "submissions" WHERE "film_title_used_in_nomination"='gypsy magic';
```
## Task
Generate a SQL query to answer the following question:
`Name the builder for number 3`

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

CREATE TABLE "locomotives" (
  "number" real,
  "builder" text,
  "type" text,
  "date" text,
  "works_number" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the builder for number 3`:
```sql
                SELECT "builder" FROM "locomotives" WHERE "number"=3;
```
## Task
Generate a SQL query to answer the following question:
`Name the date with works number less than 1673 and number less than 3`

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

CREATE TABLE "locomotives" (
  "number" real,
  "builder" text,
  "type" text,
  "date" text,
  "works_number" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the date with works number less than 1673 and number less than 3`:
```sql
                SELECT "date" FROM "locomotives" WHERE "works_number"<1673 AND "number"<3;
```
## Task
Generate a SQL query to answer the following question:
`Name the builder for 4/1906 and works number more than 199`

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

CREATE TABLE "locomotives" (
  "number" real,
  "builder" text,
  "type" text,
  "date" text,
  "works_number" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the builder for 4/1906 and works number more than 199`:
```sql
                SELECT "builder" FROM "locomotives" WHERE "works_number">199 AND "date"='4/1906';
```
## Task
Generate a SQL query to answer the following question:
`What was the largest number of people in attendance of the game with a W 14-3 result after week 10?`

### 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,
  "result" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the largest number of people in attendance of the game with a W 14-3 result after week 10?`:
```sql
                SELECT MAX("attendance") FROM "schedule" WHERE "result"='w 14-3' AND "week">10;
```
## Task
Generate a SQL query to answer the following question:
`What is the percentage for Zares on May 21–22?`

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

CREATE TABLE "opinion_polls" (
  "source" text,
  "date" text,
  "de_sus" text,
  "zares" text,
  "nlpd" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the percentage for Zares on May 21–22?`:
```sql
                SELECT "zares" FROM "opinion_polls" WHERE "date"='may 21–22';
```
## Task
Generate a SQL query to answer the following question:
`What is the source for 7% DeSUS?`

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

CREATE TABLE "opinion_polls" (
  "source" text,
  "date" text,
  "de_sus" text,
  "zares" text,
  "nlpd" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the source for 7% DeSUS?`:
```sql
                SELECT "source" FROM "opinion_polls" WHERE "de_sus"='7%';
```
## Task
Generate a SQL query to answer the following question:
`What is the source for Zares at 8.6%?`

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

CREATE TABLE "opinion_polls" (
  "source" text,
  "date" text,
  "de_sus" text,
  "zares" text,
  "nlpd" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the source for Zares at 8.6%?`:
```sql
                SELECT "source" FROM "opinion_polls" WHERE "zares"='8.6%';
```
## Task
Generate a SQL query to answer the following question:
`What is the source corresponding to a date of May 25–27?`

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

CREATE TABLE "opinion_polls" (
  "source" text,
  "date" text,
  "de_sus" text,
  "zares" text,
  "nlpd" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the source corresponding to a date of May 25–27?`:
```sql
                SELECT "source" FROM "opinion_polls" WHERE "date"='may 25–27';
```
## Task
Generate a SQL query to answer the following question:
`What song is done by Terence Trent D'Arby?`

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

CREATE TABLE "see_also" (
  "volume_issue" text,
  "issue_date_s" text,
  "weeks_on_top" real,
  "song" text,
  "artist" text
);
### SQL
Given the database schema, here is the SQL query that answers `What song is done by Terence Trent D'Arby?`:
```sql
                SELECT "song" FROM "see_also" WHERE "artist"='terence trent d''arby';
```
## Task
Generate a SQL query to answer the following question:
`What was the Result on October 27, 2002?`

### 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,
  "result" text,
  "game_site" text,
  "record" text,
  "attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Result on October 27, 2002?`:
```sql
                SELECT "result" FROM "schedule" WHERE "date"='october 27, 2002';
```
## Task
Generate a SQL query to answer the following question:
`in riyadh, saudi arabia, what is the score?`

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

CREATE TABLE "international_goals" (
  "date" text,
  "venue" text,
  "score" text,
  "result" text,
  "competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `in riyadh, saudi arabia, what is the score?`:
```sql
                SELECT "score" FROM "international_goals" WHERE "venue"='riyadh, saudi arabia';
```
## Task
Generate a SQL query to answer the following question:
`Which Pocona Municipality (%) is the lowest one that has a Puerto Villarroel Municipality (%) smaller than 14.6, and a Chimoré Municipality (%) of 5.1, and an Entre Ríos Municipality (%) smaller than 0.9?`

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

CREATE TABLE "the_people" (
  "ethnic_group" text,
  "totora_municipality_pct" real,
  "pojo_municipality_pct" real,
  "pocona_municipality_pct" real,
  "chimor_municipality_pct" real,
  "puerto_villarroel_municipality_pct" real,
  "entre_r_os_municipality_pct" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Pocona Municipality (%) is the lowest one that has a Puerto Villarroel Municipality (%) smaller than 14.6, and a Chimoré Municipality (%) of 5.1, and an Entre Ríos Municipality (%) smaller than 0.9?`:
```sql
                SELECT MIN("pocona_municipality_pct") FROM "the_people" WHERE "puerto_villarroel_municipality_pct"<14.6 AND "chimor_municipality_pct"=5.1 AND "entre_r_os_municipality_pct"<0.9;
```
## Task
Generate a SQL query to answer the following question:
`Which Puerto Villarroel Municipality (%) is the lowest one that has an Ethnic group of not indigenous, and a Totora Municipality (%) smaller than 4.4?`

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

CREATE TABLE "the_people" (
  "ethnic_group" text,
  "totora_municipality_pct" real,
  "pojo_municipality_pct" real,
  "pocona_municipality_pct" real,
  "chimor_municipality_pct" real,
  "puerto_villarroel_municipality_pct" real,
  "entre_r_os_municipality_pct" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Puerto Villarroel Municipality (%) is the lowest one that has an Ethnic group of not indigenous, and a Totora Municipality (%) smaller than 4.4?`:
```sql
                SELECT MIN("puerto_villarroel_municipality_pct") FROM "the_people" WHERE "ethnic_group"='not indigenous' AND "totora_municipality_pct"<4.4;
```
## Task
Generate a SQL query to answer the following question:
`Which Pocona Municipality (%) has a Puerto Villarroel Municipality (%) larger than 14.6, and a Pojo Municipality (%) smaller than 88.5?`

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

CREATE TABLE "the_people" (
  "ethnic_group" text,
  "totora_municipality_pct" real,
  "pojo_municipality_pct" real,
  "pocona_municipality_pct" real,
  "chimor_municipality_pct" real,
  "puerto_villarroel_municipality_pct" real,
  "entre_r_os_municipality_pct" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Pocona Municipality (%) has a Puerto Villarroel Municipality (%) larger than 14.6, and a Pojo Municipality (%) smaller than 88.5?`:
```sql
                SELECT SUM("pocona_municipality_pct") FROM "the_people" WHERE "puerto_villarroel_municipality_pct">14.6 AND "pojo_municipality_pct"<88.5;
```
## Task
Generate a SQL query to answer the following question:
`Which Totora Municipality (%) is the highest one that has a Chimoré Municipality (%) of 5.1, and a Pocona Municipality (%) smaller than 0.2?`

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

CREATE TABLE "the_people" (
  "ethnic_group" text,
  "totora_municipality_pct" real,
  "pojo_municipality_pct" real,
  "pocona_municipality_pct" real,
  "chimor_municipality_pct" real,
  "puerto_villarroel_municipality_pct" real,
  "entre_r_os_municipality_pct" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Totora Municipality (%) is the highest one that has a Chimoré Municipality (%) of 5.1, and a Pocona Municipality (%) smaller than 0.2?`:
```sql
                SELECT MAX("totora_municipality_pct") FROM "the_people" WHERE "chimor_municipality_pct"=5.1 AND "pocona_municipality_pct"<0.2;
```
## Task
Generate a SQL query to answer the following question:
`Which Pos has a Car # smaller than 18, and a Driver of mike skinner?`

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

CREATE TABLE "camping_world_200" (
  "pos" real,
  "car_num" real,
  "driver" text,
  "make" text,
  "team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Pos has a Car # smaller than 18, and a Driver of mike skinner?`:
```sql
                SELECT AVG("pos") FROM "camping_world_200" WHERE "car_num"<18 AND "driver"='mike skinner';
```
## Task
Generate a SQL query to answer the following question:
`Which Team has a Pos larger than 3, and a Make of toyota, and a Car # smaller than 59, and a Driver of mike skinner?`

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

CREATE TABLE "camping_world_200" (
  "pos" real,
  "car_num" real,
  "driver" text,
  "make" text,
  "team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Team has a Pos larger than 3, and a Make of toyota, and a Car # smaller than 59, and a Driver of mike skinner?`:
```sql
                SELECT "team" FROM "camping_world_200" WHERE "pos">3 AND "make"='toyota' AND "car_num"<59 AND "driver"='mike skinner';
```
## Task
Generate a SQL query to answer the following question:
`Which Pos has a Team of roush fenway racing, and a Car # of 99?`

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

CREATE TABLE "camping_world_200" (
  "pos" real,
  "car_num" real,
  "driver" text,
  "make" text,
  "team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Pos has a Team of roush fenway racing, and a Car # of 99?`:
```sql
                SELECT SUM("pos") FROM "camping_world_200" WHERE "team"='roush fenway racing' AND "car_num"=99;
```
## Task
Generate a SQL query to answer the following question:
`Which Car # has a Make of toyota, and a Pos of 7?`

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

CREATE TABLE "camping_world_200" (
  "pos" real,
  "car_num" real,
  "driver" text,
  "make" text,
  "team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Car # has a Make of toyota, and a Pos of 7?`:
```sql
                SELECT AVG("car_num") FROM "camping_world_200" WHERE "make"='toyota' AND "pos"=7;
```
## Task
Generate a SQL query to answer the following question:
`Which Pos has a Team of germian racing?`

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

CREATE TABLE "camping_world_200" (
  "pos" real,
  "car_num" real,
  "driver" text,
  "make" text,
  "team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Pos has a Team of germian racing?`:
```sql
                SELECT "pos" FROM "camping_world_200" WHERE "team"='germian racing';
```
## Task
Generate a SQL query to answer the following question:
`Which Opponent has a Score of 2–6?`

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

CREATE TABLE "playoffs" (
  "game" real,
  "date" text,
  "opponent" text,
  "score" text,
  "series" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Opponent has a Score of 2–6?`:
```sql
                SELECT "opponent" FROM "playoffs" WHERE "score"='2–6';
```
## Task
Generate a SQL query to answer the following question:
`Which Game has a Series of flyers win 3–0? Question 3`

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

CREATE TABLE "playoffs" (
  "game" real,
  "date" text,
  "opponent" text,
  "score" text,
  "series" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Game has a Series of flyers win 3–0? Question 3`:
```sql
                SELECT MAX("game") FROM "playoffs" WHERE "series"='flyers win 3–0';
```
## Task
Generate a SQL query to answer the following question:
`Which Series is on april 18?`

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

CREATE TABLE "playoffs" (
  "game" real,
  "date" text,
  "opponent" text,
  "score" text,
  "series" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Series is on april 18?`:
```sql
                SELECT "series" FROM "playoffs" WHERE "date"='april 18';
```
## Task
Generate a SQL query to answer the following question:
`Name the date with score of 9-2`

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

CREATE TABLE "game_log" (
  "date" text,
  "opponent" text,
  "score" text,
  "loss" text,
  "attendance" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the date with score of 9-2`:
```sql
                SELECT "date" FROM "game_log" WHERE "score"='9-2';
```
## Task
Generate a SQL query to answer the following question:
`Which Points is the highest one that has a Nationality of aut, and a Name of thomas morgenstern?`

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

CREATE TABLE "liberec" (
  "rank" real,
  "name" text,
  "nationality" text,
  "1st_m" real,
  "2nd_m" real,
  "points" real,
  "overall_wc_points_rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Points is the highest one that has a Nationality of aut, and a Name of thomas morgenstern?`:
```sql
                SELECT MAX("points") FROM "liberec" WHERE "nationality"='aut' AND "name"='thomas morgenstern';
```
## Task
Generate a SQL query to answer the following question:
`Which Name has a 2nd (m) larger than 128.5, and Points of 260.8?`

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

CREATE TABLE "liberec" (
  "rank" real,
  "name" text,
  "nationality" text,
  "1st_m" real,
  "2nd_m" real,
  "points" real,
  "overall_wc_points_rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Name has a 2nd (m) larger than 128.5, and Points of 260.8?`:
```sql
                SELECT "name" FROM "liberec" WHERE "2nd_m">128.5 AND "points"=260.8;
```
## Task
Generate a SQL query to answer the following question:
`What is the sum of the capacities for Carrigh wind warm that has a size of 0.85 MW and more than 3 turbines?`

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

CREATE TABLE "completed_onshore_wind_farms" (
  "wind_farm" text,
  "capacity_mw" real,
  "turbines" real,
  "turbine_vendor" text,
  "size_mw" text,
  "county" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the capacities for Carrigh wind warm that has a size of 0.85 MW and more than 3 turbines?`:
```sql
                SELECT SUM("capacity_mw") FROM "completed_onshore_wind_farms" WHERE "size_mw"='0.85' AND "wind_farm"='carrigh' AND "turbines">3;
```
## Task
Generate a SQL query to answer the following question:
`What is the size of the windfarm in wexford that has more than 19 turbines and a vendor of Enercon?`

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

CREATE TABLE "completed_onshore_wind_farms" (
  "wind_farm" text,
  "capacity_mw" real,
  "turbines" real,
  "turbine_vendor" text,
  "size_mw" text,
  "county" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the size of the windfarm in wexford that has more than 19 turbines and a vendor of Enercon?`:
```sql
                SELECT "size_mw" FROM "completed_onshore_wind_farms" WHERE "turbines">19 AND "turbine_vendor"='enercon' AND "county"='wexford';
```
## Task
Generate a SQL query to answer the following question:
`Who is the turbine vendor for Meenadreen in Donegal county with less than 6 turbines with a size of 0.85 MW?`

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

CREATE TABLE "completed_onshore_wind_farms" (
  "wind_farm" text,
  "capacity_mw" real,
  "turbines" real,
  "turbine_vendor" text,
  "size_mw" text,
  "county" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the turbine vendor for Meenadreen in Donegal county with less than 6 turbines with a size of 0.85 MW?`:
```sql
                SELECT "turbine_vendor" FROM "completed_onshore_wind_farms" WHERE "turbines"<6 AND "county"='donegal' AND "size_mw"='0.85' AND "wind_farm"='meenadreen';
```
## Task
Generate a SQL query to answer the following question:
`What is the population where the rank is higher than 51 and the Median House-hold income is $25,250?`

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

CREATE TABLE "new_mexico_places_ranked_by_per_capita_i" (
  "rank" real,
  "place" text,
  "county" text,
  "per_capita_income" text,
  "median_house_hold_income" text,
  "median_family_income" text,
  "population" real,
  "number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the population where the rank is higher than 51 and the Median House-hold income is $25,250?`:
```sql
                SELECT SUM("population") FROM "new_mexico_places_ranked_by_per_capita_i" WHERE "rank">51 AND "median_house_hold_income"='$25,250';
```
## Task
Generate a SQL query to answer the following question:
`What is the Population where the Median House-hold Income is $25,016?`

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

CREATE TABLE "new_mexico_places_ranked_by_per_capita_i" (
  "rank" real,
  "place" text,
  "county" text,
  "per_capita_income" text,
  "median_house_hold_income" text,
  "median_family_income" text,
  "population" real,
  "number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Population where the Median House-hold Income is $25,016?`:
```sql
                SELECT MIN("population") FROM "new_mexico_places_ranked_by_per_capita_i" WHERE "median_house_hold_income"='$25,016';
```
## Task
Generate a SQL query to answer the following question:
`What is the Number of Households that have a Per Capita Income of $21,345?`

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

CREATE TABLE "new_mexico_places_ranked_by_per_capita_i" (
  "rank" real,
  "place" text,
  "county" text,
  "per_capita_income" text,
  "median_house_hold_income" text,
  "median_family_income" text,
  "population" real,
  "number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Number of Households that have a Per Capita Income of $21,345?`:
```sql
                SELECT AVG("number_of_households") FROM "new_mexico_places_ranked_by_per_capita_i" WHERE "per_capita_income"='$21,345';
```
## Task
Generate a SQL query to answer the following question:
`What County has a Median Family Income of $79,331?`

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

CREATE TABLE "new_mexico_places_ranked_by_per_capita_i" (
  "rank" real,
  "place" text,
  "county" text,
  "per_capita_income" text,
  "median_house_hold_income" text,
  "median_family_income" text,
  "population" real,
  "number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `What County has a Median Family Income of $79,331?`:
```sql
                SELECT "county" FROM "new_mexico_places_ranked_by_per_capita_i" WHERE "median_family_income"='$79,331';
```
## Task
Generate a SQL query to answer the following question:
`The United States, with a total medal count of less than 171, and a bronze medal count less than 9, has how many gold medals?`

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

CREATE TABLE "world_championships_total_medals" (
  "rank" text,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `The United States, with a total medal count of less than 171, and a bronze medal count less than 9, has how many gold medals?`:
```sql
                SELECT MAX("gold") FROM "world_championships_total_medals" WHERE "total"<171 AND "nation"='united states' AND "bronze"<9;
```
## Task
Generate a SQL query to answer the following question:
`How many total gold medals did Australia receive?`

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

CREATE TABLE "world_championships_total_medals" (
  "rank" text,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many total gold medals did Australia receive?`:
```sql
                SELECT COUNT("gold") FROM "world_championships_total_medals" WHERE "nation"='australia';
```
## Task
Generate a SQL query to answer the following question:
`How many total bronze medals did Canada receive?`

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

CREATE TABLE "world_championships_total_medals" (
  "rank" text,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many total bronze medals did Canada receive?`:
```sql
                SELECT MAX("bronze") FROM "world_championships_total_medals" WHERE "nation"='canada';
```
## Task
Generate a SQL query to answer the following question:
`How many total gold medals did India receive?`

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

CREATE TABLE "world_championships_total_medals" (
  "rank" text,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many total gold medals did India receive?`:
```sql
                SELECT "gold" FROM "world_championships_total_medals" WHERE "nation"='india';
```
## Task
Generate a SQL query to answer the following question:
`Which 1997's accompanying 1991 was a when the tournament was the australian open?`

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

CREATE TABLE "mixed_doubles" (
  "tournament" text,
  "1989" text,
  "1990" text,
  "1991" text,
  "1992" text,
  "1993" text,
  "1994" text,
  "1995" text,
  "1996" text,
  "1997" text,
  "career_w_l" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which 1997's accompanying 1991 was a when the tournament was the australian open?`:
```sql
                SELECT "1997" FROM "mixed_doubles" WHERE "1991"='a' AND "tournament"='australian open';
```
## Task
Generate a SQL query to answer the following question:
`Which 1997's 1992 was 1r when 1994 was a?`

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

CREATE TABLE "mixed_doubles" (
  "tournament" text,
  "1989" text,
  "1990" text,
  "1991" text,
  "1992" text,
  "1993" text,
  "1994" text,
  "1995" text,
  "1996" text,
  "1997" text,
  "career_w_l" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which 1997's 1992 was 1r when 1994 was a?`:
```sql
                SELECT "1997" FROM "mixed_doubles" WHERE "1992"='1r' AND "1994"='a';
```
## Task
Generate a SQL query to answer the following question:
`Which 1995's tournament was the French Open?`

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

CREATE TABLE "mixed_doubles" (
  "tournament" text,
  "1989" text,
  "1990" text,
  "1991" text,
  "1992" text,
  "1993" text,
  "1994" text,
  "1995" text,
  "1996" text,
  "1997" text,
  "career_w_l" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which 1995's tournament was the French Open?`:
```sql
                SELECT "1995" FROM "mixed_doubles" WHERE "tournament"='french open';
```
## Task
Generate a SQL query to answer the following question:
`Which 1989's 1991 and 1994 stats were 1r?`

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

CREATE TABLE "mixed_doubles" (
  "tournament" text,
  "1989" text,
  "1990" text,
  "1991" text,
  "1992" text,
  "1993" text,
  "1994" text,
  "1995" text,
  "1996" text,
  "1997" text,
  "career_w_l" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which 1989's 1991 and 1994 stats were 1r?`:
```sql
                SELECT "1989" FROM "mixed_doubles" WHERE "1991"='1r' AND "1994"='1r';
```
## Task
Generate a SQL query to answer the following question:
`Which 1990s 1992 was 3r?`

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

CREATE TABLE "mixed_doubles" (
  "tournament" text,
  "1989" text,
  "1990" text,
  "1991" text,
  "1992" text,
  "1993" text,
  "1994" text,
  "1995" text,
  "1996" text,
  "1997" text,
  "career_w_l" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which 1990s 1992 was 3r?`:
```sql
                SELECT "1990" FROM "mixed_doubles" WHERE "1992"='3r';
```
## Task
Generate a SQL query to answer the following question:
`Which Linda McCartney has a Stuart of electric guitar?`

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

CREATE TABLE "instruments_played_by_band_members" (
  "paul_mc_cartney" text,
  "stuart" text,
  "mc_intosh" text,
  "whitten" text,
  "linda_mc_cartney" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Linda McCartney has a Stuart of electric guitar?`:
```sql
                SELECT "linda_mc_cartney" FROM "instruments_played_by_band_members" WHERE "stuart"='electric guitar';
```
## Task
Generate a SQL query to answer the following question:
`Which Whitten has a Stuart of bass, and a Paul McCartney of electric guitar?`

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

CREATE TABLE "instruments_played_by_band_members" (
  "paul_mc_cartney" text,
  "stuart" text,
  "mc_intosh" text,
  "whitten" text,
  "linda_mc_cartney" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Whitten has a Stuart of bass, and a Paul McCartney of electric guitar?`:
```sql
                SELECT "whitten" FROM "instruments_played_by_band_members" WHERE "stuart"='bass' AND "paul_mc_cartney"='electric guitar';
```
## Task
Generate a SQL query to answer the following question:
`Which McIntosh has a Whitten of drums, and a Stuart of bass, and a Paul McCartney of electric guitar?`

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

CREATE TABLE "instruments_played_by_band_members" (
  "paul_mc_cartney" text,
  "stuart" text,
  "mc_intosh" text,
  "whitten" text,
  "linda_mc_cartney" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which McIntosh has a Whitten of drums, and a Stuart of bass, and a Paul McCartney of electric guitar?`:
```sql
                SELECT "mc_intosh" FROM "instruments_played_by_band_members" WHERE "whitten"='drums' AND "stuart"='bass' AND "paul_mc_cartney"='electric guitar';
```
## Task
Generate a SQL query to answer the following question:
`Which Paul McCartney has a Linda McCartney of keyboards?`

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

CREATE TABLE "instruments_played_by_band_members" (
  "paul_mc_cartney" text,
  "stuart" text,
  "mc_intosh" text,
  "whitten" text,
  "linda_mc_cartney" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Paul McCartney has a Linda McCartney of keyboards?`:
```sql
                SELECT "paul_mc_cartney" FROM "instruments_played_by_band_members" WHERE "linda_mc_cartney"='keyboards';
```
## Task
Generate a SQL query to answer the following question:
`Which McIntosh has a Stuart of bass, and a Linda McCartney of keyboards or drum?`

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

CREATE TABLE "instruments_played_by_band_members" (
  "paul_mc_cartney" text,
  "stuart" text,
  "mc_intosh" text,
  "whitten" text,
  "linda_mc_cartney" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which McIntosh has a Stuart of bass, and a Linda McCartney of keyboards or drum?`:
```sql
                SELECT "mc_intosh" FROM "instruments_played_by_band_members" WHERE "stuart"='bass' AND "linda_mc_cartney"='keyboards or drum';
```
## Task
Generate a SQL query to answer the following question:
`Which Paul McCartney has a Linda McCartney of keyboards or drum?`

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

CREATE TABLE "instruments_played_by_band_members" (
  "paul_mc_cartney" text,
  "stuart" text,
  "mc_intosh" text,
  "whitten" text,
  "linda_mc_cartney" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Paul McCartney has a Linda McCartney of keyboards or drum?`:
```sql
                SELECT "paul_mc_cartney" FROM "instruments_played_by_band_members" WHERE "linda_mc_cartney"='keyboards or drum';
```
## Task
Generate a SQL query to answer the following question:
`What is the largest Grid that has a Bike of honda cbr1000rr, and a Time of +20.848, and a Lap greater than 24?`

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

CREATE TABLE "superbike_race_2_classification" (
  "rider" text,
  "bike" text,
  "laps" real,
  "time" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest Grid that has a Bike of honda cbr1000rr, and a Time of +20.848, and a Lap greater than 24?`:
```sql
                SELECT MAX("grid") FROM "superbike_race_2_classification" WHERE "bike"='honda cbr1000rr' AND "time"='+20.848' AND "laps">24;
```
## Task
Generate a SQL query to answer the following question:
`D'Oyly Carte 1920 Tour of hugh enes blackmore is what D'Oyly Carte 1930 Tour?`

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

CREATE TABLE "historical_casting" (
  "role" text,
  "d_oyly_carte_1920_tour" text,
  "d_oyly_carte_1930_tour" text,
  "d_oyly_carte_1939_tour" text,
  "d_oyly_carte_1945_tour" text,
  "d_oyly_carte_1950_tour" text
);
### SQL
Given the database schema, here is the SQL query that answers `D'Oyly Carte 1920 Tour of hugh enes blackmore is what D'Oyly Carte 1930 Tour?`:
```sql
                SELECT "d_oyly_carte_1930_tour" FROM "historical_casting" WHERE "d_oyly_carte_1920_tour"='hugh enes blackmore';
```
## Task
Generate a SQL query to answer the following question:
`D'Oyly Carte 1939 Tour of richard walker involves what D'Oyly Carte 1945 Tour?`

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

CREATE TABLE "historical_casting" (
  "role" text,
  "d_oyly_carte_1920_tour" text,
  "d_oyly_carte_1930_tour" text,
  "d_oyly_carte_1939_tour" text,
  "d_oyly_carte_1945_tour" text,
  "d_oyly_carte_1950_tour" text
);
### SQL
Given the database schema, here is the SQL query that answers `D'Oyly Carte 1939 Tour of richard walker involves what D'Oyly Carte 1945 Tour?`:
```sql
                SELECT "d_oyly_carte_1945_tour" FROM "historical_casting" WHERE "d_oyly_carte_1939_tour"='richard walker';
```
## Task
Generate a SQL query to answer the following question:
`D'Oyly Carte 1920 Tour of james turnbull is what D'Oyly Carte 1945 Tour?`

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

CREATE TABLE "historical_casting" (
  "role" text,
  "d_oyly_carte_1920_tour" text,
  "d_oyly_carte_1930_tour" text,
  "d_oyly_carte_1939_tour" text,
  "d_oyly_carte_1945_tour" text,
  "d_oyly_carte_1950_tour" text
);
### SQL
Given the database schema, here is the SQL query that answers `D'Oyly Carte 1920 Tour of james turnbull is what D'Oyly Carte 1945 Tour?`:
```sql
                SELECT "d_oyly_carte_1945_tour" FROM "historical_casting" WHERE "d_oyly_carte_1920_tour"='james turnbull';
```
## Task
Generate a SQL query to answer the following question:
`Role of wilfred is what D'Oyly Carte 1945 Tour?`

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

CREATE TABLE "historical_casting" (
  "role" text,
  "d_oyly_carte_1920_tour" text,
  "d_oyly_carte_1930_tour" text,
  "d_oyly_carte_1939_tour" text,
  "d_oyly_carte_1945_tour" text,
  "d_oyly_carte_1950_tour" text
);
### SQL
Given the database schema, here is the SQL query that answers `Role of wilfred is what D'Oyly Carte 1945 Tour?`:
```sql
                SELECT "d_oyly_carte_1945_tour" FROM "historical_casting" WHERE "role"='wilfred';
```
## Task
Generate a SQL query to answer the following question:
`D'Oyly Carte 1939 Tour of sydney granville had what D'Oyly Carte 1950 Tour`

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

CREATE TABLE "historical_casting" (
  "role" text,
  "d_oyly_carte_1920_tour" text,
  "d_oyly_carte_1930_tour" text,
  "d_oyly_carte_1939_tour" text,
  "d_oyly_carte_1945_tour" text,
  "d_oyly_carte_1950_tour" text
);
### SQL
Given the database schema, here is the SQL query that answers `D'Oyly Carte 1939 Tour of sydney granville had what D'Oyly Carte 1950 Tour`:
```sql
                SELECT "d_oyly_carte_1950_tour" FROM "historical_casting" WHERE "d_oyly_carte_1939_tour"='sydney granville';
```
## Task
Generate a SQL query to answer the following question:
`D'Oyly Carte 1930 Tour of john dean involved what D'Oyly Carte 1945 Tour?`

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

CREATE TABLE "historical_casting" (
  "role" text,
  "d_oyly_carte_1920_tour" text,
  "d_oyly_carte_1930_tour" text,
  "d_oyly_carte_1939_tour" text,
  "d_oyly_carte_1945_tour" text,
  "d_oyly_carte_1950_tour" text
);
### SQL
Given the database schema, here is the SQL query that answers `D'Oyly Carte 1930 Tour of john dean involved what D'Oyly Carte 1945 Tour?`:
```sql
                SELECT "d_oyly_carte_1945_tour" FROM "historical_casting" WHERE "d_oyly_carte_1930_tour"='john dean';
```
## Task
Generate a SQL query to answer the following question:
`The nation of denmark has what average total nad more than 0 gold?`

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

CREATE TABLE "medal_table" (
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `The nation of denmark has what average total nad more than 0 gold?`:
```sql
                SELECT AVG("total") FROM "medal_table" WHERE "nation"='denmark' AND "gold">0;
```
## Task
Generate a SQL query to answer the following question:
`Switzerland has how many gold and less than 0 silver?`

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

CREATE TABLE "medal_table" (
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Switzerland has how many gold and less than 0 silver?`:
```sql
                SELECT MAX("gold") FROM "medal_table" WHERE "nation"='switzerland' AND "silver"<0;
```
## Task
Generate a SQL query to answer the following question:
`How many wins does the player ranked lower than 3 with earnings of $3,315,502 have?`

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

CREATE TABLE "leaders" (
  "rank" real,
  "player" text,
  "country" text,
  "earnings" real,
  "wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins does the player ranked lower than 3 with earnings of $3,315,502 have?`:
```sql
                SELECT SUM("wins") FROM "leaders" WHERE "rank">3 AND "earnings">'3,315,502';
```
## Task
Generate a SQL query to answer the following question:
`What is the highest number of wins of the player with less than $4,976,980 in earnings and a rank lower than 4?`

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

CREATE TABLE "leaders" (
  "rank" real,
  "player" text,
  "country" text,
  "earnings" real,
  "wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of wins of the player with less than $4,976,980 in earnings and a rank lower than 4?`:
```sql
                SELECT MAX("wins") FROM "leaders" WHERE "earnings"<'4,976,980' AND "rank">4;
```
## Task
Generate a SQL query to answer the following question:
`How many years had a score of 734-5d?`

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

CREATE TABLE "highest_lancashire_totals" (
  "score" text,
  "opposition" text,
  "venue" text,
  "city" text,
  "year" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many years had a score of 734-5d?`:
```sql
                SELECT COUNT("year") FROM "highest_lancashire_totals" WHERE "score"='734-5d';
```
## Task
Generate a SQL query to answer the following question:
`Which venue had a city of Manchester before 2003?`

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

CREATE TABLE "highest_lancashire_totals" (
  "score" text,
  "opposition" text,
  "venue" text,
  "city" text,
  "year" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue had a city of Manchester before 2003?`:
```sql
                SELECT "venue" FROM "highest_lancashire_totals" WHERE "city"='manchester' AND "year"<2003;
```
## Task
Generate a SQL query to answer the following question:
`Which venue had a city of Manchester in 2003?`

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

CREATE TABLE "highest_lancashire_totals" (
  "score" text,
  "opposition" text,
  "venue" text,
  "city" text,
  "year" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue had a city of Manchester in 2003?`:
```sql
                SELECT "venue" FROM "highest_lancashire_totals" WHERE "city"='manchester' AND "year"=2003;
```
## Task
Generate a SQL query to answer the following question:
`Which venue had a score of 734-5d?`

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

CREATE TABLE "highest_lancashire_totals" (
  "score" text,
  "opposition" text,
  "venue" text,
  "city" text,
  "year" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue had a score of 734-5d?`:
```sql
                SELECT "venue" FROM "highest_lancashire_totals" WHERE "score"='734-5d';
```
## Task
Generate a SQL query to answer the following question:
`What is the average number of top-5s for the major with 5 top-10s and fewer than 12 cuts made?`

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

CREATE TABLE "summary" (
  "tournament" text,
  "wins" real,
  "top_5" real,
  "top_10" real,
  "top_25" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of top-5s for the major with 5 top-10s and fewer than 12 cuts made?`:
```sql
                SELECT AVG("top_5") FROM "summary" WHERE "top_10"=5 AND "cuts_made"<12;
```
## Task
Generate a SQL query to answer the following question:
`What is the average number of top-10s for the major with 2 top-25s and fewer than 10 cuts made?`

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

CREATE TABLE "summary" (
  "tournament" text,
  "wins" real,
  "top_5" real,
  "top_10" real,
  "top_25" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of top-10s for the major with 2 top-25s and fewer than 10 cuts made?`:
```sql
                SELECT AVG("top_10") FROM "summary" WHERE "top_25"=2 AND "cuts_made"<10;
```
## Task
Generate a SQL query to answer the following question:
`What is the total number of top-25s for the major that has 11 top-10s?`

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

CREATE TABLE "summary" (
  "tournament" text,
  "wins" real,
  "top_5" real,
  "top_10" real,
  "top_25" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of top-25s for the major that has 11 top-10s?`:
```sql
                SELECT COUNT("top_25") FROM "summary" WHERE "top_10"=11;
```