cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`what is the most recent year for a ligier gitanes blondes`

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

CREATE TABLE "complete_formula_one_results" (
  "year" real,
  "entrant" text,
  "chassis" text,
  "engine" text,
  "pts" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the most recent year for a ligier gitanes blondes`:
```sql
                SELECT MAX("year") FROM "complete_formula_one_results" WHERE "entrant"='ligier gitanes blondes';
```
## Task
Generate a SQL query to answer the following question:
`What is the total number of averages with an interview of 8.75 when the evening gown number was bigger than 8.75?`

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

CREATE TABLE "preliminary_competition" (
  "state" text,
  "swimsuit" real,
  "evening_gown" real,
  "interview" real,
  "average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of averages with an interview of 8.75 when the evening gown number was bigger than 8.75?`:
```sql
                SELECT SUM("average") FROM "preliminary_competition" WHERE "interview"=8.75 AND "evening_gown">8.75;
```
## Task
Generate a SQL query to answer the following question:
`What is the total number of interviews where the evening gown number is less than 8.82, the state is Kentucky, and the average is more than 8.85?`

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

CREATE TABLE "preliminary_competition" (
  "state" text,
  "swimsuit" real,
  "evening_gown" real,
  "interview" real,
  "average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of interviews where the evening gown number is less than 8.82, the state is Kentucky, and the average is more than 8.85?`:
```sql
                SELECT SUM("interview") FROM "preliminary_competition" WHERE "evening_gown"<8.82 AND "state"='kentucky' AND "average">8.85;
```
## Task
Generate a SQL query to answer the following question:
`How many averages had a swimsuit number of 8.42 and an evening gown number that was less than 8.71?`

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

CREATE TABLE "preliminary_competition" (
  "state" text,
  "swimsuit" real,
  "evening_gown" real,
  "interview" real,
  "average" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many averages had a swimsuit number of 8.42 and an evening gown number that was less than 8.71?`:
```sql
                SELECT SUM("average") FROM "preliminary_competition" WHERE "swimsuit"=8.42 AND "evening_gown"<8.71;
```
## Task
Generate a SQL query to answer the following question:
`Which state had an average of less than 8.67, a swimsuit score of 8.27, an evening gown score of 8.78, and an interview number of 8.52?`

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

CREATE TABLE "preliminary_competition" (
  "state" text,
  "swimsuit" real,
  "evening_gown" real,
  "interview" real,
  "average" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which state had an average of less than 8.67, a swimsuit score of 8.27, an evening gown score of 8.78, and an interview number of 8.52?`:
```sql
                SELECT "state" FROM "preliminary_competition" WHERE "average"<8.67 AND "swimsuit"=8.27 AND "evening_gown"=8.78 AND "interview"=8.52;
```
## Task
Generate a SQL query to answer the following question:
`What is the record when the visitor was Nashville?`

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

CREATE TABLE "february" (
  "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 is the record when the visitor was Nashville?`:
```sql
                SELECT "record" FROM "february" WHERE "visitor"='nashville';
```
## Task
Generate a SQL query to answer the following question:
`What was the score when there were more than 14,381 in attendance and Phoenix was the visitor and Chicago was home?`

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

CREATE TABLE "february" (
  "date" text,
  "visitor" text,
  "score" text,
  "home" text,
  "decision" text,
  "attendance" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score when there were more than 14,381 in attendance and Phoenix was the visitor and Chicago was home?`:
```sql
                SELECT "score" FROM "february" WHERE "attendance">'14,381' AND "visitor"='phoenix' AND "home"='chicago';
```
## Task
Generate a SQL query to answer the following question:
`When was a competition held at Pietermaritzburg?`

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

CREATE TABLE "best_bowling" (
  "bowling_figures_wickets_runs_overs" text,
  "bowler" text,
  "versus" text,
  "venue" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was a competition held at Pietermaritzburg?`:
```sql
                SELECT "date" FROM "best_bowling" WHERE "venue"='pietermaritzburg';
```
## Task
Generate a SQL query to answer the following question:
`What were the bowling figures for the competition at Pietermaritzburg?`

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

CREATE TABLE "best_bowling" (
  "bowling_figures_wickets_runs_overs" text,
  "bowler" text,
  "versus" text,
  "venue" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the bowling figures for the competition at Pietermaritzburg?`:
```sql
                SELECT "bowling_figures_wickets_runs_overs" FROM "best_bowling" WHERE "venue"='pietermaritzburg';
```
## Task
Generate a SQL query to answer the following question:
`Who was the opponent during the competition in which the bowling figures were 5-33 (10)?`

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

CREATE TABLE "best_bowling" (
  "bowling_figures_wickets_runs_overs" text,
  "bowler" text,
  "versus" text,
  "venue" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent during the competition in which the bowling figures were 5-33 (10)?`:
```sql
                SELECT "versus" FROM "best_bowling" WHERE "bowling_figures_wickets_runs_overs"='5-33 (10)';
```
## Task
Generate a SQL query to answer the following question:
`What were GD Mcgrath's bowling figures?`

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

CREATE TABLE "best_bowling" (
  "bowling_figures_wickets_runs_overs" text,
  "bowler" text,
  "versus" text,
  "venue" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were GD Mcgrath's bowling figures?`:
```sql
                SELECT "bowling_figures_wickets_runs_overs" FROM "best_bowling" WHERE "bowler"='gd mcgrath';
```
## Task
Generate a SQL query to answer the following question:
`During the competition at Port Elizabeth, where the opponent was Australia, what were the bowling figures?`

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

CREATE TABLE "best_bowling" (
  "bowling_figures_wickets_runs_overs" text,
  "bowler" text,
  "versus" text,
  "venue" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `During the competition at Port Elizabeth, where the opponent was Australia, what were the bowling figures?`:
```sql
                SELECT "bowling_figures_wickets_runs_overs" FROM "best_bowling" WHERE "venue"='port elizabeth' AND "versus"='australia';
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest amount of floors after rank 1 in the Trillium (residential) building?`

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

CREATE TABLE "buildings_completed_as_of_february_2011" (
  "rank" real,
  "building" text,
  "height" text,
  "floors" real,
  "completed" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest amount of floors after rank 1 in the Trillium (residential) building?`:
```sql
                SELECT MIN("floors") FROM "buildings_completed_as_of_february_2011" WHERE "rank">1 AND "building"='the trillium (residential)';
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest amount of floors in the building completed before 1970 ranked more than 14?`

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

CREATE TABLE "buildings_completed_as_of_february_2011" (
  "rank" real,
  "building" text,
  "height" text,
  "floors" real,
  "completed" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest amount of floors in the building completed before 1970 ranked more than 14?`:
```sql
                SELECT MIN("floors") FROM "buildings_completed_as_of_february_2011" WHERE "completed"<1970 AND "rank">14;
```
## Task
Generate a SQL query to answer the following question:
`What is the largest amount of floors in the 70m (233ft) Tupper building (educational)?`

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

CREATE TABLE "buildings_completed_as_of_february_2011" (
  "rank" real,
  "building" text,
  "height" text,
  "floors" real,
  "completed" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest amount of floors in the 70m (233ft) Tupper building (educational)?`:
```sql
                SELECT MAX("floors") FROM "buildings_completed_as_of_february_2011" WHERE "height"='70m (233ft)' AND "building"='tupper building (educational)';
```
## Task
Generate a SQL query to answer the following question:
`Which manufacturer has 23 laps and a time of +45.195?`

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

CREATE TABLE "moto_gp_classification" (
  "rider" text,
  "manufacturer" text,
  "laps" real,
  "time_retired" text,
  "grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which manufacturer has 23 laps and a time of +45.195?`:
```sql
                SELECT "manufacturer" FROM "moto_gp_classification" WHERE "laps"=23 AND "time_retired"='+45.195';
```
## Task
Generate a SQL query to answer the following question:
`What is the sum of Sylvain Guintoli's laps?`

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

CREATE TABLE "moto_gp_classification" (
  "rider" text,
  "manufacturer" text,
  "laps" real,
  "time_retired" text,
  "grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Sylvain Guintoli's laps?`:
```sql
                SELECT SUM("laps") FROM "moto_gp_classification" WHERE "rider"='sylvain guintoli';
```
## Task
Generate a SQL query to answer the following question:
`How many runs were scored when the strike rate was 101.42?`

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

CREATE TABLE "highest_individual_scores" (
  "runs" text,
  "balls" text,
  "batsman" text,
  "versus" text,
  "venue" text,
  "date" text,
  "strike_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many runs were scored when the strike rate was 101.42?`:
```sql
                SELECT "runs" FROM "highest_individual_scores" WHERE "strike_rate"='101.42';
```
## Task
Generate a SQL query to answer the following question:
`What was the amount of grain in 2001?`

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

CREATE TABLE "port_statistics" (
  "product" text,
  "2004" text,
  "2003" text,
  "2002" text,
  "2001" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the amount of grain in 2001?`:
```sql
                SELECT "2001" FROM "port_statistics" WHERE "product"='grain';
```
## Task
Generate a SQL query to answer the following question:
`What is the amount of oil terminal in 2004?`

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

CREATE TABLE "port_statistics" (
  "product" text,
  "2004" text,
  "2003" text,
  "2002" text,
  "2001" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the amount of oil terminal in 2004?`:
```sql
                SELECT "2004" FROM "port_statistics" WHERE "product"='oil terminal';
```
## Task
Generate a SQL query to answer the following question:
`What is the 2003 statistic for the product that had 514,000 tonnes in 2001?`

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

CREATE TABLE "port_statistics" (
  "product" text,
  "2004" text,
  "2003" text,
  "2002" text,
  "2001" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 2003 statistic for the product that had 514,000 tonnes in 2001?`:
```sql
                SELECT "2003" FROM "port_statistics" WHERE "2001"='514,000 tonnes';
```
## Task
Generate a SQL query to answer the following question:
`What is the 2002 statistic for the product that had 452,000 tonnes in 2001?`

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

CREATE TABLE "port_statistics" (
  "product" text,
  "2004" text,
  "2003" text,
  "2002" text,
  "2001" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 2002 statistic for the product that had 452,000 tonnes in 2001?`:
```sql
                SELECT "2002" FROM "port_statistics" WHERE "2001"='452,000 tonnes';
```
## Task
Generate a SQL query to answer the following question:
`What is the 2001 statistic for the product that had 2,360,000 tonnes in 2002?`

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

CREATE TABLE "port_statistics" (
  "product" text,
  "2004" text,
  "2003" text,
  "2002" text,
  "2001" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 2001 statistic for the product that had 2,360,000 tonnes in 2002?`:
```sql
                SELECT "2001" FROM "port_statistics" WHERE "2002"='2,360,000 tonnes';
```
## Task
Generate a SQL query to answer the following question:
`What is the 2003 statistic for general cargo?`

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

CREATE TABLE "port_statistics" (
  "product" text,
  "2004" text,
  "2003" text,
  "2002" text,
  "2001" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 2003 statistic for general cargo?`:
```sql
                SELECT "2003" FROM "port_statistics" WHERE "product"='general cargo';
```
## Task
Generate a SQL query to answer the following question:
`What did the home team score at MCG?`

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

CREATE TABLE "round_1" (
  "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 at MCG?`:
```sql
                SELECT "home_team_score" FROM "round_1" WHERE "venue"='mcg';
```
## Task
Generate a SQL query to answer the following question:
`What did the away team score when playing South Melbourne?`

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

CREATE TABLE "round_1" (
  "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 when playing South Melbourne?`:
```sql
                SELECT "away_team_score" FROM "round_1" WHERE "home_team"='south melbourne';
```
## Task
Generate a SQL query to answer the following question:
`When did the game with North Melbourne as the away team take place?`

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

CREATE TABLE "round_1" (
  "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 did the game with North Melbourne as the away team take place?`:
```sql
                SELECT "date" FROM "round_1" WHERE "away_team"='north melbourne';
```
## Task
Generate a SQL query to answer the following question:
`If the Away team was south melbourne what Date did they play?`

### 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 `If the Away team was south melbourne what Date did they play?`:
```sql
                SELECT "date" FROM "round_6" WHERE "away_team"='south melbourne';
```
## Task
Generate a SQL query to answer the following question:
`When the venue was kardinia park and the Crowd was larger than 16,437, what was the Away team score?`

### 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 `When the venue was kardinia park and the Crowd was larger than 16,437, what was the Away team score?`:
```sql
                SELECT "away_team_score" FROM "round_6" WHERE "crowd">'16,437' AND "venue"='kardinia park';
```
## Task
Generate a SQL query to answer the following question:
`When the Away team scored 6.13 (49), what was the Home teams score?`

### 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 `When the Away team scored 6.13 (49), what was the Home teams score?`:
```sql
                SELECT "home_team_score" FROM "round_6" WHERE "away_team_score"='6.13 (49)';
```
## Task
Generate a SQL query to answer the following question:
`When the Home team of essendon is playing what is the Away team score?`

### 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 `When the Home team of essendon is playing what is the Away team score?`:
```sql
                SELECT "away_team_score" FROM "round_6" WHERE "home_team"='essendon';
```
## Task
Generate a SQL query to answer the following question:
`I wan the date of vacancy for departure of resigned and outgoing manager of gordon wylde`

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

CREATE TABLE "managerial_changes" (
  "team" text,
  "outgoing_manager" text,
  "manner_of_departure" text,
  "date_of_vacancy" text,
  "replaced_by" text,
  "date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `I wan the date of vacancy for departure of resigned and outgoing manager of gordon wylde`:
```sql
                SELECT "date_of_vacancy" FROM "managerial_changes" WHERE "manner_of_departure"='resigned' AND "outgoing_manager"='gordon wylde';
```
## Task
Generate a SQL query to answer the following question:
`I want the replaced for date of appointment being 12 october 2007`

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

CREATE TABLE "managerial_changes" (
  "team" text,
  "outgoing_manager" text,
  "manner_of_departure" text,
  "date_of_vacancy" text,
  "replaced_by" text,
  "date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the replaced for date of appointment being 12 october 2007`:
```sql
                SELECT "replaced_by" FROM "managerial_changes" WHERE "date_of_appointment"='12 october 2007';
```
## Task
Generate a SQL query to answer the following question:
`I want the team for date of vacancy being 28 february`

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

CREATE TABLE "managerial_changes" (
  "team" text,
  "outgoing_manager" text,
  "manner_of_departure" text,
  "date_of_vacancy" text,
  "replaced_by" text,
  "date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the team for date of vacancy being 28 february`:
```sql
                SELECT "team" FROM "managerial_changes" WHERE "date_of_vacancy"='28 february';
```
## Task
Generate a SQL query to answer the following question:
`I want the manner of departure for date of appointment being 12 october 2007`

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

CREATE TABLE "managerial_changes" (
  "team" text,
  "outgoing_manager" text,
  "manner_of_departure" text,
  "date_of_vacancy" text,
  "replaced_by" text,
  "date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the manner of departure for date of appointment being 12 october 2007`:
```sql
                SELECT "manner_of_departure" FROM "managerial_changes" WHERE "date_of_appointment"='12 october 2007';
```
## Task
Generate a SQL query to answer the following question:
`Which date was the syracuse circuit?`

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

CREATE TABLE "non_championship_race_results" (
  "race_name" text,
  "circuit" text,
  "date" text,
  "winning_driver" text,
  "constructor" text,
  "report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which date was the syracuse circuit?`:
```sql
                SELECT "date" FROM "non_championship_race_results" WHERE "circuit"='syracuse';
```
## Task
Generate a SQL query to answer the following question:
`Which date was the x gran premio di napoli?`

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

CREATE TABLE "non_championship_race_results" (
  "race_name" text,
  "circuit" text,
  "date" text,
  "winning_driver" text,
  "constructor" text,
  "report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which date was the x gran premio di napoli?`:
```sql
                SELECT "date" FROM "non_championship_race_results" WHERE "race_name"='x gran premio di napoli';
```
## Task
Generate a SQL query to answer the following question:
`What report happened on 22 september?`

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

CREATE TABLE "non_championship_race_results" (
  "race_name" text,
  "circuit" text,
  "date" text,
  "winning_driver" text,
  "constructor" text,
  "report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What report happened on 22 september?`:
```sql
                SELECT "report" FROM "non_championship_race_results" WHERE "date"='22 september';
```
## Task
Generate a SQL query to answer the following question:
`Which report has a Winning driver of peter collins, and a Circuit of syracuse?`

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

CREATE TABLE "non_championship_race_results" (
  "race_name" text,
  "circuit" text,
  "date" text,
  "winning_driver" text,
  "constructor" text,
  "report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which report has a Winning driver of peter collins, and a Circuit of syracuse?`:
```sql
                SELECT "report" FROM "non_championship_race_results" WHERE "winning_driver"='peter collins' AND "circuit"='syracuse';
```
## Task
Generate a SQL query to answer the following question:
`Who appointed Judge Edward E. Cushman?`

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

CREATE TABLE "former_judges" (
  "judge" text,
  "state" text,
  "born_died" text,
  "active_service" text,
  "chief_judge" text,
  "senior_status" text,
  "appointed_by" text,
  "reason_for_termination" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who appointed Judge Edward E. Cushman?`:
```sql
                SELECT "appointed_by" FROM "former_judges" WHERE "judge"='edward e. cushman';
```
## Task
Generate a SQL query to answer the following question:
`Who was Judge Jack Edward Tanner's chief judge?`

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

CREATE TABLE "former_judges" (
  "judge" text,
  "state" text,
  "born_died" text,
  "active_service" text,
  "chief_judge" text,
  "senior_status" text,
  "appointed_by" text,
  "reason_for_termination" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was Judge Jack Edward Tanner's chief judge?`:
```sql
                SELECT "chief_judge" FROM "former_judges" WHERE "judge"='jack edward tanner';
```
## Task
Generate a SQL query to answer the following question:
`What is the date of birth of the player that has 11 caps and plays the prop position?`

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

CREATE TABLE "2007_rugby_world_cup_squads" (
  "player" text,
  "position" text,
  "date_of_birth_age" text,
  "caps" real,
  "club_province" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of birth of the player that has 11 caps and plays the prop position?`:
```sql
                SELECT "date_of_birth_age" FROM "2007_rugby_world_cup_squads" WHERE "caps"=11 AND "position"='prop';
```
## Task
Generate a SQL query to answer the following question:
`What club or province is the player with 12 caps from?`

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

CREATE TABLE "2007_rugby_world_cup_squads" (
  "player" text,
  "position" text,
  "date_of_birth_age" text,
  "caps" real,
  "club_province" text
);
### SQL
Given the database schema, here is the SQL query that answers `What club or province is the player with 12 caps from?`:
```sql
                SELECT "club_province" FROM "2007_rugby_world_cup_squads" WHERE "caps"=12;
```
## Task
Generate a SQL query to answer the following question:
`What position does Toby Flood, who is from Newcastle and has fewer than 24 caps, play?`

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

CREATE TABLE "2007_rugby_world_cup_squads" (
  "player" text,
  "position" text,
  "date_of_birth_age" text,
  "caps" real,
  "club_province" text
);
### SQL
Given the database schema, here is the SQL query that answers `What position does Toby Flood, who is from Newcastle and has fewer than 24 caps, play?`:
```sql
                SELECT "position" FROM "2007_rugby_world_cup_squads" WHERE "club_province"='newcastle' AND "caps"<24 AND "player"='toby flood';
```
## Task
Generate a SQL query to answer the following question:
`Which team beat the Newcastle Breakers?`

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

CREATE TABLE "nsl_cup_winners" (
  "season" text,
  "cup_final_date" text,
  "winning_team" text,
  "score" text,
  "losing_team" text,
  "cup_final_attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team beat the Newcastle Breakers?`:
```sql
                SELECT "winning_team" FROM "nsl_cup_winners" WHERE "losing_team"='newcastle breakers';
```
## Task
Generate a SQL query to answer the following question:
`What team lost on 20 August 1989?`

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

CREATE TABLE "nsl_cup_winners" (
  "season" text,
  "cup_final_date" text,
  "winning_team" text,
  "score" text,
  "losing_team" text,
  "cup_final_attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team lost on 20 August 1989?`:
```sql
                SELECT "losing_team" FROM "nsl_cup_winners" WHERE "cup_final_date"='20 august 1989';
```
## Task
Generate a SQL query to answer the following question:
`On what date did the Brisbane Lions (1) win?`

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

CREATE TABLE "nsl_cup_winners" (
  "season" text,
  "cup_final_date" text,
  "winning_team" text,
  "score" text,
  "losing_team" text,
  "cup_final_attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date did the Brisbane Lions (1) win?`:
```sql
                SELECT "cup_final_date" FROM "nsl_cup_winners" WHERE "winning_team"='brisbane lions (1)';
```
## Task
Generate a SQL query to answer the following question:
`What was the winning team with the 8,132 final attendance?`

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

CREATE TABLE "nsl_cup_winners" (
  "season" text,
  "cup_final_date" text,
  "winning_team" text,
  "score" text,
  "losing_team" text,
  "cup_final_attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the winning team with the 8,132 final attendance?`:
```sql
                SELECT "winning_team" FROM "nsl_cup_winners" WHERE "cup_final_attendance"='8,132';
```
## Task
Generate a SQL query to answer the following question:
`What was the attendance on August 2?`

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

CREATE TABLE "game_log" (
  "date" text,
  "opponent" text,
  "score" text,
  "loss" text,
  "attendance" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance on August 2?`:
```sql
                SELECT "attendance" FROM "game_log" WHERE "date"='august 2';
```
## Task
Generate a SQL query to answer the following question:
`What is the date where the attendance was 31,220?`

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

CREATE TABLE "game_log" (
  "date" text,
  "opponent" text,
  "score" text,
  "loss" text,
  "attendance" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date where the attendance was 31,220?`:
```sql
                SELECT "date" FROM "game_log" WHERE "attendance"='31,220';
```
## Task
Generate a SQL query to answer the following question:
`What was the team's record on August 4?`

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

CREATE TABLE "game_log" (
  "date" text,
  "opponent" text,
  "score" text,
  "loss" text,
  "attendance" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the team's record on August 4?`:
```sql
                SELECT "record" FROM "game_log" WHERE "date"='august 4';
```
## Task
Generate a SQL query to answer the following question:
`What was the date when the attendance was 48,041?`

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

CREATE TABLE "game_log" (
  "date" text,
  "opponent" text,
  "score" text,
  "loss" text,
  "attendance" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date when the attendance was 48,041?`:
```sql
                SELECT "date" FROM "game_log" WHERE "attendance"='48,041';
```
## Task
Generate a SQL query to answer the following question:
`Who are the finals opponents for the match with partner Ricardo Hocevar?`

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

CREATE TABLE "doubles_12" (
  "date" text,
  "tournament" text,
  "surface" text,
  "partnering" text,
  "opponents_in_the_final" text,
  "score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the finals opponents for the match with partner Ricardo Hocevar?`:
```sql
                SELECT "opponents_in_the_final" FROM "doubles_12" WHERE "partnering"='ricardo hocevar';
```
## Task
Generate a SQL query to answer the following question:
`Who were the opponents of the final on June 23, 2003?`

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

CREATE TABLE "doubles_12" (
  "date" text,
  "tournament" text,
  "surface" text,
  "partnering" text,
  "opponents_in_the_final" text,
  "score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the opponents of the final on June 23, 2003?`:
```sql
                SELECT "opponents_in_the_final" FROM "doubles_12" WHERE "date"='june 23, 2003';
```
## Task
Generate a SQL query to answer the following question:
`Who was the home side at glenferrie oval?`

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

CREATE TABLE "round_21" (
  "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 side at glenferrie oval?`:
```sql
                SELECT "home_team" FROM "round_21" WHERE "venue"='glenferrie oval';
```
## Task
Generate a SQL query to answer the following question:
`How many people attended the game with the home side scoring 18.14 (122)?`

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

CREATE TABLE "round_21" (
  "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 with the home side scoring 18.14 (122)?`:
```sql
                SELECT SUM("crowd") FROM "round_21" WHERE "home_team_score"='18.14 (122)';
```
## Task
Generate a SQL query to answer the following question:
`Who is the author of Episode 38 (16)?`

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

CREATE TABLE "season_2_1998" (
  "episode_num" text,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the author of Episode 38 (16)?`:
```sql
                SELECT "written_by" FROM "season_2_1998" WHERE "episode_num"='38 (16)';
```
## Task
Generate a SQL query to answer the following question:
`When did Episode 29 (7) originally air?`

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

CREATE TABLE "season_2_1998" (
  "episode_num" text,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did Episode 29 (7) originally air?`:
```sql
                SELECT "original_airdate" FROM "season_2_1998" WHERE "episode_num"='29 (7)';
```
## Task
Generate a SQL query to answer the following question:
`Who directed the episode "Approaching Zero"?`

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

CREATE TABLE "season_2_1998" (
  "episode_num" text,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed the episode "Approaching Zero"?`:
```sql
                SELECT "directed_by" FROM "season_2_1998" WHERE "title"='\"approaching zero\"';
```
## Task
Generate a SQL query to answer the following question:
`What is the episode # of the episode that aired on April 5, 1998?`

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

CREATE TABLE "season_2_1998" (
  "episode_num" text,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the episode # of the episode that aired on April 5, 1998?`:
```sql
                SELECT "episode_num" FROM "season_2_1998" WHERE "original_airdate"='april 5, 1998';
```
## Task
Generate a SQL query to answer the following question:
`Who wrote the episode that originally aired on March 1, 1998?`

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

CREATE TABLE "season_2_1998" (
  "episode_num" text,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who wrote the episode that originally aired on March 1, 1998?`:
```sql
                SELECT "written_by" FROM "season_2_1998" WHERE "original_airdate"='march 1, 1998';
```
## Task
Generate a SQL query to answer the following question:
`what tournament has 2000 of 3r?`

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

CREATE TABLE "grand_slam_singles_performance_timeline" (
  "tournament" text,
  "1989" text,
  "1990" text,
  "1991" text,
  "1992" text,
  "1993" text,
  "1994" text,
  "1995" text,
  "1996" text,
  "1997" text,
  "1998" text,
  "1999" text,
  "2000" text,
  "2001" text,
  "2002" text,
  "2003" text,
  "2004" text,
  "2005" text
);
### SQL
Given the database schema, here is the SQL query that answers `what tournament has 2000 of 3r?`:
```sql
                SELECT "tournament" FROM "grand_slam_singles_performance_timeline" WHERE "2000"='3r';
```
## Task
Generate a SQL query to answer the following question:
`what 2001 has 1991 of 4r?`

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

CREATE TABLE "grand_slam_singles_performance_timeline" (
  "tournament" text,
  "1989" text,
  "1990" text,
  "1991" text,
  "1992" text,
  "1993" text,
  "1994" text,
  "1995" text,
  "1996" text,
  "1997" text,
  "1998" text,
  "1999" text,
  "2000" text,
  "2001" text,
  "2002" text,
  "2003" text,
  "2004" text,
  "2005" text
);
### SQL
Given the database schema, here is the SQL query that answers `what 2001 has 1991 of 4r?`:
```sql
                SELECT "2001" FROM "grand_slam_singles_performance_timeline" WHERE "1991"='4r';
```
## Task
Generate a SQL query to answer the following question:
`what 1989 has 2002 of 4r and 2005 of 4r?`

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

CREATE TABLE "grand_slam_singles_performance_timeline" (
  "tournament" text,
  "1989" text,
  "1990" text,
  "1991" text,
  "1992" text,
  "1993" text,
  "1994" text,
  "1995" text,
  "1996" text,
  "1997" text,
  "1998" text,
  "1999" text,
  "2000" text,
  "2001" text,
  "2002" text,
  "2003" text,
  "2004" text,
  "2005" text
);
### SQL
Given the database schema, here is the SQL query that answers `what 1989 has 2002 of 4r and 2005 of 4r?`:
```sql
                SELECT "1989" FROM "grand_slam_singles_performance_timeline" WHERE "2002"='4r' AND "2005"='4r';
```
## Task
Generate a SQL query to answer the following question:
`What team played in front of 28,536 at an away stadium?`

### 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 team played in front of 28,536 at an away stadium?`:
```sql
                SELECT "away_team_score" FROM "round_4" WHERE "crowd">'28,536';
```
## Task
Generate a SQL query to answer the following question:
`What was Fitzroy score at their home stadium?`

### 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 Fitzroy score at their home stadium?`:
```sql
                SELECT "home_team_score" FROM "round_4" WHERE "home_team"='fitzroy';
```
## Task
Generate a SQL query to answer the following question:
`When did an away team score 12.14 (86) against a home team with 15.10 (100)?`

### 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 `When did an away team score 12.14 (86) against a home team with 15.10 (100)?`:
```sql
                SELECT "date" FROM "round_4" WHERE "away_team_score"='12.14 (86)' AND "home_team_score"='15.10 (100)';
```
## Task
Generate a SQL query to answer the following question:
`Who faced off against St Kilda at their home?`

### 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 `Who faced off against St Kilda at their home?`:
```sql
                SELECT "away_team_score" FROM "round_4" WHERE "home_team"='st kilda';
```
## Task
Generate a SQL query to answer the following question:
`Where did a home team score 15.14 (104)?`

### 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 `Where did a home team score 15.14 (104)?`:
```sql
                SELECT "venue" FROM "round_4" WHERE "home_team_score"='15.14 (104)';
```
## Task
Generate a SQL query to answer the following question:
`When did an away team score 12.14 (86) at Windy Hill?`

### 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 `When did an away team score 12.14 (86) at Windy Hill?`:
```sql
                SELECT "date" FROM "round_4" WHERE "away_team_score"='12.14 (86)' AND "venue"='windy hill';
```
## Task
Generate a SQL query to answer the following question:
`What is the low number of top 25s in an event with over 15 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_5" real,
  "top_10" real,
  "top_25" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the low number of top 25s in an event with over 15 appearances?`:
```sql
                SELECT MIN("top_25") FROM "summary" WHERE "events">15;
```
## Task
Generate a SQL query to answer the following question:
`What is the average rank of the Reliance Entertainment movie with an opening day on Wednesday before 2012?`

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

CREATE TABLE "biggest_opening_day_gross" (
  "rank" real,
  "movie" text,
  "year" real,
  "studio_s" text,
  "opening_day_net_gross" real,
  "day_of_week" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average rank of the Reliance Entertainment movie with an opening day on Wednesday before 2012?`:
```sql
                SELECT AVG("rank") FROM "biggest_opening_day_gross" WHERE "day_of_week"='wednesday' AND "year"<2012 AND "studio_s"='reliance entertainment';
```
## Task
Generate a SQL query to answer the following question:
`What is the opening day of the week of Chennai Express, which had an opening day net gross larger than 14,76,00,000 in 2013?`

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

CREATE TABLE "biggest_opening_day_gross" (
  "rank" real,
  "movie" text,
  "year" real,
  "studio_s" text,
  "opening_day_net_gross" real,
  "day_of_week" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the opening day of the week of Chennai Express, which had an opening day net gross larger than 14,76,00,000 in 2013?`:
```sql
                SELECT "day_of_week" FROM "biggest_opening_day_gross" WHERE "opening_day_net_gross">'14,76,00,000' AND "year"=2013 AND "movie"='chennai express';
```
## Task
Generate a SQL query to answer the following question:
`What is the opening day net gross a Reliance Entertainment movie before 2011 had?`

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

CREATE TABLE "biggest_opening_day_gross" (
  "rank" real,
  "movie" text,
  "year" real,
  "studio_s" text,
  "opening_day_net_gross" real,
  "day_of_week" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the opening day net gross a Reliance Entertainment movie before 2011 had?`:
```sql
                SELECT SUM("opening_day_net_gross") FROM "biggest_opening_day_gross" WHERE "studio_s"='reliance entertainment' AND "year"<2011;
```
## Task
Generate a SQL query to answer the following question:
`What is the studio of ra.one?`

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

CREATE TABLE "biggest_opening_day_gross" (
  "rank" real,
  "movie" text,
  "year" real,
  "studio_s" text,
  "opening_day_net_gross" real,
  "day_of_week" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the studio of ra.one?`:
```sql
                SELECT "studio_s" FROM "biggest_opening_day_gross" WHERE "movie"='ra.one';
```
## Task
Generate a SQL query to answer the following question:
`What is the year of the movie with an opening day on Friday with a rank 10?`

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

CREATE TABLE "biggest_opening_day_gross" (
  "rank" real,
  "movie" text,
  "year" real,
  "studio_s" text,
  "opening_day_net_gross" real,
  "day_of_week" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the year of the movie with an opening day on Friday with a rank 10?`:
```sql
                SELECT COUNT("year") FROM "biggest_opening_day_gross" WHERE "day_of_week"='friday' AND "rank"=10;
```