cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`When was the first HC climb before 2013 with more than 3 times visited, more than 4 HC climbs, and a height of 1669?`

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

CREATE TABLE "tour_de_france" (
  "height_m" text,
  "no_of_times_visited" real,
  "no_of_hc_climbs" real,
  "first_time_as_hc_climb" real,
  "most_recent" real
);
### SQL
Given the database schema, here is the SQL query that answers `When was the first HC climb before 2013 with more than 3 times visited, more than 4 HC climbs, and a height of 1669?`:
```sql
                SELECT "first_time_as_hc_climb" FROM "tour_de_france" WHERE "no_of_times_visited">3 AND "no_of_hc_climbs"=4 AND "most_recent"<2013 AND "height_m"='1669';
```
## Task
Generate a SQL query to answer the following question:
`Who is the builder of Pennant d03?`

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

CREATE TABLE "ships" (
  "pennant_number" text,
  "ship" text,
  "builder" text,
  "laid_down" text,
  "launched" text,
  "commissioned" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the builder of Pennant d03?`:
```sql
                SELECT "builder" FROM "ships" WHERE "pennant_number"='d03';
```
## Task
Generate a SQL query to answer the following question:
`How many picks had a Reg GP that was over 906, when the Pl GP was bigger than 99?`

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

CREATE TABLE "list_of_vancouver_canucks_draft_picks" (
  "rd_num" real,
  "pick_num" real,
  "player" text,
  "team_league" text,
  "reg_gp" real,
  "pl_gp" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many picks had a Reg GP that was over 906, when the Pl GP was bigger than 99?`:
```sql
                SELECT COUNT("pick_num") FROM "list_of_vancouver_canucks_draft_picks" WHERE "reg_gp">906 AND "pl_gp">99;
```
## Task
Generate a SQL query to answer the following question:
`Which is the smallest pick number that had a Reg GP of less than 0?`

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

CREATE TABLE "list_of_vancouver_canucks_draft_picks" (
  "rd_num" real,
  "pick_num" real,
  "player" text,
  "team_league" text,
  "reg_gp" real,
  "pl_gp" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which is the smallest pick number that had a Reg GP of less than 0?`:
```sql
                SELECT MIN("pick_num") FROM "list_of_vancouver_canucks_draft_picks" WHERE "reg_gp"<0;
```
## Task
Generate a SQL query to answer the following question:
`Name the home team score when the away team is south melbourne`

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

CREATE TABLE "round_8" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the home team score when the away team is south melbourne`:
```sql
                SELECT "home_team_score" FROM "round_8" WHERE "away_team"='south melbourne';
```
## Task
Generate a SQL query to answer the following question:
`Name the date for home team of collingwood`

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

CREATE TABLE "round_8" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the date for home team of collingwood`:
```sql
                SELECT "date" FROM "round_8" WHERE "home_team"='collingwood';
```
## Task
Generate a SQL query to answer the following question:
`Name the date for princes park`

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

CREATE TABLE "round_8" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the date for princes park`:
```sql
                SELECT "date" FROM "round_8" WHERE "venue"='princes park';
```
## Task
Generate a SQL query to answer the following question:
`Name the date for the venue of brunswick street oval`

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

CREATE TABLE "round_8" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the date for the venue of brunswick street oval`:
```sql
                SELECT "date" FROM "round_8" WHERE "venue"='brunswick street oval';
```
## Task
Generate a SQL query to answer the following question:
`What was the attendence of the game on 26 April 1948 and an away team of Hawthorn?`

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

CREATE TABLE "round_2" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendence of the game on 26 April 1948 and an away team of Hawthorn?`:
```sql
                SELECT "crowd" FROM "round_2" WHERE "date"='26 april 1948' AND "away_team"='hawthorn';
```
## Task
Generate a SQL query to answer the following question:
`When playing at Windy Hill, what was the home team?`

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

CREATE TABLE "round_2" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When playing at Windy Hill, what was the home team?`:
```sql
                SELECT "home_team" FROM "round_2" WHERE "venue"='windy hill';
```
## Task
Generate a SQL query to answer the following question:
`What is essendon's home team score?`

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

CREATE TABLE "round_14" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is essendon's home team score?`:
```sql
                SELECT "home_team_score" FROM "round_14" WHERE "home_team"='essendon';
```
## Task
Generate a SQL query to answer the following question:
`What is the average crowd when footscray is at home?`

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

CREATE TABLE "round_14" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average crowd when footscray is at home?`:
```sql
                SELECT AVG("crowd") FROM "round_14" WHERE "home_team"='footscray';
```
## Task
Generate a SQL query to answer the following question:
`What is the listed crowd at windy hill?`

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

CREATE TABLE "round_14" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the listed crowd at windy hill?`:
```sql
                SELECT "crowd" FROM "round_14" WHERE "venue"='windy hill';
```
## Task
Generate a SQL query to answer the following question:
`What is the away team's score at punt road oval?`

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

CREATE TABLE "round_14" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the away team's score at punt road oval?`:
```sql
                SELECT "away_team" FROM "round_14" WHERE "venue"='punt road oval';
```
## Task
Generate a SQL query to answer the following question:
`Who was the home team at the Nuggets game that had a score of 116–105?`

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

CREATE TABLE "december" (
  "date" text,
  "visitor" text,
  "score" text,
  "home" text,
  "leading_scorer" text,
  "attendance" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the home team at the Nuggets game that had a score of 116–105?`:
```sql
                SELECT "home" FROM "december" WHERE "score"='116–105';
```
## Task
Generate a SQL query to answer the following question:
`Tell me the lowest Laps with a time/retired of +2 Laps and Grid of 20`

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

CREATE TABLE "race" (
  "driver" text,
  "constructor" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the lowest Laps with a time/retired of +2 Laps and Grid of 20`:
```sql
                SELECT MIN("laps") FROM "race" WHERE "time_retired"='+2 laps' AND "grid"=20;
```
## Task
Generate a SQL query to answer the following question:
`I want the time/retired for eddie irvine`

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

CREATE TABLE "race" (
  "driver" text,
  "constructor" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `I want the time/retired for eddie irvine`:
```sql
                SELECT "time_retired" FROM "race" WHERE "driver"='eddie irvine';
```
## Task
Generate a SQL query to answer the following question:
`What date was Rodger Ward the winning driver?`

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

CREATE TABLE "season_review" (
  "race" text,
  "circuit" text,
  "date" text,
  "pole_position" text,
  "fastest_lap" text,
  "winning_driver" text,
  "constructor" text,
  "tyre" text,
  "report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was Rodger Ward the winning driver?`:
```sql
                SELECT "date" FROM "season_review" WHERE "winning_driver"='rodger ward';
```
## Task
Generate a SQL query to answer the following question:
`What was the constructor when Jack Brabham was the driver at the Monaco Grand Prix?`

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

CREATE TABLE "season_review" (
  "race" text,
  "circuit" text,
  "date" text,
  "pole_position" text,
  "fastest_lap" text,
  "winning_driver" text,
  "constructor" text,
  "tyre" text,
  "report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the constructor when Jack Brabham was the driver at the Monaco Grand Prix?`:
```sql
                SELECT "constructor" FROM "season_review" WHERE "winning_driver"='jack brabham' AND "race"='monaco grand prix';
```
## Task
Generate a SQL query to answer the following question:
`What driver was the winner when Joakim Bonnier was in the Pole Position?`

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

CREATE TABLE "season_review" (
  "race" text,
  "circuit" text,
  "date" text,
  "pole_position" text,
  "fastest_lap" text,
  "winning_driver" text,
  "constructor" text,
  "tyre" text,
  "report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What driver was the winner when Joakim Bonnier was in the Pole Position?`:
```sql
                SELECT "winning_driver" FROM "season_review" WHERE "pole_position"='joakim bonnier';
```
## Task
Generate a SQL query to answer the following question:
`What date was the Tyre d and Bruce Mclaren won?`

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

CREATE TABLE "season_review" (
  "race" text,
  "circuit" text,
  "date" text,
  "pole_position" text,
  "fastest_lap" text,
  "winning_driver" text,
  "constructor" text,
  "tyre" text,
  "report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the Tyre d and Bruce Mclaren won?`:
```sql
                SELECT "date" FROM "season_review" WHERE "tyre"='d' AND "winning_driver"='bruce mclaren';
```
## Task
Generate a SQL query to answer the following question:
`What date was Joakim Bonnier in the pole position?`

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

CREATE TABLE "season_review" (
  "race" text,
  "circuit" text,
  "date" text,
  "pole_position" text,
  "fastest_lap" text,
  "winning_driver" text,
  "constructor" text,
  "tyre" text,
  "report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was Joakim Bonnier in the pole position?`:
```sql
                SELECT "date" FROM "season_review" WHERE "pole_position"='joakim bonnier';
```
## Task
Generate a SQL query to answer the following question:
`What is the time for the racer on grid 19?`

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

CREATE TABLE "classification" (
  "driver" text,
  "constructor" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time for the racer on grid 19?`:
```sql
                SELECT "time_retired" FROM "classification" WHERE "grid"=19;
```
## Task
Generate a SQL query to answer the following question:
`Who made the car that Alberto Ascari went more than 35 laps on a grid less than 7?`

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

CREATE TABLE "classification" (
  "driver" text,
  "constructor" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who made the car that Alberto Ascari went more than 35 laps on a grid less than 7?`:
```sql
                SELECT "constructor" FROM "classification" WHERE "grid"<7 AND "laps">35 AND "driver"='alberto ascari';
```
## Task
Generate a SQL query to answer the following question:
`What driver raced for more than 9 laps on grid 7?`

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

CREATE TABLE "classification" (
  "driver" text,
  "constructor" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What driver raced for more than 9 laps on grid 7?`:
```sql
                SELECT "driver" FROM "classification" WHERE "laps">9 AND "grid"=7;
```
## Task
Generate a SQL query to answer the following question:
`What is the Riding of the candidate Patricia Cordner who gained 7,190 votes?`

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

CREATE TABLE "14_seats" (
  "riding" text,
  "candidate" text,
  "gender" text,
  "residence" text,
  "occupation" text,
  "votes" real,
  "rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Riding of the candidate Patricia Cordner who gained 7,190 votes?`:
```sql
                SELECT "riding" FROM "14_seats" WHERE "votes">'7,190' AND "candidate"='patricia cordner';
```
## Task
Generate a SQL query to answer the following question:
`Which License has an Actual Vaersion of 9.0?`

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

CREATE TABLE "list_of_computer_system_emulators" (
  "name" text,
  "actual_version" text,
  "system" text,
  "platform" text,
  "license" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which License has an Actual Vaersion of 9.0?`:
```sql
                SELECT "license" FROM "list_of_computer_system_emulators" WHERE "actual_version"='9.0';
```
## Task
Generate a SQL query to answer the following question:
`Which System has an Actual Version 9.0?`

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

CREATE TABLE "list_of_computer_system_emulators" (
  "name" text,
  "actual_version" text,
  "system" text,
  "platform" text,
  "license" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which System has an Actual Version 9.0?`:
```sql
                SELECT "system" FROM "list_of_computer_system_emulators" WHERE "actual_version"='9.0';
```
## Task
Generate a SQL query to answer the following question:
`Which System's Name is Gemulator?`

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

CREATE TABLE "list_of_computer_system_emulators" (
  "name" text,
  "actual_version" text,
  "system" text,
  "platform" text,
  "license" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which System's Name is Gemulator?`:
```sql
                SELECT "system" FROM "list_of_computer_system_emulators" WHERE "name"='gemulator';
```
## Task
Generate a SQL query to answer the following question:
`Which System's Name is Steem, and has a Freeware License?`

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

CREATE TABLE "list_of_computer_system_emulators" (
  "name" text,
  "actual_version" text,
  "system" text,
  "platform" text,
  "license" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which System's Name is Steem, and has a Freeware License?`:
```sql
                SELECT "system" FROM "list_of_computer_system_emulators" WHERE "license"='freeware' AND "name"='steem';
```
## Task
Generate a SQL query to answer the following question:
`What was the Lightning's record at their home game against Carolina with an attendance over 16,526 and a decision of Holmqvist?`

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

CREATE TABLE "november" (
  "date" text,
  "visitor" text,
  "score" text,
  "home" text,
  "decision" text,
  "attendance" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Lightning's record at their home game against Carolina with an attendance over 16,526 and a decision of Holmqvist?`:
```sql
                SELECT "record" FROM "november" WHERE "decision"='holmqvist' AND "attendance">'16,526' AND "visitor"='carolina';
```
## Task
Generate a SQL query to answer the following question:
`What was the date of the game when the Lightning had a record of 10–13–2?`

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

CREATE TABLE "november" (
  "date" text,
  "visitor" text,
  "score" text,
  "home" text,
  "decision" text,
  "attendance" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game when the Lightning had a record of 10–13–2?`:
```sql
                SELECT "date" FROM "november" WHERE "record"='10–13–2';
```
## Task
Generate a SQL query to answer the following question:
`What was the date of the game when the Lightning had a record of 9–8–1?`

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

CREATE TABLE "november" (
  "date" text,
  "visitor" text,
  "score" text,
  "home" text,
  "decision" text,
  "attendance" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game when the Lightning had a record of 9–8–1?`:
```sql
                SELECT "date" FROM "november" WHERE "record"='9–8–1';
```
## Task
Generate a SQL query to answer the following question:
`What was the decision of the game when the Lightning had a record of 6–8–1?`

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

CREATE TABLE "november" (
  "date" text,
  "visitor" text,
  "score" text,
  "home" text,
  "decision" text,
  "attendance" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the decision of the game when the Lightning had a record of 6–8–1?`:
```sql
                SELECT "decision" FROM "november" WHERE "record"='6–8–1';
```
## Task
Generate a SQL query to answer the following question:
`What pick was Dominic Uy?`

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

CREATE TABLE "round_4" (
  "pick" real,
  "player" text,
  "country_of_origin" text,
  "pba_team" text,
  "college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What pick was Dominic Uy?`:
```sql
                SELECT AVG("pick") FROM "round_4" WHERE "player"='dominic uy';
```
## Task
Generate a SQL query to answer the following question:
`What college did pick 33 attend?`

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

CREATE TABLE "round_4" (
  "pick" real,
  "player" text,
  "country_of_origin" text,
  "pba_team" text,
  "college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What college did pick 33 attend?`:
```sql
                SELECT "college" FROM "round_4" WHERE "pick"=33;
```
## Task
Generate a SQL query to answer the following question:
`What is the elevation of the city with a number of 91,385 Housing dwellings in 2007?`

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

CREATE TABLE "population_by_district" (
  "city_district" text,
  "area_km" text,
  "population_2007_census_hab" text,
  "housing_2007" text,
  "density_hab_km" text,
  "elevation_msl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the elevation of the city with a number of 91,385 Housing dwellings in 2007?`:
```sql
                SELECT "elevation_msl" FROM "population_by_district" WHERE "housing_2007"='91,385';
```
## Task
Generate a SQL query to answer the following question:
`What is the density of San Sebastián?`

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

CREATE TABLE "population_by_district" (
  "city_district" text,
  "area_km" text,
  "population_2007_census_hab" text,
  "housing_2007" text,
  "density_hab_km" text,
  "elevation_msl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the density of San Sebastián?`:
```sql
                SELECT "density_hab_km" FROM "population_by_district" WHERE "city_district"='san sebastián';
```
## Task
Generate a SQL query to answer the following question:
`What is the density of the city with an elevation of 3,400 msl?`

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

CREATE TABLE "population_by_district" (
  "city_district" text,
  "area_km" text,
  "population_2007_census_hab" text,
  "housing_2007" text,
  "density_hab_km" text,
  "elevation_msl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the density of the city with an elevation of 3,400 msl?`:
```sql
                SELECT "density_hab_km" FROM "population_by_district" WHERE "elevation_msl"='3,400 msl';
```
## Task
Generate a SQL query to answer the following question:
`What is the area of the city with a density of 8,546.1?`

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

CREATE TABLE "population_by_district" (
  "city_district" text,
  "area_km" text,
  "population_2007_census_hab" text,
  "housing_2007" text,
  "density_hab_km" text,
  "elevation_msl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the area of the city with a density of 8,546.1?`:
```sql
                SELECT "area_km" FROM "population_by_district" WHERE "density_hab_km"='8,546.1';
```
## Task
Generate a SQL query to answer the following question:
`What is the area of the city with a density of 955.6?`

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

CREATE TABLE "population_by_district" (
  "city_district" text,
  "area_km" text,
  "population_2007_census_hab" text,
  "housing_2007" text,
  "density_hab_km" text,
  "elevation_msl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the area of the city with a density of 955.6?`:
```sql
                SELECT "area_km" FROM "population_by_district" WHERE "density_hab_km"='955.6';
```
## Task
Generate a SQL query to answer the following question:
`Which Result has a Category of best book of a musical?`

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

CREATE TABLE "original_broadway_production" (
  "year" real,
  "award_ceremony" text,
  "category" text,
  "nominee" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Result has a Category of best book of a musical?`:
```sql
                SELECT "result" FROM "original_broadway_production" WHERE "category"='best book of a musical';
```
## Task
Generate a SQL query to answer the following question:
`Which Nominee has a Category of outstanding musical?`

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

CREATE TABLE "original_broadway_production" (
  "year" real,
  "award_ceremony" text,
  "category" text,
  "nominee" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Nominee has a Category of outstanding musical?`:
```sql
                SELECT "nominee" FROM "original_broadway_production" WHERE "category"='outstanding musical';
```
## Task
Generate a SQL query to answer the following question:
`What is the record time at the Nascar Camping World Truck Series?`

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

CREATE TABLE "track_records" (
  "record" text,
  "date" text,
  "driver" text,
  "time" text,
  "speed_avg_speed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record time at the Nascar Camping World Truck Series?`:
```sql
                SELECT "time" FROM "track_records" WHERE "record"='nascar camping world truck series';
```
## Task
Generate a SQL query to answer the following question:
`What date was the nascar nationwide series held?`

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

CREATE TABLE "track_records" (
  "record" text,
  "date" text,
  "driver" text,
  "time" text,
  "speed_avg_speed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the nascar nationwide series held?`:
```sql
                SELECT "record" FROM "track_records" WHERE "date"='nascar nationwide series';
```
## Task
Generate a SQL query to answer the following question:
`Who holds the record time of 24.521 and where was it made?`

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

CREATE TABLE "track_records" (
  "record" text,
  "date" text,
  "driver" text,
  "time" text,
  "speed_avg_speed" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who holds the record time of 24.521 and where was it made?`:
```sql
                SELECT "record" FROM "track_records" WHERE "time"='24.521';
```
## Task
Generate a SQL query to answer the following question:
`Which time/retired has a grid of 9?`

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

CREATE TABLE "race" (
  "driver" text,
  "constructor" text,
  "laps" text,
  "time_retired" text,
  "grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which time/retired has a grid of 9?`:
```sql
                SELECT "time_retired" FROM "race" WHERE "grid"='9';
```
## Task
Generate a SQL query to answer the following question:
`Which driver's grid is 6?`

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

CREATE TABLE "race" (
  "driver" text,
  "constructor" text,
  "laps" text,
  "time_retired" text,
  "grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which driver's grid is 6?`:
```sql
                SELECT "driver" FROM "race" WHERE "grid"='6';
```
## Task
Generate a SQL query to answer the following question:
`For which constructor does Juan Manuel Fangio drive?`

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

CREATE TABLE "race" (
  "driver" text,
  "constructor" text,
  "laps" text,
  "time_retired" text,
  "grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `For which constructor does Juan Manuel Fangio drive?`:
```sql
                SELECT "constructor" FROM "race" WHERE "driver"='juan manuel fangio';
```
## Task
Generate a SQL query to answer the following question:
`Which laps has a grid of 8?`

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

CREATE TABLE "race" (
  "driver" text,
  "constructor" text,
  "laps" text,
  "time_retired" text,
  "grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which laps has a grid of 8?`:
```sql
                SELECT "laps" FROM "race" WHERE "grid"='8';
```
## Task
Generate a SQL query to answer the following question:
`Which grid is constructed by Maserati and driven by Oscar Alfredo Gálvez?`

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

CREATE TABLE "race" (
  "driver" text,
  "constructor" text,
  "laps" text,
  "time_retired" text,
  "grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which grid is constructed by Maserati and driven by Oscar Alfredo Gálvez?`:
```sql
                SELECT "grid" FROM "race" WHERE "constructor"='maserati' AND "driver"='oscar alfredo gálvez';
```
## Task
Generate a SQL query to answer the following question:
`what was the engine when ken downing drove an entrant from connaught engineering?`

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

CREATE TABLE "teams_and_drivers" (
  "entrant" text,
  "constructor" text,
  "chassis" text,
  "engine" text,
  "driver" text,
  "rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `what was the engine when ken downing drove an entrant from connaught engineering?`:
```sql
                SELECT "engine" FROM "teams_and_drivers" WHERE "driver"='ken downing' AND "entrant"='connaught engineering';
```
## Task
Generate a SQL query to answer the following question:
`who built the car driven by eric brandon?`

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

CREATE TABLE "teams_and_drivers" (
  "entrant" text,
  "constructor" text,
  "chassis" text,
  "engine" text,
  "driver" text,
  "rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `who built the car driven by eric brandon?`:
```sql
                SELECT "constructor" FROM "teams_and_drivers" WHERE "driver"='eric brandon';
```
## Task
Generate a SQL query to answer the following question:
`what was the chassis built by simca-gordini and driven by max de terra?`

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

CREATE TABLE "teams_and_drivers" (
  "entrant" text,
  "constructor" text,
  "chassis" text,
  "engine" text,
  "driver" text,
  "rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `what was the chassis built by simca-gordini and driven by max de terra?`:
```sql
                SELECT "chassis" FROM "teams_and_drivers" WHERE "constructor"='simca-gordini' AND "driver"='max de terra';
```
## Task
Generate a SQL query to answer the following question:
`kenneth mcalpine drove from which entrant?`

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

CREATE TABLE "teams_and_drivers" (
  "entrant" text,
  "constructor" text,
  "chassis" text,
  "engine" text,
  "driver" text,
  "rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `kenneth mcalpine drove from which entrant?`:
```sql
                SELECT "entrant" FROM "teams_and_drivers" WHERE "driver"='kenneth mcalpine';
```
## Task
Generate a SQL query to answer the following question:
`with 6 rounds, and a 52 51/52 chassis, who is the driver?`

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

CREATE TABLE "teams_and_drivers" (
  "entrant" text,
  "constructor" text,
  "chassis" text,
  "engine" text,
  "driver" text,
  "rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `with 6 rounds, and a 52 51/52 chassis, who is the driver?`:
```sql
                SELECT "driver" FROM "teams_and_drivers" WHERE "rounds"='6' AND "chassis"='52 51/52';
```
## Task
Generate a SQL query to answer the following question:
`What was the attendance when the Braves were the opponent and the record was 56-53?`

### 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 was the attendance when the Braves were the opponent and the record was 56-53?`:
```sql
                SELECT AVG("attendance") FROM "game_log" WHERE "opponent"='braves' AND "record"='56-53';
```
## Task
Generate a SQL query to answer the following question:
`Who was the opponent when the record was 61-57?`

### 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 `Who was the opponent when the record was 61-57?`:
```sql
                SELECT "opponent" FROM "game_log" WHERE "record"='61-57';
```
## Task
Generate a SQL query to answer the following question:
`How many laps for jochen rindt?`

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

CREATE TABLE "classification" (
  "driver" text,
  "constructor" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many laps for jochen rindt?`:
```sql
                SELECT COUNT("laps") FROM "classification" WHERE "driver"='jochen rindt';
```
## Task
Generate a SQL query to answer the following question:
`What is the grid total for jean-pierre beltoise?`

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

CREATE TABLE "classification" (
  "driver" text,
  "constructor" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the grid total for jean-pierre beltoise?`:
```sql
                SELECT COUNT("grid") FROM "classification" WHERE "driver"='jean-pierre beltoise';
```
## Task
Generate a SQL query to answer the following question:
`What was the time for the event in which Tony Mendoza was the opponent?`

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

CREATE TABLE "mixed_martial_arts_record" (
  "res" text,
  "record" text,
  "opponent" text,
  "method" text,
  "event" text,
  "round" real,
  "time" text,
  "location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the time for the event in which Tony Mendoza was the opponent?`:
```sql
                SELECT "time" FROM "mixed_martial_arts_record" WHERE "opponent"='tony mendoza';
```
## Task
Generate a SQL query to answer the following question:
`What is the average lap time for retired time of +23.707 and a Grid greater than 21?`

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

CREATE TABLE "125cc_classification" (
  "rider" text,
  "manufacturer" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average lap time for retired time of +23.707 and a Grid greater than 21?`:
```sql
                SELECT AVG("laps") FROM "125cc_classification" WHERE "time_retired"='+23.707' AND "grid">21;
```
## Task
Generate a SQL query to answer the following question:
`When the away team scored 9.8 (62) what was the crowd turnout?`

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

CREATE TABLE "round_8" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the away team scored 9.8 (62) what was the crowd turnout?`:
```sql
                SELECT "crowd" FROM "round_8" WHERE "away_team_score"='9.8 (62)';
```
## Task
Generate a SQL query to answer the following question:
`Which home team plays at victoria park?`

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

CREATE TABLE "round_8" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which home team plays at victoria park?`:
```sql
                SELECT "home_team" FROM "round_8" WHERE "venue"='victoria park';
```
## Task
Generate a SQL query to answer the following question:
`Tell me the lowest avg for 6 yards and rec more than 1`

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

CREATE TABLE "wide_receivers" (
  "player" text,
  "rec" real,
  "yards" real,
  "avg" real,
  "td_s" real,
  "long" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the lowest avg for 6 yards and rec more than 1`:
```sql
                SELECT MIN("avg") FROM "wide_receivers" WHERE "yards"=6 AND "rec">1;
```
## Task
Generate a SQL query to answer the following question:
`Name the sum of long for avg more than 9.8 with rec less than 5 and yards less than 20`

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

CREATE TABLE "wide_receivers" (
  "player" text,
  "rec" real,
  "yards" real,
  "avg" real,
  "td_s" real,
  "long" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sum of long for avg more than 9.8 with rec less than 5 and yards less than 20`:
```sql
                SELECT SUM("long") FROM "wide_receivers" WHERE "avg">9.8 AND "rec"<5 AND "yards"<20;
```
## Task
Generate a SQL query to answer the following question:
`Name the sum of long for avg less than 6 and rec less than 2`

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

CREATE TABLE "wide_receivers" (
  "player" text,
  "rec" real,
  "yards" real,
  "avg" real,
  "td_s" real,
  "long" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sum of long for avg less than 6 and rec less than 2`:
```sql
                SELECT SUM("long") FROM "wide_receivers" WHERE "avg"<6 AND "rec"<2;
```
## Task
Generate a SQL query to answer the following question:
`Name the average TD's for andy mccullough with yards less than 434`

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

CREATE TABLE "wide_receivers" (
  "player" text,
  "rec" real,
  "yards" real,
  "avg" real,
  "td_s" real,
  "long" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average TD's for andy mccullough with yards less than 434`:
```sql
                SELECT AVG("td_s") FROM "wide_receivers" WHERE "player"='andy mccullough' AND "yards"<434;
```
## Task
Generate a SQL query to answer the following question:
`Name the lelast decile for roll of 428`

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

CREATE TABLE "waitemata_local_board" (
  "name" text,
  "years" text,
  "gender" text,
  "area" text,
  "authority" text,
  "decile" real,
  "roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the lelast decile for roll of 428`:
```sql
                SELECT MIN("decile") FROM "waitemata_local_board" WHERE "roll"=428;
```
## Task
Generate a SQL query to answer the following question:
`Name the most decile for roll of 428`

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

CREATE TABLE "waitemata_local_board" (
  "name" text,
  "years" text,
  "gender" text,
  "area" text,
  "authority" text,
  "decile" real,
  "roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most decile for roll of 428`:
```sql
                SELECT MAX("decile") FROM "waitemata_local_board" WHERE "roll"=428;
```
## Task
Generate a SQL query to answer the following question:
`What's the highest year than hawthorn won with a season result of preliminary finalist and a crowd smaller than 27,407?`

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

CREATE TABLE "night_series_winners_1977_1987" (
  "year" real,
  "winners" text,
  "grand_finalist" text,
  "scores" text,
  "venue" text,
  "crowd" real,
  "margin" real,
  "season_result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the highest year than hawthorn won with a season result of preliminary finalist and a crowd smaller than 27,407?`:
```sql
                SELECT MAX("year") FROM "night_series_winners_1977_1987" WHERE "winners"='hawthorn' AND "season_result"='preliminary finalist' AND "crowd"<'27,407';
```
## Task
Generate a SQL query to answer the following question:
`What scores did grand finalist hawthorn have?`

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

CREATE TABLE "night_series_winners_1977_1987" (
  "year" real,
  "winners" text,
  "grand_finalist" text,
  "scores" text,
  "venue" text,
  "crowd" real,
  "margin" real,
  "season_result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What scores did grand finalist hawthorn have?`:
```sql
                SELECT "scores" FROM "night_series_winners_1977_1987" WHERE "grand_finalist"='hawthorn';
```
## Task
Generate a SQL query to answer the following question:
`What grand finalist had a year after 1979, a margin smaller than 30, and winners of essendon?`

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

CREATE TABLE "night_series_winners_1977_1987" (
  "year" real,
  "winners" text,
  "grand_finalist" text,
  "scores" text,
  "venue" text,
  "crowd" real,
  "margin" real,
  "season_result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What grand finalist had a year after 1979, a margin smaller than 30, and winners of essendon?`:
```sql
                SELECT "grand_finalist" FROM "night_series_winners_1977_1987" WHERE "year">1979 AND "margin"<30 AND "winners"='essendon';
```
## Task
Generate a SQL query to answer the following question:
`Tell me the sum of number of jamaicans given british citizenship for 2004 and registration of a minor child more than 640`

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

CREATE TABLE "population_and_distribution" (
  "year" real,
  "numer_of_jamaicans_granted_british_citizenship" real,
  "naturalisation_by_residence" real,
  "naturalisation_by_marriage" real,
  "registration_of_a_minor_child" real,
  "registration_by_other_means" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the sum of number of jamaicans given british citizenship for 2004 and registration of a minor child more than 640`:
```sql
                SELECT SUM("numer_of_jamaicans_granted_british_citizenship") FROM "population_and_distribution" WHERE "year"=2004 AND "registration_of_a_minor_child">640;
```
## Task
Generate a SQL query to answer the following question:
`What team played under 52 Reg GP, and picked 130?`

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

CREATE TABLE "list_of_vancouver_canucks_draft_picks" (
  "rd_num" real,
  "pick_num" real,
  "player" text,
  "team_league" text,
  "reg_gp" real,
  "pl_gp" real
);
### SQL
Given the database schema, here is the SQL query that answers `What team played under 52 Reg GP, and picked 130?`:
```sql
                SELECT "team_league" FROM "list_of_vancouver_canucks_draft_picks" WHERE "reg_gp"<52 AND "pick_num"=130;
```
## Task
Generate a SQL query to answer the following question:
`What is the highest PL GP for a round greater than 9?`

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

CREATE TABLE "list_of_vancouver_canucks_draft_picks" (
  "rd_num" real,
  "pick_num" real,
  "player" text,
  "team_league" text,
  "reg_gp" real,
  "pl_gp" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest PL GP for a round greater than 9?`:
```sql
                SELECT MAX("pl_gp") FROM "list_of_vancouver_canucks_draft_picks" WHERE "rd_num">9;
```
## Task
Generate a SQL query to answer the following question:
`Which title has a length of 4:22?`

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

CREATE TABLE "track_listing" (
  "title" text,
  "composer_s" text,
  "guest_performer" text,
  "producer_s" text,
  "time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which title has a length of 4:22?`:
```sql
                SELECT "title" FROM "track_listing" WHERE "time"='4:22';
```
## Task
Generate a SQL query to answer the following question:
`Which composer has a track length of 2:50?`

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

CREATE TABLE "track_listing" (
  "title" text,
  "composer_s" text,
  "guest_performer" text,
  "producer_s" text,
  "time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which composer has a track length of 2:50?`:
```sql
                SELECT "composer_s" FROM "track_listing" WHERE "time"='2:50';
```
## Task
Generate a SQL query to answer the following question:
`Which title has a Black Ice for a guest performer and a length of 5:49?`

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

CREATE TABLE "track_listing" (
  "title" text,
  "composer_s" text,
  "guest_performer" text,
  "producer_s" text,
  "time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which title has a Black Ice for a guest performer and a length of 5:49?`:
```sql
                SELECT "title" FROM "track_listing" WHERE "guest_performer"='black ice' AND "time"='5:49';
```