cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`What is the record for a game played on July 16 with attendance of more than 32,162?`

### 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 `What is the record for a game played on July 16 with attendance of more than 32,162?`:
```sql
                SELECT "record" FROM "game_log" WHERE "attendance">'32,162' AND "date"='july 16';
```
## Task
Generate a SQL query to answer the following question:
`Where has Jimmy Demaret as a player?`

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

CREATE TABLE "final_leaderboard" (
  "place" text,
  "player" text,
  "country" text,
  "score" text,
  "to_par" text,
  "money" real
);
### SQL
Given the database schema, here is the SQL query that answers `Where has Jimmy Demaret as a player?`:
```sql
                SELECT "place" FROM "final_leaderboard" WHERE "player"='jimmy demaret';
```
## Task
Generate a SQL query to answer the following question:
`How much does it cost for United States and Byron nelson?`

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

CREATE TABLE "final_leaderboard" (
  "place" text,
  "player" text,
  "country" text,
  "score" text,
  "to_par" text,
  "money" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much does it cost for United States and Byron nelson?`:
```sql
                SELECT COUNT("money") FROM "final_leaderboard" WHERE "country"='united states' AND "player"='byron nelson';
```
## Task
Generate a SQL query to answer the following question:
`Which Country has a Place of t8 and byron nelson?`

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

CREATE TABLE "final_leaderboard" (
  "place" text,
  "player" text,
  "country" text,
  "score" text,
  "to_par" text,
  "money" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Country has a Place of t8 and byron nelson?`:
```sql
                SELECT "country" FROM "final_leaderboard" WHERE "place"='t8' AND "player"='byron nelson';
```
## Task
Generate a SQL query to answer the following question:
`Name the average pop for chūgoku and prefecture of okayama`

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

CREATE TABLE "list_of_japanese_prefectural_capitals" (
  "capital" text,
  "prefecture" text,
  "region" text,
  "island" text,
  "pop" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average pop for chūgoku and prefecture of okayama`:
```sql
                SELECT AVG("pop") FROM "list_of_japanese_prefectural_capitals" WHERE "region"='chūgoku' AND "prefecture"='okayama';
```
## Task
Generate a SQL query to answer the following question:
`Name the highest pop for tottori`

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

CREATE TABLE "list_of_japanese_prefectural_capitals" (
  "capital" text,
  "prefecture" text,
  "region" text,
  "island" text,
  "pop" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the highest pop for tottori`:
```sql
                SELECT MAX("pop") FROM "list_of_japanese_prefectural_capitals" WHERE "prefecture"='tottori';
```
## Task
Generate a SQL query to answer the following question:
`Name the sum of pop for shizuoka`

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

CREATE TABLE "list_of_japanese_prefectural_capitals" (
  "capital" text,
  "prefecture" text,
  "region" text,
  "island" text,
  "pop" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sum of pop for shizuoka`:
```sql
                SELECT SUM("pop") FROM "list_of_japanese_prefectural_capitals" WHERE "prefecture"='shizuoka';
```
## Task
Generate a SQL query to answer the following question:
`Name the total number of pop for ibaraki`

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

CREATE TABLE "list_of_japanese_prefectural_capitals" (
  "capital" text,
  "prefecture" text,
  "region" text,
  "island" text,
  "pop" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of pop for ibaraki`:
```sql
                SELECT COUNT("pop") FROM "list_of_japanese_prefectural_capitals" WHERE "prefecture"='ibaraki';
```
## Task
Generate a SQL query to answer the following question:
`Who is the mascot for Mishawaka?`

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

CREATE TABLE "current_members" (
  "school" text,
  "location" text,
  "mascot" text,
  "county" text,
  "enrollment_ihsaa_class" text,
  "joined" real,
  "previous_conference" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the mascot for Mishawaka?`:
```sql
                SELECT "mascot" FROM "current_members" WHERE "location"='mishawaka';
```
## Task
Generate a SQL query to answer the following question:
`Which previous conference is associated with Penn school?`

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

CREATE TABLE "current_members" (
  "school" text,
  "location" text,
  "mascot" text,
  "county" text,
  "enrollment_ihsaa_class" text,
  "joined" real,
  "previous_conference" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which previous conference is associated with Penn school?`:
```sql
                SELECT "previous_conference" FROM "current_members" WHERE "school"='penn';
```
## Task
Generate a SQL query to answer the following question:
`Which location is in 71 St. Joseph county with South Bend Washington school?`

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

CREATE TABLE "current_members" (
  "school" text,
  "location" text,
  "mascot" text,
  "county" text,
  "enrollment_ihsaa_class" text,
  "joined" real,
  "previous_conference" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which location is in 71 St. Joseph county with South Bend Washington school?`:
```sql
                SELECT "location" FROM "current_members" WHERE "county"='71 st. joseph' AND "school"='south bend washington';
```
## Task
Generate a SQL query to answer the following question:
`What is the mascot for South Bend Clay?`

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

CREATE TABLE "current_members" (
  "school" text,
  "location" text,
  "mascot" text,
  "county" text,
  "enrollment_ihsaa_class" text,
  "joined" real,
  "previous_conference" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the mascot for South Bend Clay?`:
```sql
                SELECT "mascot" FROM "current_members" WHERE "school"='south bend clay';
```
## Task
Generate a SQL query to answer the following question:
`What was the address of the building with architects Edmund Woolley and Andrew Hamilton?`

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

CREATE TABLE "timeline_of_tallest_buildings" (
  "name" text,
  "street_address" text,
  "years_as_tallest" text,
  "height_ft_m" text,
  "floors" text,
  "architect" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the address of the building with architects Edmund Woolley and Andrew Hamilton?`:
```sql
                SELECT "street_address" FROM "timeline_of_tallest_buildings" WHERE "architect"='edmund woolley and andrew hamilton';
```
## Task
Generate a SQL query to answer the following question:
`How many years as tallest building was the Tenth Presbyterian Church?`

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

CREATE TABLE "timeline_of_tallest_buildings" (
  "name" text,
  "street_address" text,
  "years_as_tallest" text,
  "height_ft_m" text,
  "floors" text,
  "architect" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years as tallest building was the Tenth Presbyterian Church?`:
```sql
                SELECT "years_as_tallest" FROM "timeline_of_tallest_buildings" WHERE "name"='tenth presbyterian church';
```
## Task
Generate a SQL query to answer the following question:
`How many years as tallest building was Independence Hall?`

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

CREATE TABLE "timeline_of_tallest_buildings" (
  "name" text,
  "street_address" text,
  "years_as_tallest" text,
  "height_ft_m" text,
  "floors" text,
  "architect" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years as tallest building was Independence Hall?`:
```sql
                SELECT "years_as_tallest" FROM "timeline_of_tallest_buildings" WHERE "name"='independence hall';
```
## Task
Generate a SQL query to answer the following question:
`What is the height of the Tenth Presbyterian Church?`

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

CREATE TABLE "timeline_of_tallest_buildings" (
  "name" text,
  "street_address" text,
  "years_as_tallest" text,
  "height_ft_m" text,
  "floors" text,
  "architect" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the height of the Tenth Presbyterian Church?`:
```sql
                SELECT "height_ft_m" FROM "timeline_of_tallest_buildings" WHERE "name"='tenth presbyterian church';
```
## Task
Generate a SQL query to answer the following question:
`For the Loss of Plesac (1-5), what is the Record?`

### 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 `For the Loss of Plesac (1-5), what is the Record?`:
```sql
                SELECT "record" FROM "game_log" WHERE "loss"='plesac (1-5)';
```
## Task
Generate a SQL query to answer the following question:
`Name the entrant for year less than 1990 and chassis of eurobrun er189`

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

CREATE TABLE "complete_formula_one_world_championship_" (
  "year" real,
  "entrant" text,
  "chassis" text,
  "engine" text,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the entrant for year less than 1990 and chassis of eurobrun er189`:
```sql
                SELECT "entrant" FROM "complete_formula_one_world_championship_" WHERE "year"<1990 AND "chassis"='eurobrun er189';
```
## Task
Generate a SQL query to answer the following question:
`Name the engine for years before 1990 and chassis of eurobrun er189`

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

CREATE TABLE "complete_formula_one_world_championship_" (
  "year" real,
  "entrant" text,
  "chassis" text,
  "engine" text,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the engine for years before 1990 and chassis of eurobrun er189`:
```sql
                SELECT "engine" FROM "complete_formula_one_world_championship_" WHERE "year"<1990 AND "chassis"='eurobrun er189';
```
## Task
Generate a SQL query to answer the following question:
`With games started smaller than 16 plus receptions of 51, what is the smallest amount of touchdowns listed?`

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

CREATE TABLE "statistics" (
  "year" text,
  "games_played" real,
  "games_started" real,
  "attempts" real,
  "yards" real,
  "touchdowns" real,
  "receptions" real,
  "rec_yards" real,
  "rec_touchdowns" real,
  "fumbles" real
);
### SQL
Given the database schema, here is the SQL query that answers `With games started smaller than 16 plus receptions of 51, what is the smallest amount of touchdowns listed?`:
```sql
                SELECT MIN("touchdowns") FROM "statistics" WHERE "receptions"=51 AND "games_started"<16;
```
## Task
Generate a SQL query to answer the following question:
`What are the highest number of games played that had game starts of 10, receptions of 6 and fumbles smaller than 3?`

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

CREATE TABLE "statistics" (
  "year" text,
  "games_played" real,
  "games_started" real,
  "attempts" real,
  "yards" real,
  "touchdowns" real,
  "receptions" real,
  "rec_yards" real,
  "rec_touchdowns" real,
  "fumbles" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are the highest number of games played that had game starts of 10, receptions of 6 and fumbles smaller than 3?`:
```sql
                SELECT MAX("games_played") FROM "statistics" WHERE "receptions"=6 AND "games_started"=10 AND "fumbles"<3;
```
## Task
Generate a SQL query to answer the following question:
`When was the location 15km NW of Pol-E Khomri, the circumstaances IED and the casualties of 1 WIA?`

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

CREATE TABLE "2011" (
  "date" text,
  "location" text,
  "nature_of_incident" text,
  "circumstances" text,
  "casualties" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the location 15km NW of Pol-E Khomri, the circumstaances IED and the casualties of 1 WIA?`:
```sql
                SELECT "date" FROM "2011" WHERE "casualties"='1 wia' AND "circumstances"='ied' AND "location"='15km nw of pol-e khomri';
```
## Task
Generate a SQL query to answer the following question:
`When was the incident in Pol-E Khomri?`

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

CREATE TABLE "2011" (
  "date" text,
  "location" text,
  "nature_of_incident" text,
  "circumstances" text,
  "casualties" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the incident in Pol-E Khomri?`:
```sql
                SELECT "date" FROM "2011" WHERE "location"='pol-e khomri';
```
## Task
Generate a SQL query to answer the following question:
`What was the incident in imam sahib area, kunduz province?`

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

CREATE TABLE "2011" (
  "date" text,
  "location" text,
  "nature_of_incident" text,
  "circumstances" text,
  "casualties" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the incident in imam sahib area, kunduz province?`:
```sql
                SELECT "nature_of_incident" FROM "2011" WHERE "location"='imam sahib area, kunduz province';
```
## Task
Generate a SQL query to answer the following question:
`What gender has Romanized name and kim yoon-yeong?`

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

CREATE TABLE "list_of_hostages" (
  "romanized_name" text,
  "name_in_hangul" text,
  "name_in_hanja" text,
  "gender" text,
  "birth_year" real
);
### SQL
Given the database schema, here is the SQL query that answers `What gender has Romanized name and kim yoon-yeong?`:
```sql
                SELECT "gender" FROM "list_of_hostages" WHERE "romanized_name"='kim yoon-yeong';
```
## Task
Generate a SQL query to answer the following question:
`What year did Willis McGahee play fewer than 15 games with the Baltimore Ravens?`

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

CREATE TABLE "career_statistics" (
  "year" real,
  "team" text,
  "games" real,
  "attempts" real,
  "yards" real
);
### SQL
Given the database schema, here is the SQL query that answers `What year did Willis McGahee play fewer than 15 games with the Baltimore Ravens?`:
```sql
                SELECT MIN("year") FROM "career_statistics" WHERE "team"='baltimore ravens' AND "games"<15;
```
## Task
Generate a SQL query to answer the following question:
`After the 2013 season, what was the fewest number of games that Willis McGahee played in a single season?`

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

CREATE TABLE "career_statistics" (
  "year" real,
  "team" text,
  "games" real,
  "attempts" real,
  "yards" real
);
### SQL
Given the database schema, here is the SQL query that answers `After the 2013 season, what was the fewest number of games that Willis McGahee played in a single season?`:
```sql
                SELECT MIN("games") FROM "career_statistics" WHERE "year">2013;
```
## Task
Generate a SQL query to answer the following question:
`What is the result when the competition was the 2006 fifa world cup qualifier, and a Venue of warner park sporting complex, bassaterre?`

### 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 `What is the result when the competition was the 2006 fifa world cup qualifier, and a Venue of warner park sporting complex, bassaterre?`:
```sql
                SELECT "result" FROM "international_goals" WHERE "competition"='2006 fifa world cup qualifier' AND "venue"='warner park sporting complex, bassaterre';
```
## Task
Generate a SQL query to answer the following question:
`What is the name of the venue when the competition was friendly, with a Result of 2–3?`

### 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 `What is the name of the venue when the competition was friendly, with a Result of 2–3?`:
```sql
                SELECT "venue" FROM "international_goals" WHERE "competition"='friendly' AND "result"='2–3';
```
## Task
Generate a SQL query to answer the following question:
`What is the name of the venue when the score was 5–0, and a Competition of 2007 caribbean cup qualifier?`

### 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 `What is the name of the venue when the score was 5–0, and a Competition of 2007 caribbean cup qualifier?`:
```sql
                SELECT "venue" FROM "international_goals" WHERE "score"='5–0' AND "competition"='2007 caribbean cup qualifier';
```
## Task
Generate a SQL query to answer the following question:
`When did elisabeth of valois die?`

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

CREATE TABLE "1482_1700" (
  "name" text,
  "father" text,
  "birth" text,
  "marriage" text,
  "became_countess" text,
  "ceased_to_be_countess" text,
  "death" text,
  "spouse" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did elisabeth of valois die?`:
```sql
                SELECT "death" FROM "1482_1700" WHERE "name"='elisabeth of valois';
```
## Task
Generate a SQL query to answer the following question:
`Who is entered earlier than 1975 and has a Lotus 20 chassis?`

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

CREATE TABLE "complete_formula_one_world_championship_" (
  "year" real,
  "entrant" text,
  "chassis" text,
  "engine" text,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who is entered earlier than 1975 and has a Lotus 20 chassis?`:
```sql
                SELECT "entrant" FROM "complete_formula_one_world_championship_" WHERE "year"<1975 AND "chassis"='lotus 20';
```
## Task
Generate a SQL query to answer the following question:
`Which engine has a Lotus 49c chassis?`

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

CREATE TABLE "complete_formula_one_world_championship_" (
  "year" real,
  "entrant" text,
  "chassis" text,
  "engine" text,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which engine has a Lotus 49c chassis?`:
```sql
                SELECT "engine" FROM "complete_formula_one_world_championship_" WHERE "chassis"='lotus 49c';
```
## Task
Generate a SQL query to answer the following question:
`What are the average points of Scuderia Scribante with a Brabham bt11 chassis before 1968?`

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

CREATE TABLE "complete_formula_one_world_championship_" (
  "year" real,
  "entrant" text,
  "chassis" text,
  "engine" text,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are the average points of Scuderia Scribante with a Brabham bt11 chassis before 1968?`:
```sql
                SELECT AVG("points") FROM "complete_formula_one_world_championship_" WHERE "entrant"='scuderia scribante' AND "chassis"='brabham bt11' AND "year"<1968;
```
## Task
Generate a SQL query to answer the following question:
`How many points are there for a Mclaren m23 chassis later than 1972?`

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

CREATE TABLE "complete_formula_one_world_championship_" (
  "year" real,
  "entrant" text,
  "chassis" text,
  "engine" text,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many points are there for a Mclaren m23 chassis later than 1972?`:
```sql
                SELECT COUNT("points") FROM "complete_formula_one_world_championship_" WHERE "year">1972 AND "chassis"='mclaren m23';
```
## Task
Generate a SQL query to answer the following question:
`What is the average change to have a land area of 546.74 and a population density greater than 0.5?`

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

CREATE TABLE "list" (
  "rural_municipality_rm" text,
  "rm_no" text,
  "sarm_div_no" text,
  "census_div_no" text,
  "population_2011" real,
  "population_2006" real,
  "change_pct" real,
  "land_area_km" real,
  "population_density_per_km" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average change to have a land area of 546.74 and a population density greater than 0.5?`:
```sql
                SELECT AVG("change_pct") FROM "list" WHERE "land_area_km"=546.74 AND "population_density_per_km">0.5;
```
## Task
Generate a SQL query to answer the following question:
`What was the result after 1994 for team MB2 and 31 starts?`

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

CREATE TABLE "daytona_500_results" (
  "year" real,
  "manufacturer" text,
  "start" text,
  "finish" text,
  "team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result after 1994 for team MB2 and 31 starts?`:
```sql
                SELECT "finish" FROM "daytona_500_results" WHERE "year">1994 AND "team"='mb2' AND "start"='31';
```
## Task
Generate a SQL query to answer the following question:
`What team has 33 starts?`

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

CREATE TABLE "daytona_500_results" (
  "year" real,
  "manufacturer" text,
  "start" text,
  "finish" text,
  "team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team has 33 starts?`:
```sql
                SELECT "team" FROM "daytona_500_results" WHERE "start"='33';
```
## Task
Generate a SQL query to answer the following question:
`What team finished 35 in a ford before 1997?`

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

CREATE TABLE "daytona_500_results" (
  "year" real,
  "manufacturer" text,
  "start" text,
  "finish" text,
  "team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team finished 35 in a ford before 1997?`:
```sql
                SELECT "team" FROM "daytona_500_results" WHERE "year"<1997 AND "manufacturer"='ford' AND "finish"='35';
```
## Task
Generate a SQL query to answer the following question:
`What was the sum of the scores before the year 2002, that had the venue of Halmstad?`

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

CREATE TABLE "winners" (
  "year" real,
  "venue" text,
  "winner" text,
  "country" text,
  "score" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the sum of the scores before the year 2002, that had the venue of Halmstad?`:
```sql
                SELECT SUM("score") FROM "winners" WHERE "venue"='halmstad' AND "year"<2002;
```
## Task
Generate a SQL query to answer the following question:
`What was France's highest score when the venue was Bokskogens?`

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

CREATE TABLE "winners" (
  "year" real,
  "venue" text,
  "winner" text,
  "country" text,
  "score" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was France's highest score when the venue was Bokskogens?`:
```sql
                SELECT MAX("score") FROM "winners" WHERE "country"='france' AND "venue"='bokskogens';
```
## Task
Generate a SQL query to answer the following question:
`What was the earliest year during which the winner was Matthew King, and during which the score was higher than 270?`

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

CREATE TABLE "winners" (
  "year" real,
  "venue" text,
  "winner" text,
  "country" text,
  "score" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the earliest year during which the winner was Matthew King, and during which the score was higher than 270?`:
```sql
                SELECT MIN("year") FROM "winners" WHERE "winner"='matthew king' AND "score">270;
```
## Task
Generate a SQL query to answer the following question:
`What was the average year during which the score was 270?`

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

CREATE TABLE "winners" (
  "year" real,
  "venue" text,
  "winner" text,
  "country" text,
  "score" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the average year during which the score was 270?`:
```sql
                SELECT AVG("year") FROM "winners" WHERE "score"=270;
```
## Task
Generate a SQL query to answer the following question:
`What were the total number scores after 2005, when the winner was David Patrick?`

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

CREATE TABLE "winners" (
  "year" real,
  "venue" text,
  "winner" text,
  "country" text,
  "score" real
);
### SQL
Given the database schema, here is the SQL query that answers `What were the total number scores after 2005, when the winner was David Patrick?`:
```sql
                SELECT COUNT("score") FROM "winners" WHERE "winner"='david patrick' AND "year">2005;
```
## Task
Generate a SQL query to answer the following question:
`What was the average year that the venue was Bokskogens?`

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

CREATE TABLE "winners" (
  "year" real,
  "venue" text,
  "winner" text,
  "country" text,
  "score" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the average year that the venue was Bokskogens?`:
```sql
                SELECT AVG("year") FROM "winners" WHERE "venue"='bokskogens';
```
## Task
Generate a SQL query to answer the following question:
`Who did the Toronto Blue Jays play against where the score was 4 - 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" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who did the Toronto Blue Jays play against where the score was 4 - 2?`:
```sql
                SELECT "opponent" FROM "game_log" WHERE "score"='4 - 2';
```
## Task
Generate a SQL query to answer the following question:
`Who did the Blue Jays play against on April 11?`

### 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" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who did the Blue Jays play against on April 11?`:
```sql
                SELECT "opponent" FROM "game_log" WHERE "date"='april 11';
```
## Task
Generate a SQL query to answer the following question:
`Who did the Blue Jays play against on April 24?`

### 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" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who did the Blue Jays play against on April 24?`:
```sql
                SELECT "opponent" FROM "game_log" WHERE "date"='april 24';
```
## Task
Generate a SQL query to answer the following question:
`What was the average Value ($M) when the Country was England, the Operating income($m) was greater than -5, and the Revenue ($M) was smaller than 103?`

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

CREATE TABLE "2008_rankings" (
  "rank" real,
  "team" text,
  "country" text,
  "value_m" real,
  "debt_as_pctof_value" real,
  "pct_change_on_year" text,
  "revenue_m" real,
  "operating_income_m" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the average Value ($M) when the Country was England, the Operating income($m) was greater than -5, and the Revenue ($M) was smaller than 103?`:
```sql
                SELECT AVG("value_m") FROM "2008_rankings" WHERE "country"='england' AND "operating_income_m">-5 AND "revenue_m"<103;
```
## Task
Generate a SQL query to answer the following question:
`What was the total amount of Value ($M), when the Country was Spain, the Rank was 19, and the Debt as % of value was larger than 159?`

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

CREATE TABLE "2008_rankings" (
  "rank" real,
  "team" text,
  "country" text,
  "value_m" real,
  "debt_as_pctof_value" real,
  "pct_change_on_year" text,
  "revenue_m" real,
  "operating_income_m" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the total amount of Value ($M), when the Country was Spain, the Rank was 19, and the Debt as % of value was larger than 159?`:
```sql
                SELECT COUNT("value_m") FROM "2008_rankings" WHERE "country"='spain' AND "rank"=19 AND "debt_as_pctof_value">159;
```
## Task
Generate a SQL query to answer the following question:
`What was the sum of Value ($M), when the Revenue ($M) was less than 307, the Team was Valencia, and the Rank was smaller than 19?`

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

CREATE TABLE "2008_rankings" (
  "rank" real,
  "team" text,
  "country" text,
  "value_m" real,
  "debt_as_pctof_value" real,
  "pct_change_on_year" text,
  "revenue_m" real,
  "operating_income_m" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the sum of Value ($M), when the Revenue ($M) was less than 307, the Team was Valencia, and the Rank was smaller than 19?`:
```sql
                SELECT SUM("value_m") FROM "2008_rankings" WHERE "revenue_m"<307 AND "team"='valencia' AND "rank"<19;
```
## Task
Generate a SQL query to answer the following question:
`What was the total amount of Value ($M), when the Rank was higher than 6, and the % change on year was -27?`

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

CREATE TABLE "2008_rankings" (
  "rank" real,
  "team" text,
  "country" text,
  "value_m" real,
  "debt_as_pctof_value" real,
  "pct_change_on_year" text,
  "revenue_m" real,
  "operating_income_m" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the total amount of Value ($M), when the Rank was higher than 6, and the % change on year was -27?`:
```sql
                SELECT COUNT("value_m") FROM "2008_rankings" WHERE "rank">6 AND "pct_change_on_year"='-27';
```
## Task
Generate a SQL query to answer the following question:
`What was the sum of Revenue ($M), when the Debt as % of value was higher than 27, and the Operating income($m) was 77?`

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

CREATE TABLE "2008_rankings" (
  "rank" real,
  "team" text,
  "country" text,
  "value_m" real,
  "debt_as_pctof_value" real,
  "pct_change_on_year" text,
  "revenue_m" real,
  "operating_income_m" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the sum of Revenue ($M), when the Debt as % of value was higher than 27, and the Operating income($m) was 77?`:
```sql
                SELECT SUM("revenue_m") FROM "2008_rankings" WHERE "debt_as_pctof_value">27 AND "operating_income_m"=77;
```
## Task
Generate a SQL query to answer the following question:
`Name the screening completed for screening started 23 january 2006`

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

CREATE TABLE "negotiation_progress" (
  "screening_started" text,
  "screening_completed" text,
  "chapter_unfrozen" text,
  "chapter_opened" text,
  "chapter_closed" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the screening completed for screening started 23 january 2006`:
```sql
                SELECT "screening_completed" FROM "negotiation_progress" WHERE "screening_started"='23 january 2006';
```
## Task
Generate a SQL query to answer the following question:
`Name the screening started when it was completed 3 may 2006`

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

CREATE TABLE "negotiation_progress" (
  "screening_started" text,
  "screening_completed" text,
  "chapter_unfrozen" text,
  "chapter_opened" text,
  "chapter_closed" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the screening started when it was completed 3 may 2006`:
```sql
                SELECT "screening_started" FROM "negotiation_progress" WHERE "screening_completed"='3 may 2006';
```
## Task
Generate a SQL query to answer the following question:
`What award was Trent Tesoro nominated for in 2007?`

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

CREATE TABLE "awards_nominations" (
  "year" real,
  "ceremony" text,
  "result" text,
  "award" text,
  "work" text
);
### SQL
Given the database schema, here is the SQL query that answers `What award was Trent Tesoro nominated for in 2007?`:
```sql
                SELECT "award" FROM "awards_nominations" WHERE "result"='nominated' AND "year"=2007;
```
## Task
Generate a SQL query to answer the following question:
`What is the score for the team that has a record of 80-64?`

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

CREATE TABLE "game_log" (
  "date" text,
  "opponent" text,
  "site" text,
  "score" text,
  "loss" text,
  "attendance" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score for the team that has a record of 80-64?`:
```sql
                SELECT "score" FROM "game_log" WHERE "record"='80-64';
```
## Task
Generate a SQL query to answer the following question:
`What position did team scandia finish when their engine was cosworth?`

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

CREATE TABLE "indianapolis_500_results" (
  "year" real,
  "chassis" text,
  "engine" text,
  "start" text,
  "finish" text,
  "team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What position did team scandia finish when their engine was cosworth?`:
```sql
                SELECT "finish" FROM "indianapolis_500_results" WHERE "engine"='cosworth' AND "team"='team scandia';
```
## Task
Generate a SQL query to answer the following question:
`What was the position of the team that used an oldsmobile engine and DNQ?`

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

CREATE TABLE "indianapolis_500_results" (
  "year" real,
  "chassis" text,
  "engine" text,
  "start" text,
  "finish" text,
  "team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the position of the team that used an oldsmobile engine and DNQ?`:
```sql
                SELECT "finish" FROM "indianapolis_500_results" WHERE "engine"='oldsmobile' AND "start"='dnq';
```
## Task
Generate a SQL query to answer the following question:
`what is the least bronze when gold is more than 0 for russia?`

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

CREATE TABLE "medal_table" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the least bronze when gold is more than 0 for russia?`:
```sql
                SELECT MIN("bronze") FROM "medal_table" WHERE "gold">0 AND "nation"='russia';
```
## Task
Generate a SQL query to answer the following question:
`what is the highest rank for italy when gold is more than 1?`

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

CREATE TABLE "medal_table" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the highest rank for italy when gold is more than 1?`:
```sql
                SELECT MAX("rank") FROM "medal_table" WHERE "nation"='italy' AND "gold">1;
```
## Task
Generate a SQL query to answer the following question:
`what is the total when bronze is more than 1 and gold smaller than 1?`

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

CREATE TABLE "medal_table" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the total when bronze is more than 1 and gold smaller than 1?`:
```sql
                SELECT SUM("total") FROM "medal_table" WHERE "bronze">1 AND "gold"<1;
```
## Task
Generate a SQL query to answer the following question:
`What is the avg seek time for a device that is less than 3231?`

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

CREATE TABLE "sigma_mass_storage_devices" (
  "device" real,
  "device_type" text,
  "capacity_mb" text,
  "avg_seek_time_ms" text,
  "avg_rotational_delay_ms" real,
  "avg_transfer_rate_k_b_s" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the avg seek time for a device that is less than 3231?`:
```sql
                SELECT "avg_seek_time_ms" FROM "sigma_mass_storage_devices" WHERE "device"<3231;
```
## Task
Generate a SQL query to answer the following question:
`What is the smallest transfer rate for a 3243 device?`

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

CREATE TABLE "sigma_mass_storage_devices" (
  "device" real,
  "device_type" text,
  "capacity_mb" text,
  "avg_seek_time_ms" text,
  "avg_rotational_delay_ms" real,
  "avg_transfer_rate_k_b_s" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest transfer rate for a 3243 device?`:
```sql
                SELECT MIN("avg_transfer_rate_k_b_s") FROM "sigma_mass_storage_devices" WHERE "device"=3243;
```
## Task
Generate a SQL query to answer the following question:
`Which entrant has a year after 1955?`

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

CREATE TABLE "complete_formula_one_world_championship_" (
  "year" real,
  "entrant" text,
  "chassis" text,
  "engine" text,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which entrant has a year after 1955?`:
```sql
                SELECT "entrant" FROM "complete_formula_one_world_championship_" WHERE "year">1955;
```
## Task
Generate a SQL query to answer the following question:
`How many draws has a Club of real valladolid that was played less than 38?`

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

CREATE TABLE "final_table" (
  "position" real,
  "club" text,
  "played" real,
  "points" text,
  "wins" real,
  "draws" real,
  "losses" real,
  "goals_for" real,
  "goals_against" real,
  "goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many draws has a Club of real valladolid that was played less than 38?`:
```sql
                SELECT MAX("draws") FROM "final_table" WHERE "club"='real valladolid' AND "played"<38;
```
## Task
Generate a SQL query to answer the following question:
`How many losses are there with 5 goal differences, drew more than 10 times, and 43 goals against?`

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

CREATE TABLE "final_table" (
  "position" real,
  "club" text,
  "played" real,
  "points" text,
  "wins" real,
  "draws" real,
  "losses" real,
  "goals_for" real,
  "goals_against" real,
  "goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many losses are there with 5 goal differences, drew more than 10 times, and 43 goals against?`:
```sql
                SELECT COUNT("losses") FROM "final_table" WHERE "goal_difference"=5 AND "draws">10 AND "goals_against"=43;
```
## Task
Generate a SQL query to answer the following question:
`On which award show was Bad Girls nominated for Most Popular Drama in 2004?`

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

CREATE TABLE "awards_and_nominations" (
  "year" real,
  "award_show" text,
  "category" text,
  "recipient_s" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `On which award show was Bad Girls nominated for Most Popular Drama in 2004?`:
```sql
                SELECT "award_show" FROM "awards_and_nominations" WHERE "year"=2004 AND "category"='most popular drama';
```
## Task
Generate a SQL query to answer the following question:
`Who was the recipient when the show was nominated for Most Popular Drama after 2004?`

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

CREATE TABLE "awards_and_nominations" (
  "year" real,
  "award_show" text,
  "category" text,
  "recipient_s" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the recipient when the show was nominated for Most Popular Drama after 2004?`:
```sql
                SELECT "recipient_s" FROM "awards_and_nominations" WHERE "result"='nominated' AND "category"='most popular drama' AND "year">2004;
```
## Task
Generate a SQL query to answer the following question:
`In what award show was Bad Girls nominated for Best Loved Drama in 2002?`

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

CREATE TABLE "awards_and_nominations" (
  "year" real,
  "award_show" text,
  "category" text,
  "recipient_s" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what award show was Bad Girls nominated for Best Loved Drama in 2002?`:
```sql
                SELECT "award_show" FROM "awards_and_nominations" WHERE "category"='best loved drama' AND "year"=2002;
```
## Task
Generate a SQL query to answer the following question:
`What is the average total number of medals for a nation with 2 silver medals and a rank larger than 7?`

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

CREATE TABLE "medal_table" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average total number of medals for a nation with 2 silver medals and a rank larger than 7?`:
```sql
                SELECT AVG("total") FROM "medal_table" WHERE "silver"=2 AND "rank">7;
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest rank of Ukraine with fewer than 14 silver medals, fewer than 3 bronze medals, and a total of 4 medals?`

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

CREATE TABLE "medal_table" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest rank of Ukraine with fewer than 14 silver medals, fewer than 3 bronze medals, and a total of 4 medals?`:
```sql
                SELECT MIN("rank") FROM "medal_table" WHERE "silver"<14 AND "bronze"<3 AND "total"=4 AND "nation"='ukraine';
```
## Task
Generate a SQL query to answer the following question:
`What is the total of bronze medals from nations with more than 16 total medals and ranks larger than 3?`

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

CREATE TABLE "medal_table" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total of bronze medals from nations with more than 16 total medals and ranks larger than 3?`:
```sql
                SELECT COUNT("bronze") FROM "medal_table" WHERE "total"=16 AND "rank">3;
```
## Task
Generate a SQL query to answer the following question:
`What is the total number of bronze medals with a total of 4 medals and 1 gold medal?`

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

CREATE TABLE "medal_table" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of bronze medals with a total of 4 medals and 1 gold medal?`:
```sql
                SELECT COUNT("bronze") FROM "medal_table" WHERE "total"=4 AND "gold"=1;
```
## Task
Generate a SQL query to answer the following question:
`What was the qualification with more than 162 laps in 1953?`

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

CREATE TABLE "indy_500_results" (
  "year" text,
  "start" text,
  "qual" text,
  "rank" text,
  "finish" text,
  "laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the qualification with more than 162 laps in 1953?`:
```sql
                SELECT "qual" FROM "indy_500_results" WHERE "laps">162 AND "year"='1953';
```