cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`What country is the IATA BLQ located in?`

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

CREATE TABLE "current_destinations" (
  "city" text,
  "country" text,
  "iata" text,
  "icao" text,
  "airport" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country is the IATA BLQ located in?`:
```sql
                SELECT "country" FROM "current_destinations" WHERE "iata"='blq';
```
## Task
Generate a SQL query to answer the following question:
`What is the IATA of Madrid-Barajas Airport?`

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

CREATE TABLE "current_destinations" (
  "city" text,
  "country" text,
  "iata" text,
  "icao" text,
  "airport" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the IATA of Madrid-Barajas Airport?`:
```sql
                SELECT "iata" FROM "current_destinations" WHERE "airport"='madrid-barajas airport';
```
## Task
Generate a SQL query to answer the following question:
`Which city has the ICAO of LIRF?`

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

CREATE TABLE "current_destinations" (
  "city" text,
  "country" text,
  "iata" text,
  "icao" text,
  "airport" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which city has the ICAO of LIRF?`:
```sql
                SELECT "city" FROM "current_destinations" WHERE "icao"='lirf';
```
## Task
Generate a SQL query to answer the following question:
`Which city is Naples Airport located in?`

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

CREATE TABLE "current_destinations" (
  "city" text,
  "country" text,
  "iata" text,
  "icao" text,
  "airport" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which city is Naples Airport located in?`:
```sql
                SELECT "city" FROM "current_destinations" WHERE "airport"='naples airport';
```
## Task
Generate a SQL query to answer the following question:
`Tell me the Ryuji Hijikata for TAKA Michinoku of Hayashi (28:05)`

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

CREATE TABLE "2006" (
  "block_a" text,
  "kaz_hayashi" text,
  "ryuji_hijikata" text,
  "taka_michinoku" text,
  "brother_yasshi" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the Ryuji Hijikata for TAKA Michinoku of Hayashi (28:05)`:
```sql
                SELECT "ryuji_hijikata" FROM "2006" WHERE "taka_michinoku"='hayashi (28:05)';
```
## Task
Generate a SQL query to answer the following question:
`Tell me the Ryuji Hijikata for Block A of Ryuji Hijikata`

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

CREATE TABLE "2006" (
  "block_a" text,
  "kaz_hayashi" text,
  "ryuji_hijikata" text,
  "taka_michinoku" text,
  "brother_yasshi" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the Ryuji Hijikata for Block A of Ryuji Hijikata`:
```sql
                SELECT "ryuji_hijikata" FROM "2006" WHERE "block_a"='ryuji hijikata';
```
## Task
Generate a SQL query to answer the following question:
`When South Melbourne was the Away Team, what was their score?`

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

CREATE TABLE "round_15" (
  "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 South Melbourne was the Away Team, what was their score?`:
```sql
                SELECT "away_team_score" FROM "round_15" WHERE "away_team"='south melbourne';
```
## Task
Generate a SQL query to answer the following question:
`Tell me the away team score for away team of south melbourne`

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

CREATE TABLE "round_10" (
  "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 `Tell me the away team score for away team of south melbourne`:
```sql
                SELECT "away_team_score" FROM "round_10" WHERE "away_team"='south melbourne';
```
## Task
Generate a SQL query to answer the following question:
`I want to know the away team score for vfl park venue`

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

CREATE TABLE "round_10" (
  "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 `I want to know the away team score for vfl park venue`:
```sql
                SELECT "away_team_score" FROM "round_10" WHERE "venue"='vfl park';
```
## Task
Generate a SQL query to answer the following question:
`Name the total number of tracks for of the fallen angel`

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

CREATE TABLE "track_listing" (
  "track" real,
  "title" text,
  "translation" text,
  "composer" text,
  "recorded" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of tracks for of the fallen angel`:
```sql
                SELECT COUNT("track") FROM "track_listing" WHERE "translation"='the fallen angel';
```
## Task
Generate a SQL query to answer the following question:
`What driver went 14 rounds with a 193 Chassis?`

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

CREATE TABLE "drivers_and_constructors" (
  "entrant" text,
  "constructor" text,
  "chassis" text,
  "engine" text,
  "tyre" text,
  "driver" text,
  "rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `What driver went 14 rounds with a 193 Chassis?`:
```sql
                SELECT "driver" FROM "drivers_and_constructors" WHERE "chassis"='193' AND "rounds"='14';
```
## Task
Generate a SQL query to answer the following question:
`What engine was used when Aguri Suzuki drove the FA13B FA14 Chassis?`

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

CREATE TABLE "drivers_and_constructors" (
  "entrant" text,
  "constructor" text,
  "chassis" text,
  "engine" text,
  "tyre" text,
  "driver" text,
  "rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `What engine was used when Aguri Suzuki drove the FA13B FA14 Chassis?`:
```sql
                SELECT "engine" FROM "drivers_and_constructors" WHERE "chassis"='fa13b fa14' AND "driver"='aguri suzuki';
```
## Task
Generate a SQL query to answer the following question:
`Who was the entrant for all the round with Jean Alesi?`

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

CREATE TABLE "drivers_and_constructors" (
  "entrant" text,
  "constructor" text,
  "chassis" text,
  "engine" text,
  "tyre" text,
  "driver" text,
  "rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the entrant for all the round with Jean Alesi?`:
```sql
                SELECT "entrant" FROM "drivers_and_constructors" WHERE "rounds"='all' AND "driver"='jean alesi';
```
## Task
Generate a SQL query to answer the following question:
`What engine did Riccardo Patrese use?`

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

CREATE TABLE "drivers_and_constructors" (
  "entrant" text,
  "constructor" text,
  "chassis" text,
  "engine" text,
  "tyre" text,
  "driver" text,
  "rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `What engine did Riccardo Patrese use?`:
```sql
                SELECT "engine" FROM "drivers_and_constructors" WHERE "driver"='riccardo patrese';
```
## Task
Generate a SQL query to answer the following question:
`If the home team was footscray which venue did they play it?`

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

CREATE TABLE "round_12" (
  "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 `If the home team was footscray which venue did they play it?`:
```sql
                SELECT "venue" FROM "round_12" WHERE "home_team"='footscray';
```
## Task
Generate a SQL query to answer the following question:
`When the home team was footscray what did they score?`

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

CREATE TABLE "round_12" (
  "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 home team was footscray what did they score?`:
```sql
                SELECT "home_team_score" FROM "round_12" WHERE "home_team"='footscray';
```
## Task
Generate a SQL query to answer the following question:
`When the home team north melbourne was playing what did they score?`

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

CREATE TABLE "round_12" (
  "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 home team north melbourne was playing what did they score?`:
```sql
                SELECT "home_team_score" FROM "round_12" WHERE "home_team"='north melbourne';
```
## Task
Generate a SQL query to answer the following question:
`What is the score of the September 20, 2005 match when the Opponents are FC Bayern Munich?`

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

CREATE TABLE "results" (
  "date" text,
  "opponents" text,
  "score" text,
  "competition" text,
  "match_report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the September 20, 2005 match when the Opponents are FC Bayern Munich?`:
```sql
                SELECT "score" FROM "results" WHERE "opponents"='fc bayern munich' AND "date"='september 20, 2005';
```
## Task
Generate a SQL query to answer the following question:
`What is the match report for July 10, 2005?`

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

CREATE TABLE "results" (
  "date" text,
  "opponents" text,
  "score" text,
  "competition" text,
  "match_report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the match report for July 10, 2005?`:
```sql
                SELECT "match_report" FROM "results" WHERE "date"='july 10, 2005';
```
## Task
Generate a SQL query to answer the following question:
`What is the date of the GC competition when the opponents are 1. FC Nuremberg?`

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

CREATE TABLE "results" (
  "date" text,
  "opponents" text,
  "score" text,
  "competition" text,
  "match_report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the GC competition when the opponents are 1. FC Nuremberg?`:
```sql
                SELECT "date" FROM "results" WHERE "opponents"='1. fc nuremberg' AND "competition"='gc';
```
## Task
Generate a SQL query to answer the following question:
`Which competition was held on September 10, 2005?`

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

CREATE TABLE "results" (
  "date" text,
  "opponents" text,
  "score" text,
  "competition" text,
  "match_report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which competition was held on September 10, 2005?`:
```sql
                SELECT "competition" FROM "results" WHERE "date"='september 10, 2005';
```
## Task
Generate a SQL query to answer the following question:
`In which competition was the score 3-0?`

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

CREATE TABLE "results" (
  "date" text,
  "opponents" text,
  "score" text,
  "competition" text,
  "match_report" text
);
### SQL
Given the database schema, here is the SQL query that answers `In which competition was the score 3-0?`:
```sql
                SELECT "competition" FROM "results" WHERE "score"='3-0';
```
## Task
Generate a SQL query to answer the following question:
`Who was the visitor when the lakers were at home with a Score of 85–106?`

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

CREATE TABLE "april" (
  "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 visitor when the lakers were at home with a Score of 85–106?`:
```sql
                SELECT "visitor" FROM "april" WHERE "home"='lakers' AND "score"='85–106';
```
## Task
Generate a SQL query to answer the following question:
`what is the date of birth for the player with goals less than 4, games more than 1, years at club, 1945 and named jim young?`

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

CREATE TABLE "players_who_made_their_debut_for_the_gee" (
  "debut_year" real,
  "player" text,
  "date_of_birth" text,
  "games" real,
  "goals" real,
  "years_at_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the date of birth for the player with goals less than 4, games more than 1, years at club, 1945 and named jim young?`:
```sql
                SELECT "date_of_birth" FROM "players_who_made_their_debut_for_the_gee" WHERE "goals"<4 AND "games">1 AND "years_at_club"='1945' AND "player"='jim young';
```
## Task
Generate a SQL query to answer the following question:
`what is the debut year for player terry fulton with games less than 51?`

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

CREATE TABLE "players_who_made_their_debut_for_the_gee" (
  "debut_year" real,
  "player" text,
  "date_of_birth" text,
  "games" real,
  "goals" real,
  "years_at_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the debut year for player terry fulton with games less than 51?`:
```sql
                SELECT AVG("debut_year") FROM "players_who_made_their_debut_for_the_gee" WHERE "player"='terry fulton' AND "games"<51;
```
## Task
Generate a SQL query to answer the following question:
`How people attended Victoria Park?`

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

CREATE TABLE "round_6" (
  "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 `How people attended Victoria Park?`:
```sql
                SELECT AVG("crowd") FROM "round_6" WHERE "venue"='victoria park';
```
## Task
Generate a SQL query to answer the following question:
`What is the away team score for South Melbourne?`

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

CREATE TABLE "round_6" (
  "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 score for South Melbourne?`:
```sql
                SELECT "away_team_score" FROM "round_6" WHERE "away_team"='south melbourne';
```
## Task
Generate a SQL query to answer the following question:
`Who played Melbourne as the home team?`

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

CREATE TABLE "round_6" (
  "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 `Who played Melbourne as the home team?`:
```sql
                SELECT "home_team" FROM "round_6" WHERE "away_team"='melbourne';
```
## Task
Generate a SQL query to answer the following question:
`Which away team has an attendance of more than 17,000?`

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

CREATE TABLE "round_6" (
  "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 away team has an attendance of more than 17,000?`:
```sql
                SELECT "away_team" FROM "round_6" WHERE "crowd">'17,000';
```
## Task
Generate a SQL query to answer the following question:
`Which away team played at MCG?`

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

CREATE TABLE "round_4" (
  "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 away team played at MCG?`:
```sql
                SELECT "away_team" FROM "round_4" WHERE "venue"='mcg';
```
## Task
Generate a SQL query to answer the following question:
`What was the date when Geelong was the home team?`

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

CREATE TABLE "round_4" (
  "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 date when Geelong was the home team?`:
```sql
                SELECT "date" FROM "round_4" WHERE "home_team"='geelong';
```
## Task
Generate a SQL query to answer the following question:
`What is Damien Martyn's bowling style?`

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

CREATE TABLE "australia" (
  "player" text,
  "date_of_birth" text,
  "batting_style" text,
  "bowling_style" text,
  "first_class_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Damien Martyn's bowling style?`:
```sql
                SELECT "bowling_style" FROM "australia" WHERE "player"='damien martyn';
```
## Task
Generate a SQL query to answer the following question:
`What is the batting style of the player born on 14 November 1971?`

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

CREATE TABLE "australia" (
  "player" text,
  "date_of_birth" text,
  "batting_style" text,
  "bowling_style" text,
  "first_class_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the batting style of the player born on 14 November 1971?`:
```sql
                SELECT "batting_style" FROM "australia" WHERE "date_of_birth"='14 november 1971';
```
## Task
Generate a SQL query to answer the following question:
`What is the first class team of the player born on 23 February 1973?`

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

CREATE TABLE "australia" (
  "player" text,
  "date_of_birth" text,
  "batting_style" text,
  "bowling_style" text,
  "first_class_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the first class team of the player born on 23 February 1973?`:
```sql
                SELECT "first_class_team" FROM "australia" WHERE "date_of_birth"='23 february 1973';
```
## Task
Generate a SQL query to answer the following question:
`What is the type for EU Council Presidency of UK and John Major as President-in-Office?`

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

CREATE TABLE "1975_2009" (
  "year" real,
  "date" text,
  "type" text,
  "eu_council_presidency" text,
  "president_in_office" text,
  "host_city" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the type for EU Council Presidency of UK and John Major as President-in-Office?`:
```sql
                SELECT "type" FROM "1975_2009" WHERE "eu_council_presidency"='uk' AND "president_in_office"='john major';
```
## Task
Generate a SQL query to answer the following question:
`In which host city was Margaret Thatcher the President-in-Office in 1981?`

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

CREATE TABLE "1975_2009" (
  "year" real,
  "date" text,
  "type" text,
  "eu_council_presidency" text,
  "president_in_office" text,
  "host_city" text
);
### SQL
Given the database schema, here is the SQL query that answers `In which host city was Margaret Thatcher the President-in-Office in 1981?`:
```sql
                SELECT "host_city" FROM "1975_2009" WHERE "president_in_office"='margaret thatcher' AND "year"=1981;
```
## Task
Generate a SQL query to answer the following question:
`How many average scores have preliminary scores over 9.25, interview scores more than 9.44, and evening gown scores of 9.77?`

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

CREATE TABLE "final_competition_scores" (
  "country" text,
  "preliminaries" real,
  "interview" real,
  "swimsuit" real,
  "evening_gown" real,
  "average" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many average scores have preliminary scores over 9.25, interview scores more than 9.44, and evening gown scores of 9.77?`:
```sql
                SELECT COUNT("average") FROM "final_competition_scores" WHERE "preliminaries">9.25 AND "interview">9.44 AND "evening_gown"=9.77;
```
## Task
Generate a SQL query to answer the following question:
`What is the least score for interview with a preliminaries score less than 9.4, evening gown score less than 9.55, and swimsuit score more than 9.18 in New York?`

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

CREATE TABLE "final_competition_scores" (
  "country" text,
  "preliminaries" real,
  "interview" real,
  "swimsuit" real,
  "evening_gown" real,
  "average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least score for interview with a preliminaries score less than 9.4, evening gown score less than 9.55, and swimsuit score more than 9.18 in New York?`:
```sql
                SELECT MIN("interview") FROM "final_competition_scores" WHERE "preliminaries"<9.4 AND "evening_gown"<9.55 AND "country"='new york' AND "swimsuit">9.18;
```
## Task
Generate a SQL query to answer the following question:
`Name the seven for 29 november 1690`

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

CREATE TABLE "in_ordinary" (
  "date" text,
  "three" text,
  "four" text,
  "five" text,
  "seven" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the seven for 29 november 1690`:
```sql
                SELECT "seven" FROM "in_ordinary" WHERE "date"='29 november 1690';
```
## Task
Generate a SQL query to answer the following question:
`Name the four for 6 march 1801`

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

CREATE TABLE "in_ordinary" (
  "date" text,
  "three" text,
  "four" text,
  "five" text,
  "seven" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the four for 6 march 1801`:
```sql
                SELECT "four" FROM "in_ordinary" WHERE "date"='6 march 1801';
```
## Task
Generate a SQL query to answer the following question:
`Name the three for william prewett for four and five being richard ellis with seven being nicholas king on 5 november 1693`

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

CREATE TABLE "in_ordinary" (
  "date" text,
  "three" text,
  "four" text,
  "five" text,
  "seven" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the three for william prewett for four and five being richard ellis with seven being nicholas king on 5 november 1693`:
```sql
                SELECT "three" FROM "in_ordinary" WHERE "four"='william prewett' AND "five"='richard ellis' AND "seven"='nicholas king' AND "date"='5 november 1693';
```
## Task
Generate a SQL query to answer the following question:
`Name the three for 16 december 1676`

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

CREATE TABLE "in_ordinary" (
  "date" text,
  "three" text,
  "four" text,
  "five" text,
  "seven" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the three for 16 december 1676`:
```sql
                SELECT "three" FROM "in_ordinary" WHERE "date"='16 december 1676';
```
## Task
Generate a SQL query to answer the following question:
`Tell me the average Grid for driver of Luca Badoer and Laps more than 69`

### 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 average Grid for driver of Luca Badoer and Laps more than 69`:
```sql
                SELECT AVG("grid") FROM "race" WHERE "driver"='luca badoer' AND "laps">69;
```
## Task
Generate a SQL query to answer the following question:
`What final was Farhad Rezaei in?`

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

CREATE TABLE "fencing" (
  "athlete" text,
  "event" text,
  "semifinal" text,
  "final" text,
  "rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What final was Farhad Rezaei in?`:
```sql
                SELECT "final" FROM "fencing" WHERE "athlete"='farhad rezaei';
```
## Task
Generate a SQL query to answer the following question:
`What final was ranked 4?`

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

CREATE TABLE "fencing" (
  "athlete" text,
  "event" text,
  "semifinal" text,
  "final" text,
  "rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What final was ranked 4?`:
```sql
                SELECT "final" FROM "fencing" WHERE "rank"='4';
```
## Task
Generate a SQL query to answer the following question:
`What was the reanking of Hamid Veisi?`

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

CREATE TABLE "fencing" (
  "athlete" text,
  "event" text,
  "semifinal" text,
  "final" text,
  "rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the reanking of Hamid Veisi?`:
```sql
                SELECT "rank" FROM "fencing" WHERE "athlete"='hamid veisi';
```
## Task
Generate a SQL query to answer the following question:
`Which Franchise has a Percentage under 0.707, a Year larger than 1931, and the Finish was won 1998 World Series?`

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

CREATE TABLE "season_records" (
  "year" real,
  "franchise" text,
  "league" text,
  "percentage" real,
  "finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Franchise has a Percentage under 0.707, a Year larger than 1931, and the Finish was won 1998 World Series?`:
```sql
                SELECT "franchise" FROM "season_records" WHERE "percentage"<0.707 AND "year">1931 AND "finish"='won 1998 world series';
```
## Task
Generate a SQL query to answer the following question:
`What is the average Year for the Finish of lost 2001 alcs and the Percentage is over 0.716?`

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

CREATE TABLE "season_records" (
  "year" real,
  "franchise" text,
  "league" text,
  "percentage" real,
  "finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Year for the Finish of lost 2001 alcs and the Percentage is over 0.716?`:
```sql
                SELECT AVG("year") FROM "season_records" WHERE "finish"='lost 2001 alcs' AND "percentage">0.716;
```
## Task
Generate a SQL query to answer the following question:
`In the Year 1939, what was the Finish when Al was the League?`

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

CREATE TABLE "season_records" (
  "year" real,
  "franchise" text,
  "league" text,
  "percentage" real,
  "finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `In the Year 1939, what was the Finish when Al was the League?`:
```sql
                SELECT "finish" FROM "season_records" WHERE "league"='al' AND "year"=1939;
```
## Task
Generate a SQL query to answer the following question:
`What was the Finish when NL was the League, the Percentage was under 0.726, the Year was larger than 1897, and the Franchies was the Pittsburgh Pirates?`

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

CREATE TABLE "season_records" (
  "year" real,
  "franchise" text,
  "league" text,
  "percentage" real,
  "finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Finish when NL was the League, the Percentage was under 0.726, the Year was larger than 1897, and the Franchies was the Pittsburgh Pirates?`:
```sql
                SELECT "finish" FROM "season_records" WHERE "league"='nl' AND "percentage"<0.726 AND "year">1897 AND "franchise"='pittsburgh pirates';
```
## Task
Generate a SQL query to answer the following question:
`What was the venue when the home team was footscray?`

### 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 was the venue when the home team was footscray?`:
```sql
                SELECT "venue" FROM "round_14" WHERE "home_team"='footscray';
```
## Task
Generate a SQL query to answer the following question:
`What was the crowd when the away team was hawthorn?`

### 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 was the crowd when the away team was hawthorn?`:
```sql
                SELECT MIN("crowd") FROM "round_14" WHERE "away_team"='hawthorn';
```
## Task
Generate a SQL query to answer the following question:
`What city houses the Ciro Vigorito stadium?`

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

CREATE TABLE "girone_b" (
  "club" text,
  "city" text,
  "stadium" text,
  "capacity" real,
  "2011_12_season" text
);
### SQL
Given the database schema, here is the SQL query that answers `What city houses the Ciro Vigorito stadium?`:
```sql
                SELECT "city" FROM "girone_b" WHERE "stadium"='ciro vigorito';
```
## Task
Generate a SQL query to answer the following question:
`I want to know the highest silver for total of 4 for poland and gold less than 1`

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

CREATE TABLE "medal_table" (
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `I want to know the highest silver for total of 4 for poland and gold less than 1`:
```sql
                SELECT MAX("silver") FROM "medal_table" WHERE "total"=4 AND "nation"='poland' AND "gold"<1;
```
## Task
Generate a SQL query to answer the following question:
`Tell me the average silver for total more than 1 with bronze of 2 for france and gold more than 0`

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

CREATE TABLE "medal_table" (
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the average silver for total more than 1 with bronze of 2 for france and gold more than 0`:
```sql
                SELECT AVG("silver") FROM "medal_table" WHERE "total">1 AND "bronze"=2 AND "nation"='france' AND "gold">0;
```
## Task
Generate a SQL query to answer the following question:
`Tell me the number of gold for albania with a silver of 1 and total less than 1`

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

CREATE TABLE "medal_table" (
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the number of gold for albania with a silver of 1 and total less than 1`:
```sql
                SELECT COUNT("gold") FROM "medal_table" WHERE "silver"=1 AND "nation"='albania' AND "total"<1;
```
## Task
Generate a SQL query to answer the following question:
`Tell me the average gold for moldova and bronze less than 1`

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

CREATE TABLE "medal_table" (
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the average gold for moldova and bronze less than 1`:
```sql
                SELECT AVG("gold") FROM "medal_table" WHERE "nation"='moldova' AND "bronze"<1;
```
## Task
Generate a SQL query to answer the following question:
`Tell me the sum of gold for bronze less than 0`

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

CREATE TABLE "medal_table" (
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the sum of gold for bronze less than 0`:
```sql
                SELECT SUM("gold") FROM "medal_table" WHERE "bronze"<0;
```
## Task
Generate a SQL query to answer the following question:
`What tyre was used in the Zandvoort circuit?`

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

CREATE TABLE "world_championship_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 tyre was used in the Zandvoort circuit?`:
```sql
                SELECT "tyre" FROM "world_championship_season_review" WHERE "circuit"='zandvoort';
```
## Task
Generate a SQL query to answer the following question:
`Which circuit did Alberto Ascari set the fastest lap time with a Ferrari?`

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

CREATE TABLE "world_championship_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 `Which circuit did Alberto Ascari set the fastest lap time with a Ferrari?`:
```sql
                SELECT "circuit" FROM "world_championship_season_review" WHERE "constructor"='ferrari' AND "fastest_lap"='alberto ascari';
```
## Task
Generate a SQL query to answer the following question:
`Who won the race with a Ferrari, were Luigi Villoresi set the fastest lap time?`

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

CREATE TABLE "world_championship_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 `Who won the race with a Ferrari, were Luigi Villoresi set the fastest lap time?`:
```sql
                SELECT "winning_driver" FROM "world_championship_season_review" WHERE "constructor"='ferrari' AND "fastest_lap"='luigi villoresi';
```
## Task
Generate a SQL query to answer the following question:
`Which race did Alberto Ascari have both the Pole position and the win, but Luigi Villoresi set the fastest lap time?`

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

CREATE TABLE "world_championship_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 `Which race did Alberto Ascari have both the Pole position and the win, but Luigi Villoresi set the fastest lap time?`:
```sql
                SELECT "race" FROM "world_championship_season_review" WHERE "pole_position"='alberto ascari' AND "winning_driver"='alberto ascari' AND "fastest_lap"='luigi villoresi';
```
## Task
Generate a SQL query to answer the following question:
`Which county is named broderick wood products?`

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

CREATE TABLE "superfund_sites" (
  "cerclis_id" text,
  "name" text,
  "county" text,
  "proposed" text,
  "listed" text,
  "construction_completed" text,
  "partially_deleted" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which county is named broderick wood products?`:
```sql
                SELECT "county" FROM "superfund_sites" WHERE "name"='broderick wood products';
```
## Task
Generate a SQL query to answer the following question:
`What construction completed is named nelson tunnel/commodore waste rock?`

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

CREATE TABLE "superfund_sites" (
  "cerclis_id" text,
  "name" text,
  "county" text,
  "proposed" text,
  "listed" text,
  "construction_completed" text,
  "partially_deleted" text
);
### SQL
Given the database schema, here is the SQL query that answers `What construction completed is named nelson tunnel/commodore waste rock?`:
```sql
                SELECT "construction_completed" FROM "superfund_sites" WHERE "name"='nelson tunnel/commodore waste rock';
```
## Task
Generate a SQL query to answer the following question:
`What is the ID of marshall landfill on 09/08/1983?`

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

CREATE TABLE "superfund_sites" (
  "cerclis_id" text,
  "name" text,
  "county" text,
  "proposed" text,
  "listed" text,
  "construction_completed" text,
  "partially_deleted" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the ID of marshall landfill on 09/08/1983?`:
```sql
                SELECT "cerclis_id" FROM "superfund_sites" WHERE "listed"='09/08/1983' AND "name"='marshall landfill';
```
## Task
Generate a SQL query to answer the following question:
`Which nominee won the award for Fourth Best Indian Film?`

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

CREATE TABLE "awards" (
  "ceremony" text,
  "award" text,
  "category" text,
  "nominee" text,
  "outcome" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which nominee won the award for Fourth Best Indian Film?`:
```sql
                SELECT "nominee" FROM "awards" WHERE "outcome"='won' AND "category"='fourth best indian film';
```
## Task
Generate a SQL query to answer the following question:
`In which ceremony was Harnam Singh Rawail nominated for an award?`

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

CREATE TABLE "awards" (
  "ceremony" text,
  "award" text,
  "category" text,
  "nominee" text,
  "outcome" text
);
### SQL
Given the database schema, here is the SQL query that answers `In which ceremony was Harnam Singh Rawail nominated for an award?`:
```sql
                SELECT "ceremony" FROM "awards" WHERE "nominee"='harnam singh rawail';
```
## Task
Generate a SQL query to answer the following question:
`In which ceremony was Jayant nominated for an award?`

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

CREATE TABLE "awards" (
  "ceremony" text,
  "award" text,
  "category" text,
  "nominee" text,
  "outcome" text
);
### SQL
Given the database schema, here is the SQL query that answers `In which ceremony was Jayant nominated for an award?`:
```sql
                SELECT "ceremony" FROM "awards" WHERE "nominee"='jayant';
```
## Task
Generate a SQL query to answer the following question:
`What surface was the April 24, 2003 match played on?`

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

CREATE TABLE "singles_18_8" (
  "edition" text,
  "round" text,
  "date" text,
  "surface" text,
  "opponent" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What surface was the April 24, 2003 match played on?`:
```sql
                SELECT "surface" FROM "singles_18_8" WHERE "date"='april 24, 2003';
```
## Task
Generate a SQL query to answer the following question:
`How many times has Watney made the top 25 for a tournament in which he as also been cut 6 times?`

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

CREATE TABLE "summary" (
  "tournament" text,
  "wins" real,
  "top_10" real,
  "top_25" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many times has Watney made the top 25 for a tournament in which he as also been cut 6 times?`:
```sql
                SELECT SUM("top_25") FROM "summary" WHERE "cuts_made"=6;
```
## Task
Generate a SQL query to answer the following question:
`Which tournament has the highest number of cuts while also having 4 top 25 appearances?`

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

CREATE TABLE "summary" (
  "tournament" text,
  "wins" real,
  "top_10" real,
  "top_25" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which tournament has the highest number of cuts while also having 4 top 25 appearances?`:
```sql
                SELECT MAX("cuts_made") FROM "summary" WHERE "top_25"=4;
```
## Task
Generate a SQL query to answer the following question:
`What is the smallest grid with collision as the Time/Retired for pedro diniz?`

### 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 `What is the smallest grid with collision as the Time/Retired for pedro diniz?`:
```sql
                SELECT MIN("grid") FROM "race" WHERE "time_retired"='collision' AND "driver"='pedro diniz';
```
## Task
Generate a SQL query to answer the following question:
`What is the number of laps for Grid 14?`

### 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 `What is the number of laps for Grid 14?`:
```sql
                SELECT COUNT("laps") FROM "race" WHERE "grid"=14;
```
## Task
Generate a SQL query to answer the following question:
`What is the number of the grid for mika häkkinen and more than 45 laps?`

### 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 `What is the number of the grid for mika häkkinen and more than 45 laps?`:
```sql
                SELECT COUNT("grid") FROM "race" WHERE "driver"='mika häkkinen' AND "laps">45;
```
## Task
Generate a SQL query to answer the following question:
`Which home team has more than 19,000 spectators?`

### 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 has more than 19,000 spectators?`:
```sql
                SELECT "home_team" FROM "round_8" WHERE "crowd">'19,000';
```
## Task
Generate a SQL query to answer the following question:
`What is the Theme of Christie Paquet after 2004 with an Issue Price of $34.95?`

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

CREATE TABLE "canadian_floral_collection" (
  "year" real,
  "theme" text,
  "artist" text,
  "finish" text,
  "issue_price" text,
  "total_mintage" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Theme of Christie Paquet after 2004 with an Issue Price of $34.95?`:
```sql
                SELECT "theme" FROM "canadian_floral_collection" WHERE "artist"='christie paquet' AND "issue_price"='$34.95' AND "year">2004;
```
## Task
Generate a SQL query to answer the following question:
`What is the Year of Christie Paquet with Issue Price of $34.95?`

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

CREATE TABLE "canadian_floral_collection" (
  "year" real,
  "theme" text,
  "artist" text,
  "finish" text,
  "issue_price" text,
  "total_mintage" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Year of Christie Paquet with Issue Price of $34.95?`:
```sql
                SELECT AVG("year") FROM "canadian_floral_collection" WHERE "artist"='christie paquet' AND "issue_price"='$34.95';
```
## Task
Generate a SQL query to answer the following question:
`What is the Crowd for the Venue of Princes Park?`

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

CREATE TABLE "round_16" (
  "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 Crowd for the Venue of Princes Park?`:
```sql
                SELECT "crowd" FROM "round_16" WHERE "venue"='princes park';
```