cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`What is the average Attendance at Venue A on 16 October 2004?`

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

CREATE TABLE "matches" (
  "date" text,
  "opponent" text,
  "venue" text,
  "result" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Attendance at Venue A on 16 October 2004?`:
```sql
                SELECT AVG("attendance") FROM "matches" WHERE "venue"='a' AND "date"='16 october 2004';
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest Attendance when Middlesbrough played at Venue A?`

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

CREATE TABLE "matches" (
  "date" text,
  "opponent" text,
  "venue" text,
  "result" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Attendance when Middlesbrough played at Venue A?`:
```sql
                SELECT MIN("attendance") FROM "matches" WHERE "opponent"='middlesbrough' AND "venue"='a';
```
## Task
Generate a SQL query to answer the following question:
`Who was the home team when the away team scored 14.21 (105)?`

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

CREATE TABLE "round_13" (
  "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 was the home team when the away team scored 14.21 (105)?`:
```sql
                SELECT "home_team_score" FROM "round_13" WHERE "away_team_score"='14.21 (105)';
```
## Task
Generate a SQL query to answer the following question:
`Who was the sponsor for the bill introduced February 28, 2005 with cosponsors less than 200?`

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

CREATE TABLE "legislative_history" (
  "congress" text,
  "short_title" text,
  "bill_number_s" text,
  "date_introduced" text,
  "sponsor_s" text,
  "num_of_cosponsors" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the sponsor for the bill introduced February 28, 2005 with cosponsors less than 200?`:
```sql
                SELECT "sponsor_s" FROM "legislative_history" WHERE "num_of_cosponsors"<200 AND "date_introduced"='february 28, 2005';
```
## Task
Generate a SQL query to answer the following question:
`What year was Herself nominated at the MTV Movie Awards?`

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

CREATE TABLE "awards_and_nominations" (
  "year" real,
  "nominated_work" text,
  "event" text,
  "award" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was Herself nominated at the MTV Movie Awards?`:
```sql
                SELECT MAX("year") FROM "awards_and_nominations" WHERE "nominated_work"='herself' AND "event"='mtv movie awards';
```
## Task
Generate a SQL query to answer the following question:
`What is the average amount of spectators when Essendon played as the home team?`

### 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 average amount of spectators when Essendon played as the home team?`:
```sql
                SELECT AVG("crowd") FROM "round_16" WHERE "home_team"='essendon';
```
## Task
Generate a SQL query to answer the following question:
`What did the away team score at MCG?`

### 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 did the away team score at MCG?`:
```sql
                SELECT "away_team_score" FROM "round_16" WHERE "venue"='mcg';
```
## Task
Generate a SQL query to answer the following question:
`What did the home team score when playing against Collingwood?`

### 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 did the home team score when playing against Collingwood?`:
```sql
                SELECT "home_team_score" FROM "round_16" WHERE "away_team"='collingwood';
```
## Task
Generate a SQL query to answer the following question:
`Where was the game when Geelong was the away team?`

### 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 `Where was the game when Geelong was the away team?`:
```sql
                SELECT "venue" FROM "round_16" WHERE "away_team"='geelong';
```
## Task
Generate a SQL query to answer the following question:
`What team was the away team at Arden Street Oval?`

### 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 team was the away team at Arden Street Oval?`:
```sql
                SELECT "away_team" FROM "round_16" WHERE "venue"='arden street oval';
```
## Task
Generate a SQL query to answer the following question:
`What in Xenia's Diameter in km, with a latitude of 14 and a longitude of 249.4?`

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

CREATE TABLE "x" (
  "name" text,
  "latitude" real,
  "longitude" real,
  "diameter_km" real,
  "named_after" text
);
### SQL
Given the database schema, here is the SQL query that answers `What in Xenia's Diameter in km, with a latitude of 14 and a longitude of 249.4?`:
```sql
                SELECT COUNT("diameter_km") FROM "x" WHERE "latitude"<14 AND "name"='xenia' AND "longitude">249.4;
```
## Task
Generate a SQL query to answer the following question:
`What is the latitude for a crater with a diameter of 12.8 km and a longitude of 208?`

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

CREATE TABLE "x" (
  "name" text,
  "latitude" real,
  "longitude" real,
  "diameter_km" real,
  "named_after" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the latitude for a crater with a diameter of 12.8 km and a longitude of 208?`:
```sql
                SELECT AVG("latitude") FROM "x" WHERE "diameter_km"<12.8 AND "longitude"<208;
```
## Task
Generate a SQL query to answer the following question:
`Who was the Runner(s)-up in the race with a winning score of 67-66-65-69=267?`

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

CREATE TABLE "european_tour_wins_9" (
  "date" text,
  "tournament" text,
  "winning_score" text,
  "to_par" text,
  "margin_of_victory" text,
  "runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Runner(s)-up in the race with a winning score of 67-66-65-69=267?`:
```sql
                SELECT "runner_s_up" FROM "european_tour_wins_9" WHERE "winning_score"='67-66-65-69=267';
```
## Task
Generate a SQL query to answer the following question:
`When was the Masters Tournament?`

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

CREATE TABLE "european_tour_wins_9" (
  "date" text,
  "tournament" text,
  "winning_score" text,
  "to_par" text,
  "margin_of_victory" text,
  "runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the Masters Tournament?`:
```sql
                SELECT "date" FROM "european_tour_wins_9" WHERE "tournament"='masters tournament';
```
## Task
Generate a SQL query to answer the following question:
`What is the margin of victory in the race where Justin Rose was the runner-up?`

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

CREATE TABLE "european_tour_wins_9" (
  "date" text,
  "tournament" text,
  "winning_score" text,
  "to_par" text,
  "margin_of_victory" text,
  "runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the margin of victory in the race where Justin Rose was the runner-up?`:
```sql
                SELECT "margin_of_victory" FROM "european_tour_wins_9" WHERE "runner_s_up"='justin rose';
```
## Task
Generate a SQL query to answer the following question:
`What tournament took place on 7 Aug 2011?`

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

CREATE TABLE "european_tour_wins_9" (
  "date" text,
  "tournament" text,
  "winning_score" text,
  "to_par" text,
  "margin_of_victory" text,
  "runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What tournament took place on 7 Aug 2011?`:
```sql
                SELECT "tournament" FROM "european_tour_wins_9" WHERE "date"='7 aug 2011';
```
## Task
Generate a SQL query to answer the following question:
`For the team that had 4:05.096, what was their day 2?`

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

CREATE TABLE "qualifying_times" (
  "team" text,
  "class" text,
  "day_1" text,
  "day_2" text,
  "behind" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the team that had 4:05.096, what was their day 2?`:
```sql
                SELECT "day_2" FROM "qualifying_times" WHERE "day_1"='4:05.096';
```
## Task
Generate a SQL query to answer the following question:
`Which team had 3:18.513 on day 1?`

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

CREATE TABLE "qualifying_times" (
  "team" text,
  "class" text,
  "day_1" text,
  "day_2" text,
  "behind" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team had 3:18.513 on day 1?`:
```sql
                SELECT "team" FROM "qualifying_times" WHERE "day_1"='3:18.513';
```
## Task
Generate a SQL query to answer the following question:
`For the team with a class of gt2 and 3:59.820 on day 2, what was the behind?`

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

CREATE TABLE "qualifying_times" (
  "team" text,
  "class" text,
  "day_1" text,
  "day_2" text,
  "behind" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the team with a class of gt2 and 3:59.820 on day 2, what was the behind?`:
```sql
                SELECT "behind" FROM "qualifying_times" WHERE "class"='gt2' AND "day_2"='3:59.820';
```
## Task
Generate a SQL query to answer the following question:
`Which team was 3:47.761 on day 2?`

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

CREATE TABLE "qualifying_times" (
  "team" text,
  "class" text,
  "day_1" text,
  "day_2" text,
  "behind" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team was 3:47.761 on day 2?`:
```sql
                SELECT "team" FROM "qualifying_times" WHERE "day_2"='3:47.761';
```
## Task
Generate a SQL query to answer the following question:
`What is the class of the team that has a behind of +44.780?`

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

CREATE TABLE "qualifying_times" (
  "team" text,
  "class" text,
  "day_1" text,
  "day_2" text,
  "behind" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the class of the team that has a behind of +44.780?`:
```sql
                SELECT "class" FROM "qualifying_times" WHERE "behind"='+44.780';
```
## Task
Generate a SQL query to answer the following question:
`For the team with 3:42.162 on day 2, what was the behind?`

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

CREATE TABLE "qualifying_times" (
  "team" text,
  "class" text,
  "day_1" text,
  "day_2" text,
  "behind" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the team with 3:42.162 on day 2, what was the behind?`:
```sql
                SELECT "behind" FROM "qualifying_times" WHERE "day_2"='3:42.162';
```
## Task
Generate a SQL query to answer the following question:
`Which one of the tournaments had a QF in 1996?`

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

CREATE TABLE "juniors" (
  "tournament" text,
  "1993" text,
  "1994" text,
  "1995" text,
  "1996" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which one of the tournaments had a QF in 1996?`:
```sql
                SELECT "tournament" FROM "juniors" WHERE "1996"='qf';
```
## Task
Generate a SQL query to answer the following question:
`What is the value for the Wimbledon tournament in 1996?`

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

CREATE TABLE "juniors" (
  "tournament" text,
  "1993" text,
  "1994" text,
  "1995" text,
  "1996" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the value for the Wimbledon tournament in 1996?`:
```sql
                SELECT "1996" FROM "juniors" WHERE "tournament"='wimbledon';
```
## Task
Generate a SQL query to answer the following question:
`What year is center Ann Wauters?`

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

CREATE TABLE "see_also" (
  "year" real,
  "player" text,
  "position" text,
  "college_country" text,
  "wnba_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year is center Ann Wauters?`:
```sql
                SELECT SUM("year") FROM "see_also" WHERE "position"='center' AND "player"='ann wauters';
```
## Task
Generate a SQL query to answer the following question:
`What is the earliest year that includes a Seattle Storm guard?`

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

CREATE TABLE "see_also" (
  "year" real,
  "player" text,
  "position" text,
  "college_country" text,
  "wnba_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year that includes a Seattle Storm guard?`:
```sql
                SELECT MIN("year") FROM "see_also" WHERE "position"='guard' AND "wnba_team"='seattle storm';
```
## Task
Generate a SQL query to answer the following question:
`Regarding players before 2000, what is the USC player's position?`

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

CREATE TABLE "see_also" (
  "year" real,
  "player" text,
  "position" text,
  "college_country" text,
  "wnba_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Regarding players before 2000, what is the USC player's position?`:
```sql
                SELECT "position" FROM "see_also" WHERE "year"<2000 AND "college_country"='usc';
```
## Task
Generate a SQL query to answer the following question:
`What is the earliest year a Baylor player made the list?`

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

CREATE TABLE "see_also" (
  "year" real,
  "player" text,
  "position" text,
  "college_country" text,
  "wnba_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year a Baylor player made the list?`:
```sql
                SELECT MIN("year") FROM "see_also" WHERE "college_country"='baylor';
```
## Task
Generate a SQL query to answer the following question:
`What is Sue Bird's position?`

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

CREATE TABLE "see_also" (
  "year" real,
  "player" text,
  "position" text,
  "college_country" text,
  "wnba_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Sue Bird's position?`:
```sql
                SELECT "position" FROM "see_also" WHERE "player"='sue bird';
```
## Task
Generate a SQL query to answer the following question:
`Which Builder has a Class of Terrier?`

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

CREATE TABLE "1899_1913" (
  "class" text,
  "wheels" text,
  "date" text,
  "builder" text,
  "no_built" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Builder has a Class of Terrier?`:
```sql
                SELECT "builder" FROM "1899_1913" WHERE "class"='terrier';
```
## Task
Generate a SQL query to answer the following question:
`who is the constructor when the laps is less than 68, the grid is more than 20 and the driver is thierry boutsen?`

### 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 is the constructor when the laps is less than 68, the grid is more than 20 and the driver is thierry boutsen?`:
```sql
                SELECT "constructor" FROM "classification" WHERE "laps"<68 AND "grid">20 AND "driver"='thierry boutsen';
```
## Task
Generate a SQL query to answer the following question:
`what is the laps when the time/retired is turbo and the grid is less than 14?`

### 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 laps when the time/retired is turbo and the grid is less than 14?`:
```sql
                SELECT "laps" FROM "classification" WHERE "time_retired"='turbo' AND "grid"<14;
```
## Task
Generate a SQL query to answer the following question:
`what is the time/retired when the laps is less than 4?`

### 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/retired when the laps is less than 4?`:
```sql
                SELECT "time_retired" FROM "classification" WHERE "laps"<4;
```
## Task
Generate a SQL query to answer the following question:
`Name the most goals for total club and apps less than 120`

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

CREATE TABLE "statistics" (
  "season" text,
  "club" text,
  "competition" text,
  "apps" real,
  "goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most goals for total club and apps less than 120`:
```sql
                SELECT MAX("goals") FROM "statistics" WHERE "club"='total' AND "apps"<120;
```
## Task
Generate a SQL query to answer the following question:
`How many goals are associated with 75 games?`

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

CREATE TABLE "afl_draftees" (
  "draft" text,
  "pick" real,
  "player" text,
  "club" text,
  "games" real,
  "goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many goals are associated with 75 games?`:
```sql
                SELECT MAX("goals") FROM "afl_draftees" WHERE "games"=75;
```
## Task
Generate a SQL query to answer the following question:
`What is the position for the Rockets years of 2004-05?`

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

CREATE TABLE "g" (
  "player" text,
  "no_s" real,
  "height_in_ft" text,
  "position" text,
  "years_for_rockets" text,
  "school_club_team_country" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the position for the Rockets years of 2004-05?`:
```sql
                SELECT "position" FROM "g" WHERE "years_for_rockets"='2004-05';
```
## Task
Generate a SQL query to answer the following question:
`What is the average number of years for the Houston Rockets 2004-05?`

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

CREATE TABLE "g" (
  "player" text,
  "no_s" real,
  "height_in_ft" text,
  "position" text,
  "years_for_rockets" text,
  "school_club_team_country" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of years for the Houston Rockets 2004-05?`:
```sql
                SELECT AVG("no_s") FROM "g" WHERE "years_for_rockets"='2004-05';
```
## Task
Generate a SQL query to answer the following question:
`For the years 1992-93, what position did he play for the Houston Rockets?`

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

CREATE TABLE "g" (
  "player" text,
  "no_s" real,
  "height_in_ft" text,
  "position" text,
  "years_for_rockets" text,
  "school_club_team_country" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the years 1992-93, what position did he play for the Houston Rockets?`:
```sql
                SELECT "position" FROM "g" WHERE "years_for_rockets"='1992-93';
```
## Task
Generate a SQL query to answer the following question:
`What is the total number of years did he play the forward position and what school/club/team/country of Oregon State did he play?`

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

CREATE TABLE "g" (
  "player" text,
  "no_s" real,
  "height_in_ft" text,
  "position" text,
  "years_for_rockets" text,
  "school_club_team_country" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of years did he play the forward position and what school/club/team/country of Oregon State did he play?`:
```sql
                SELECT SUM("no_s") FROM "g" WHERE "position"='forward' AND "school_club_team_country"='oregon state';
```
## Task
Generate a SQL query to answer the following question:
`How many wins for bruce fleisher with over 31 events?`

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

CREATE TABLE "leaders" (
  "rank" real,
  "player" text,
  "country" text,
  "earnings" real,
  "events" real,
  "wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins for bruce fleisher with over 31 events?`:
```sql
                SELECT AVG("wins") FROM "leaders" WHERE "player"='bruce fleisher' AND "events">31;
```
## Task
Generate a SQL query to answer the following question:
`What is the average rank for players with under 26 events and less than 2 wins?`

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

CREATE TABLE "leaders" (
  "rank" real,
  "player" text,
  "country" text,
  "earnings" real,
  "events" real,
  "wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average rank for players with under 26 events and less than 2 wins?`:
```sql
                SELECT AVG("rank") FROM "leaders" WHERE "events"<26 AND "wins"<2;
```
## Task
Generate a SQL query to answer the following question:
`What is the high earnings for players with 34 events and over 2 wins?`

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

CREATE TABLE "leaders" (
  "rank" real,
  "player" text,
  "country" text,
  "earnings" real,
  "events" real,
  "wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the high earnings for players with 34 events and over 2 wins?`:
```sql
                SELECT MAX("earnings") FROM "leaders" WHERE "events"=34 AND "wins">2;
```
## Task
Generate a SQL query to answer the following question:
`What is the ranking for bruce fleisher with over $2,411,543?`

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

CREATE TABLE "leaders" (
  "rank" real,
  "player" text,
  "country" text,
  "earnings" real,
  "events" real,
  "wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the ranking for bruce fleisher with over $2,411,543?`:
```sql
                SELECT SUM("rank") FROM "leaders" WHERE "player"='bruce fleisher' AND "earnings">'2,411,543';
```
## Task
Generate a SQL query to answer the following question:
`Which tournament had a 2R categorization in 2009 and SF in 2010?`

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

CREATE TABLE "doubles_performance_timeline" (
  "tournament" text,
  "2007" text,
  "2008" text,
  "2009" text,
  "2010" text,
  "2011" text,
  "2012" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which tournament had a 2R categorization in 2009 and SF in 2010?`:
```sql
                SELECT "tournament" FROM "doubles_performance_timeline" WHERE "2009"='2r' AND "2010"='sf';
```
## Task
Generate a SQL query to answer the following question:
`What is the categorization in 2009 when it was 2R in 2008 and 2011?`

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

CREATE TABLE "doubles_performance_timeline" (
  "tournament" text,
  "2007" text,
  "2008" text,
  "2009" text,
  "2010" text,
  "2011" text,
  "2012" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the categorization in 2009 when it was 2R in 2008 and 2011?`:
```sql
                SELECT "2009" FROM "doubles_performance_timeline" WHERE "2008"='2r' AND "2011"='2r';
```
## Task
Generate a SQL query to answer the following question:
`What is the categorization in 2012 when it was A in 2008 and 1R in 2011?`

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

CREATE TABLE "doubles_performance_timeline" (
  "tournament" text,
  "2007" text,
  "2008" text,
  "2009" text,
  "2010" text,
  "2011" text,
  "2012" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the categorization in 2012 when it was A in 2008 and 1R in 2011?`:
```sql
                SELECT "2012" FROM "doubles_performance_timeline" WHERE "2008"='a' AND "2011"='1r';
```
## Task
Generate a SQL query to answer the following question:
`What is the categorization in 2010 when it was A in 2008 and 20011 while being QF in 2012?`

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

CREATE TABLE "doubles_performance_timeline" (
  "tournament" text,
  "2007" text,
  "2008" text,
  "2009" text,
  "2010" text,
  "2011" text,
  "2012" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the categorization in 2010 when it was A in 2008 and 20011 while being QF in 2012?`:
```sql
                SELECT "2010" FROM "doubles_performance_timeline" WHERE "2008"='a' AND "2011"='a' AND "2012"='qf';
```
## Task
Generate a SQL query to answer the following question:
`What city in the 06/07 season had cagliari and finished 16th in serie a?`

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

CREATE TABLE "2007_08_teams" (
  "club" text,
  "city" text,
  "stadium" text,
  "capacity" real,
  "2006_2007_season" text
);
### SQL
Given the database schema, here is the SQL query that answers `What city in the 06/07 season had cagliari and finished 16th in serie a?`:
```sql
                SELECT "city" FROM "2007_08_teams" WHERE "2006_2007_season"='16th in serie a' AND "club"='cagliari';
```
## Task
Generate a SQL query to answer the following question:
`What was the score against home team, Richmond?`

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

CREATE TABLE "round_3" (
  "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 score against home team, Richmond?`:
```sql
                SELECT "away_team_score" FROM "round_3" WHERE "home_team"='richmond';
```
## Task
Generate a SQL query to answer the following question:
`What is Fitzroy's smallest crowd size?`

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

CREATE TABLE "round_3" (
  "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 Fitzroy's smallest crowd size?`:
```sql
                SELECT MIN("crowd") FROM "round_3" WHERE "home_team"='fitzroy';
```
## Task
Generate a SQL query to answer the following question:
`How many people attended the game where the away team scored 16.7 (103) points?`

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

CREATE TABLE "round_3" (
  "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 many people attended the game where the away team scored 16.7 (103) points?`:
```sql
                SELECT COUNT("crowd") FROM "round_3" WHERE "away_team_score"='16.7 (103)';
```
## Task
Generate a SQL query to answer the following question:
`When was naomi cavaday the opponent?`

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

CREATE TABLE "singles_18_5_13" (
  "outcome" text,
  "date" text,
  "tournament" text,
  "surface" text,
  "opponent" text,
  "score" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was naomi cavaday the opponent?`:
```sql
                SELECT "date" FROM "singles_18_5_13" WHERE "opponent"='naomi cavaday';
```
## Task
Generate a SQL query to answer the following question:
`When was andrea gámiz the opponent?`

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

CREATE TABLE "singles_18_5_13" (
  "outcome" text,
  "date" text,
  "tournament" text,
  "surface" text,
  "opponent" text,
  "score" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was andrea gámiz the opponent?`:
```sql
                SELECT "date" FROM "singles_18_5_13" WHERE "opponent"='andrea gámiz';
```
## Task
Generate a SQL query to answer the following question:
`Who is the opponent when the score was 6–4, 6–2 and the surface was clay?`

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

CREATE TABLE "singles_18_5_13" (
  "outcome" text,
  "date" text,
  "tournament" text,
  "surface" text,
  "opponent" text,
  "score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the opponent when the score was 6–4, 6–2 and the surface was clay?`:
```sql
                SELECT "opponent" FROM "singles_18_5_13" WHERE "score"='6–4, 6–2' AND "surface"='clay';
```
## Task
Generate a SQL query to answer the following question:
`Where was game that had a home team score 18.16 (124)?`

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

CREATE TABLE "round_22" (
  "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 `Where was game that had a home team score 18.16 (124)?`:
```sql
                SELECT "venue" FROM "round_22" WHERE "home_team_score"='18.16 (124)';
```
## Task
Generate a SQL query to answer the following question:
`How many points did the away team score when the home team scored 16.14 (110)?`

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

CREATE TABLE "round_22" (
  "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 many points did the away team score when the home team scored 16.14 (110)?`:
```sql
                SELECT "away_team_score" FROM "round_22" WHERE "home_team_score"='16.14 (110)';
```
## Task
Generate a SQL query to answer the following question:
`What was the smallest crowd at a home game for essendon?`

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

CREATE TABLE "round_22" (
  "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 smallest crowd at a home game for essendon?`:
```sql
                SELECT MIN("crowd") FROM "round_22" WHERE "home_team"='essendon';
```
## Task
Generate a SQL query to answer the following question:
`Tell me the time/retired for riccardo patrese`

### 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 time/retired for riccardo patrese`:
```sql
                SELECT "time_retired" FROM "race" WHERE "driver"='riccardo patrese';
```
## Task
Generate a SQL query to answer the following question:
`I want the time/retired for grid of 24`

### 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 grid of 24`:
```sql
                SELECT "time_retired" FROM "race" WHERE "grid"=24;
```
## Task
Generate a SQL query to answer the following question:
`I want the driver for ferrari who made Laps less than 26 and grids more than 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" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `I want the driver for ferrari who made Laps less than 26 and grids more than 9`:
```sql
                SELECT "driver" FROM "race" WHERE "grid">9 AND "laps"<26 AND "constructor"='ferrari';
```
## Task
Generate a SQL query to answer the following question:
`Tell me the total number of grid for laps of 52`

### 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 total number of grid for laps of 52`:
```sql
                SELECT COUNT("grid") FROM "race" WHERE "laps"=52;
```
## Task
Generate a SQL query to answer the following question:
`What's the record for january 10?`

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

CREATE TABLE "january" (
  "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's the record for january 10?`:
```sql
                SELECT "record" FROM "january" WHERE "date"='january 10';
```
## Task
Generate a SQL query to answer the following question:
`What's the score on january 5 with a hasek decision?`

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

CREATE TABLE "january" (
  "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's the score on january 5 with a hasek decision?`:
```sql
                SELECT "score" FROM "january" WHERE "decision"='hasek' AND "date"='january 5';
```
## Task
Generate a SQL query to answer the following question:
`What Club team has an average of 8, plays kaj linna, and has an overall larger than 131?`

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

CREATE TABLE "1995_draft_picks" (
  "round" real,
  "overall" real,
  "player" text,
  "nationality" text,
  "club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Club team has an average of 8, plays kaj linna, and has an overall larger than 131?`:
```sql
                SELECT "club_team" FROM "1995_draft_picks" WHERE "overall">131 AND "round"=8 AND "player"='kaj linna';
```
## Task
Generate a SQL query to answer the following question:
`What round does Bryan Berard do?`

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

CREATE TABLE "1995_draft_picks" (
  "round" real,
  "overall" real,
  "player" text,
  "nationality" text,
  "club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What round does Bryan Berard do?`:
```sql
                SELECT "round" FROM "1995_draft_picks" WHERE "player"='bryan berard';
```
## Task
Generate a SQL query to answer the following question:
`Tell me the average gross tonnage for april 1919 entered service`

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

CREATE TABLE "ships_of_the_great_eastern_railway" (
  "ship_s_name" text,
  "entered_service" text,
  "ended_service" text,
  "gross_tonnage" real,
  "type_of_vessel" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the average gross tonnage for april 1919 entered service`:
```sql
                SELECT AVG("gross_tonnage") FROM "ships_of_the_great_eastern_railway" WHERE "entered_service"='april 1919';
```
## Task
Generate a SQL query to answer the following question:
`I want the total number of gross tonnage when entered service was 1903`

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

CREATE TABLE "ships_of_the_great_eastern_railway" (
  "ship_s_name" text,
  "entered_service" text,
  "ended_service" text,
  "gross_tonnage" real,
  "type_of_vessel" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the total number of gross tonnage when entered service was 1903`:
```sql
                SELECT COUNT("gross_tonnage") FROM "ships_of_the_great_eastern_railway" WHERE "entered_service"='1903';
```
## Task
Generate a SQL query to answer the following question:
`what is the rank when the player is henry shefflin and the matches is higher than 4?`

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

CREATE TABLE "season" (
  "rank" real,
  "player" text,
  "county" text,
  "tally" text,
  "total" real,
  "matches" real,
  "average" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the rank when the player is henry shefflin and the matches is higher than 4?`:
```sql
                SELECT SUM("rank") FROM "season" WHERE "player"='henry shefflin' AND "matches">4;
```
## Task
Generate a SQL query to answer the following question:
`what is the rank when the total is 39 in the county of dublin and the matches is less than 4?`

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

CREATE TABLE "season" (
  "rank" real,
  "player" text,
  "county" text,
  "tally" text,
  "total" real,
  "matches" real,
  "average" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the rank when the total is 39 in the county of dublin and the matches is less than 4?`:
```sql
                SELECT AVG("rank") FROM "season" WHERE "total"=39 AND "county"='dublin' AND "matches"<4;
```
## Task
Generate a SQL query to answer the following question:
`Who was the opponent on November 12, 1972?`

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

CREATE TABLE "schedule" (
  "week" real,
  "date" text,
  "opponent" text,
  "result" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent on November 12, 1972?`:
```sql
                SELECT "opponent" FROM "schedule" WHERE "date"='november 12, 1972';
```
## Task
Generate a SQL query to answer the following question:
`Who built the train in 1966 with over 40 produced?`

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

CREATE TABLE "emd" (
  "prr_class" text,
  "builder_s_model" text,
  "build_date" text,
  "total_produced" real,
  "wheel_arrangement" text,
  "service" text,
  "power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who built the train in 1966 with over 40 produced?`:
```sql
                SELECT "builder_s_model" FROM "emd" WHERE "total_produced">40 AND "build_date"='1966';
```
## Task
Generate a SQL query to answer the following question:
`What is the PRR class of the freight train built in 1967 with a b-b wheel arrangement?`

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

CREATE TABLE "emd" (
  "prr_class" text,
  "builder_s_model" text,
  "build_date" text,
  "total_produced" real,
  "wheel_arrangement" text,
  "service" text,
  "power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the PRR class of the freight train built in 1967 with a b-b wheel arrangement?`:
```sql
                SELECT "prr_class" FROM "emd" WHERE "wheel_arrangement"='b-b' AND "service"='freight' AND "build_date"='1967';
```
## Task
Generate a SQL query to answer the following question:
`What PRR class has a Wheel arrangement of a1a-a1a?`

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

CREATE TABLE "emd" (
  "prr_class" text,
  "builder_s_model" text,
  "build_date" text,
  "total_produced" real,
  "wheel_arrangement" text,
  "service" text,
  "power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `What PRR class has a Wheel arrangement of a1a-a1a?`:
```sql
                SELECT "prr_class" FROM "emd" WHERE "wheel_arrangement"='a1a-a1a';
```
## Task
Generate a SQL query to answer the following question:
`Which Zone is the lowest when Managed By Southern and has Platforms under 2?`

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

CREATE TABLE "c" (
  "stations" text,
  "place" text,
  "managed_by" text,
  "platforms" real,
  "zone" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Zone is the lowest when Managed By Southern and has Platforms under 2?`:
```sql
                SELECT MIN("zone") FROM "c" WHERE "managed_by"='southern' AND "platforms"<2;
```
## Task
Generate a SQL query to answer the following question:
`What would be the highest Platforms for the Centrale Tram Stop Stations?`

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

CREATE TABLE "c" (
  "stations" text,
  "place" text,
  "managed_by" text,
  "platforms" real,
  "zone" real
);
### SQL
Given the database schema, here is the SQL query that answers `What would be the highest Platforms for the Centrale Tram Stop Stations?`:
```sql
                SELECT MAX("platforms") FROM "c" WHERE "stations"='centrale tram stop';
```
## Task
Generate a SQL query to answer the following question:
`How many grids had more than 61 laps?`

### 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 grids had more than 61 laps?`:
```sql
                SELECT SUM("grid") FROM "classification" WHERE "laps">61;
```
## Task
Generate a SQL query to answer the following question:
`When parnell dickinson was the player and the rounds were under 7, what's the highest pick?`

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

CREATE TABLE "nfl_draft" (
  "pick" real,
  "round" real,
  "player" text,
  "position" text,
  "school" text
);
### SQL
Given the database schema, here is the SQL query that answers `When parnell dickinson was the player and the rounds were under 7, what's the highest pick?`:
```sql
                SELECT MAX("pick") FROM "nfl_draft" WHERE "player"='parnell dickinson' AND "round"<7;
```
## Task
Generate a SQL query to answer the following question:
`When the school picking is utah state for the position of linebacker, what's the sum of those rounds?`

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

CREATE TABLE "nfl_draft" (
  "pick" real,
  "round" real,
  "player" text,
  "position" text,
  "school" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the school picking is utah state for the position of linebacker, what's the sum of those rounds?`:
```sql
                SELECT SUM("round") FROM "nfl_draft" WHERE "position"='linebacker' AND "school"='utah state';
```
## Task
Generate a SQL query to answer the following question:
`what is the laps when the grid is less than 2?`

### 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 laps when the grid is less than 2?`:
```sql
                SELECT "laps" FROM "classification" WHERE "grid"<2;
```
## Task
Generate a SQL query to answer the following question:
`who is the constructor when the grid is more than 23 and the driver is piercarlo ghinzani?`

### 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 is the constructor when the grid is more than 23 and the driver is piercarlo ghinzani?`:
```sql
                SELECT "constructor" FROM "classification" WHERE "grid">23 AND "driver"='piercarlo ghinzani';
```