cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`How big was the crowd size, at the Junction Oval venue?`

### 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 big was the crowd size, at the Junction Oval venue?`:
```sql
                SELECT SUM("crowd") FROM "round_21" WHERE "venue"='junction oval';
```
## Task
Generate a SQL query to answer the following question:
`What is the visiting team of Melbourne's score?`

### 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 `What is the visiting team of Melbourne's score?`:
```sql
                SELECT "away_team_score" FROM "round_21" WHERE "away_team"='melbourne';
```
## Task
Generate a SQL query to answer the following question:
`What is the average crowd size of Fitzroy's home team?`

### 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 `What is the average crowd size of Fitzroy's home team?`:
```sql
                SELECT AVG("crowd") FROM "round_21" WHERE "home_team"='fitzroy';
```
## Task
Generate a SQL query to answer the following question:
`Which railway had the earliest build date and a disposal of "Scrapped 1941?"`

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

CREATE TABLE "locomotives" (
  "railway" text,
  "loco_name" text,
  "build_date" real,
  "wheels" text,
  "disposal" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which railway had the earliest build date and a disposal of "Scrapped 1941?"`:
```sql
                SELECT MIN("build_date") FROM "locomotives" WHERE "disposal"='scrapped 1941';
```
## Task
Generate a SQL query to answer the following question:
`Which railway had a loco name of Pyramus and a build date of 1911?`

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

CREATE TABLE "locomotives" (
  "railway" text,
  "loco_name" text,
  "build_date" real,
  "wheels" text,
  "disposal" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which railway had a loco name of Pyramus and a build date of 1911?`:
```sql
                SELECT "railway" FROM "locomotives" WHERE "build_date"=1911 AND "loco_name"='pyramus';
```
## Task
Generate a SQL query to answer the following question:
`What was the build date of the railway(s) with 0-6-2 t wheels?`

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

CREATE TABLE "locomotives" (
  "railway" text,
  "loco_name" text,
  "build_date" real,
  "wheels" text,
  "disposal" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the build date of the railway(s) with 0-6-2 t wheels?`:
```sql
                SELECT "build_date" FROM "locomotives" WHERE "wheels"='0-6-2 t';
```
## Task
Generate a SQL query to answer the following question:
`Which disbanded is in the ahl league?`

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

CREATE TABLE "sports" (
  "club" text,
  "league" text,
  "sport" text,
  "venue" text,
  "established" real,
  "disbanded" text,
  "championships" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which disbanded is in the ahl league?`:
```sql
                SELECT "disbanded" FROM "sports" WHERE "league"='ahl';
```
## Task
Generate a SQL query to answer the following question:
`Which championship was established after 2005?`

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

CREATE TABLE "sports" (
  "club" text,
  "league" text,
  "sport" text,
  "venue" text,
  "established" real,
  "disbanded" text,
  "championships" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which championship was established after 2005?`:
```sql
                SELECT "championships" FROM "sports" WHERE "established">2005;
```
## Task
Generate a SQL query to answer the following question:
`Which year had J.R. Reid as a player?`

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

CREATE TABLE "boys_basketball_players_and_coaches_of_t" (
  "year" text,
  "player" text,
  "school" text,
  "hometown" text,
  "college" text,
  "nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which year had J.R. Reid as a player?`:
```sql
                SELECT "year" FROM "boys_basketball_players_and_coaches_of_t" WHERE "player"='j.r. reid';
```
## Task
Generate a SQL query to answer the following question:
`Which hometown is the played Dajuan Wagner from?`

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

CREATE TABLE "boys_basketball_players_and_coaches_of_t" (
  "year" text,
  "player" text,
  "school" text,
  "hometown" text,
  "college" text,
  "nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which hometown is the played Dajuan Wagner from?`:
```sql
                SELECT "hometown" FROM "boys_basketball_players_and_coaches_of_t" WHERE "player"='dajuan wagner';
```
## Task
Generate a SQL query to answer the following question:
`When the home team was carlton how many people were in the crowd?`

### 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 the home team was carlton how many people were in the crowd?`:
```sql
                SELECT "crowd" FROM "round_1" WHERE "home_team"='carlton';
```
## Task
Generate a SQL query to answer the following question:
`Which away team had a crowd of over 23,000 people?`

### 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 `Which away team had a crowd of over 23,000 people?`:
```sql
                SELECT "away_team" FROM "round_1" WHERE "crowd">'23,000';
```
## Task
Generate a SQL query to answer the following question:
`What's the home team for the western oval venue?`

### 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's the home team for the western oval venue?`:
```sql
                SELECT "home_team" FROM "round_1" WHERE "venue"='western oval';
```
## Task
Generate a SQL query to answer the following question:
`What's the home team for the junction oval venue?`

### 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's the home team for the junction oval venue?`:
```sql
                SELECT "home_team_score" FROM "round_1" WHERE "venue"='junction oval';
```
## Task
Generate a SQL query to answer the following question:
`What date did the away team score 13.10 (88)?`

### 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 date did the away team score 13.10 (88)?`:
```sql
                SELECT "date" FROM "round_1" WHERE "away_team_score"='13.10 (88)';
```
## Task
Generate a SQL query to answer the following question:
`What was the result when the opponent was fenerbahçe?`

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

CREATE TABLE "uefa_cup" (
  "date_and_time" text,
  "round" text,
  "opponent" text,
  "venue" text,
  "result" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result when the opponent was fenerbahçe?`:
```sql
                SELECT "result" FROM "uefa_cup" WHERE "opponent"='fenerbahçe';
```
## Task
Generate a SQL query to answer the following question:
`what is the apparent magnitude of NGC number 6027d?`

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

CREATE TABLE "6001_6100" (
  "ngc_number" text,
  "object_type" text,
  "constellation" text,
  "right_ascension_j2000" text,
  "declination_j2000" text,
  "apparent_magnitude" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the apparent magnitude of NGC number 6027d?`:
```sql
                SELECT "apparent_magnitude" FROM "6001_6100" WHERE "ngc_number"='6027d';
```
## Task
Generate a SQL query to answer the following question:
`What is the visiting team of the game with the home team Grizzlies on 13 November 2007?`

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

CREATE TABLE "november" (
  "date" text,
  "visitor" text,
  "score" text,
  "home" text,
  "leading_scorer" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the visiting team of the game with the home team Grizzlies on 13 November 2007?`:
```sql
                SELECT "visitor" FROM "november" WHERE "home"='grizzlies' AND "date"='13 november 2007';
```
## Task
Generate a SQL query to answer the following question:
`What is the date of the game when the Mavericks were the home team?`

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

CREATE TABLE "november" (
  "date" text,
  "visitor" text,
  "score" text,
  "home" text,
  "leading_scorer" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the game when the Mavericks were the home team?`:
```sql
                SELECT "date" FROM "november" WHERE "home"='mavericks';
```
## Task
Generate a SQL query to answer the following question:
`Which of the lowest years had a Wheel arrangement that was 0-4-2t?`

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

CREATE TABLE "locomotives_of_the_southern_railway" (
  "iwcr_no" text,
  "name" text,
  "wheel_arrangement" text,
  "sr_no" text,
  "year_made" real,
  "year_withdrawn" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which of the lowest years had a Wheel arrangement that was 0-4-2t?`:
```sql
                SELECT MIN("year_made") FROM "locomotives_of_the_southern_railway" WHERE "wheel_arrangement"='0-4-2t';
```
## Task
Generate a SQL query to answer the following question:
`What is the mean Year when the IWCR number was 5 and the Year withdrawn was bigger than 1926?`

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

CREATE TABLE "locomotives_of_the_southern_railway" (
  "iwcr_no" text,
  "name" text,
  "wheel_arrangement" text,
  "sr_no" text,
  "year_made" real,
  "year_withdrawn" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the mean Year when the IWCR number was 5 and the Year withdrawn was bigger than 1926?`:
```sql
                SELECT AVG("year_made") FROM "locomotives_of_the_southern_railway" WHERE "iwcr_no"='5' AND "year_withdrawn">1926;
```
## Task
Generate a SQL query to answer the following question:
`Which SR number had a wheel arrangement of 0-6-0t, the year made was more recent than 1874, and the year withdrawn was 1963?`

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

CREATE TABLE "locomotives_of_the_southern_railway" (
  "iwcr_no" text,
  "name" text,
  "wheel_arrangement" text,
  "sr_no" text,
  "year_made" real,
  "year_withdrawn" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which SR number had a wheel arrangement of 0-6-0t, the year made was more recent than 1874, and the year withdrawn was 1963?`:
```sql
                SELECT "sr_no" FROM "locomotives_of_the_southern_railway" WHERE "wheel_arrangement"='0-6-0t' AND "year_made">1874 AND "year_withdrawn"=1963;
```
## Task
Generate a SQL query to answer the following question:
`What is the sum number of years where the wheel arrangement of 0-4-0t?`

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

CREATE TABLE "locomotives_of_the_southern_railway" (
  "iwcr_no" text,
  "name" text,
  "wheel_arrangement" text,
  "sr_no" text,
  "year_made" real,
  "year_withdrawn" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum number of years where the wheel arrangement of 0-4-0t?`:
```sql
                SELECT COUNT("year_made") FROM "locomotives_of_the_southern_railway" WHERE "wheel_arrangement"='0-4-0t';
```
## Task
Generate a SQL query to answer the following question:
`What was the latest week of a game that had an attendance of 63,001?`

### 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" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the latest week of a game that had an attendance of 63,001?`:
```sql
                SELECT MAX("week") FROM "schedule" WHERE "attendance"='63,001';
```
## Task
Generate a SQL query to answer the following question:
`What is the total medals Austria and those with larger than rank 4 have?`

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

CREATE TABLE "medal_table" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total medals Austria and those with larger than rank 4 have?`:
```sql
                SELECT COUNT("total") FROM "medal_table" WHERE "nation"='austria' AND "rank">4;
```
## Task
Generate a SQL query to answer the following question:
`What is the most gold medals that a team ranked higher than 6, have 1 silver medal, and more than 4 total medals have?`

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

CREATE TABLE "medal_table" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the most gold medals that a team ranked higher than 6, have 1 silver medal, and more than 4 total medals have?`:
```sql
                SELECT MAX("gold") FROM "medal_table" WHERE "rank"<6 AND "silver"=1 AND "total">4;
```
## Task
Generate a SQL query to answer the following question:
`Which country has a rollercoaster that opened in 2002, is a spinning coaster, and is located in Disney's Animal Kingdom?`

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

CREATE TABLE "list_of_operating_reverchon_roller_coast" (
  "name" text,
  "model" text,
  "park" text,
  "country" text,
  "opened" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which country has a rollercoaster that opened in 2002, is a spinning coaster, and is located in Disney's Animal Kingdom?`:
```sql
                SELECT "country" FROM "list_of_operating_reverchon_roller_coast" WHERE "opened"=2002 AND "model"='spinning coaster' AND "park"='disney''s animal kingdom';
```
## Task
Generate a SQL query to answer the following question:
`What is the name of the roller coaster that opened in 2000 in Brighton Pier?`

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

CREATE TABLE "list_of_operating_reverchon_roller_coast" (
  "name" text,
  "model" text,
  "park" text,
  "country" text,
  "opened" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the roller coaster that opened in 2000 in Brighton Pier?`:
```sql
                SELECT "name" FROM "list_of_operating_reverchon_roller_coast" WHERE "opened"=2000 AND "park"='brighton pier';
```
## Task
Generate a SQL query to answer the following question:
`How many attended on may 6?`

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

CREATE TABLE "game_log" (
  "date" text,
  "opponent" text,
  "score" text,
  "loss" text,
  "attendance" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many attended on may 6?`:
```sql
                SELECT COUNT("attendance") FROM "game_log" WHERE "date"='may 6';
```
## Task
Generate a SQL query to answer the following question:
`Who did they lose to 3-17?`

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

CREATE TABLE "game_log" (
  "date" text,
  "opponent" text,
  "score" text,
  "loss" text,
  "attendance" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who did they lose to 3-17?`:
```sql
                SELECT "opponent" FROM "game_log" WHERE "score"='3-17';
```
## Task
Generate a SQL query to answer the following question:
`What team was the home team when the away team scored 12.11 (83)?`

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

CREATE TABLE "round_12" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the home team when the away team scored 12.11 (83)?`:
```sql
                SELECT "home_team" FROM "round_12" WHERE "away_team_score"='12.11 (83)';
```
## Task
Generate a SQL query to answer the following question:
`What venue did Richmond play at as the home team?`

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

CREATE TABLE "round_12" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What venue did Richmond play at as the home team?`:
```sql
                SELECT "venue" FROM "round_12" WHERE "home_team"='richmond';
```
## Task
Generate a SQL query to answer the following question:
`What home team played against Footscray as the away team?`

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

CREATE TABLE "round_12" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What home team played against Footscray as the away team?`:
```sql
                SELECT "home_team" FROM "round_12" WHERE "away_team"='footscray';
```
## Task
Generate a SQL query to answer the following question:
`What date did the away team score 14.8 (92)?`

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

CREATE TABLE "round_12" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date did the away team score 14.8 (92)?`:
```sql
                SELECT "date" FROM "round_12" WHERE "away_team_score"='14.8 (92)';
```
## Task
Generate a SQL query to answer the following question:
`what was the attendance when the away team was boreham wood?`

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

CREATE TABLE "ties" (
  "tie_no" real,
  "home_team" text,
  "score" text,
  "away_team" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `what was the attendance when the away team was boreham wood?`:
```sql
                SELECT "attendance" FROM "ties" WHERE "away_team"='boreham wood';
```
## Task
Generate a SQL query to answer the following question:
`what is the tie no when the away team is solihull moors?`

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

CREATE TABLE "ties" (
  "tie_no" real,
  "home_team" text,
  "score" text,
  "away_team" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the tie no when the away team is solihull moors?`:
```sql
                SELECT SUM("tie_no") FROM "ties" WHERE "away_team"='solihull moors';
```
## Task
Generate a SQL query to answer the following question:
`who is the away team when the tie no is more than 13 and the home team is team bath?`

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

CREATE TABLE "ties" (
  "tie_no" real,
  "home_team" text,
  "score" text,
  "away_team" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `who is the away team when the tie no is more than 13 and the home team is team bath?`:
```sql
                SELECT "away_team" FROM "ties" WHERE "tie_no">13 AND "home_team"='team bath';
```
## Task
Generate a SQL query to answer the following question:
`What is the Pick # of the player from Simon Fraser College?`

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

CREATE TABLE "round_one" (
  "pick_num" real,
  "cfl_team" text,
  "player" text,
  "position" text,
  "college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Pick # of the player from Simon Fraser College?`:
```sql
                SELECT AVG("pick_num") FROM "round_one" WHERE "college"='simon fraser';
```
## Task
Generate a SQL query to answer the following question:
`What is the margin of victory for the winning score of −10 (71-65-68-70=274)?`

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

CREATE TABLE "pga_tour_wins_5" (
  "date" text,
  "tournament" text,
  "winning_score" 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 for the winning score of −10 (71-65-68-70=274)?`:
```sql
                SELECT "margin_of_victory" FROM "pga_tour_wins_5" WHERE "winning_score"='−10 (71-65-68-70=274)';
```
## Task
Generate a SQL query to answer the following question:
`Who is the runner(s)-up for a winning score of −3 (71-74-66-66=277)?`

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

CREATE TABLE "pga_tour_wins_5" (
  "date" text,
  "tournament" text,
  "winning_score" text,
  "margin_of_victory" text,
  "runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the runner(s)-up for a winning score of −3 (71-74-66-66=277)?`:
```sql
                SELECT "runner_s_up" FROM "pga_tour_wins_5" WHERE "winning_score"='−3 (71-74-66-66=277)';
```
## Task
Generate a SQL query to answer the following question:
`What venue had less than 7.4 extra and the result of 4th?`

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

CREATE TABLE "achievements" (
  "year" real,
  "meeting" text,
  "venue" text,
  "result" text,
  "event" text,
  "extra" real
);
### SQL
Given the database schema, here is the SQL query that answers `What venue had less than 7.4 extra and the result of 4th?`:
```sql
                SELECT "venue" FROM "achievements" WHERE "extra"<7.4 AND "result"='4th';
```
## Task
Generate a SQL query to answer the following question:
`What is the highest extra total before 2003 at the Meeting of all africa games?`

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

CREATE TABLE "achievements" (
  "year" real,
  "meeting" text,
  "venue" text,
  "result" text,
  "event" text,
  "extra" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest extra total before 2003 at the Meeting of all africa games?`:
```sql
                SELECT MAX("extra") FROM "achievements" WHERE "meeting"='all africa games' AND "year"<2003;
```
## Task
Generate a SQL query to answer the following question:
`What year has an extra of 8, and a result of 3rd?`

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

CREATE TABLE "achievements" (
  "year" real,
  "meeting" text,
  "venue" text,
  "result" text,
  "event" text,
  "extra" real
);
### SQL
Given the database schema, here is the SQL query that answers `What year has an extra of 8, and a result of 3rd?`:
```sql
                SELECT "year" FROM "achievements" WHERE "extra"=8 AND "result"='3rd';
```
## Task
Generate a SQL query to answer the following question:
`What year has a venue of algiers, algeria, extra smaller than 8.03, and a Meeting of all africa games?`

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

CREATE TABLE "achievements" (
  "year" real,
  "meeting" text,
  "venue" text,
  "result" text,
  "event" text,
  "extra" real
);
### SQL
Given the database schema, here is the SQL query that answers `What year has a venue of algiers, algeria, extra smaller than 8.03, and a Meeting of all africa games?`:
```sql
                SELECT "year" FROM "achievements" WHERE "venue"='algiers, algeria' AND "extra"<8.03 AND "meeting"='all africa games';
```
## Task
Generate a SQL query to answer the following question:
`What is the Date with a Set 3 with 15–6?`

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

CREATE TABLE "pool_a" (
  "date" text,
  "score" text,
  "set_1" text,
  "set_2" text,
  "set_3" text,
  "total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Date with a Set 3 with 15–6?`:
```sql
                SELECT "date" FROM "pool_a" WHERE "set_3"='15–6';
```
## Task
Generate a SQL query to answer the following question:
`What is the Set 3 with a Score of 3–1, and has a Set 2 of 13–15?`

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

CREATE TABLE "pool_a" (
  "date" text,
  "score" text,
  "set_1" text,
  "set_2" text,
  "set_3" text,
  "total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Set 3 with a Score of 3–1, and has a Set 2 of 13–15?`:
```sql
                SELECT "set_3" FROM "pool_a" WHERE "score"='3–1' AND "set_2"='13–15';
```
## Task
Generate a SQL query to answer the following question:
`What is the Set 1 with a Score of 3–0, and has a Set 3 of 15–12?`

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

CREATE TABLE "pool_a" (
  "date" text,
  "score" text,
  "set_1" text,
  "set_2" text,
  "set_3" text,
  "total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Set 1 with a Score of 3–0, and has a Set 3 of 15–12?`:
```sql
                SELECT "set_1" FROM "pool_a" WHERE "score"='3–0' AND "set_3"='15–12';
```
## Task
Generate a SQL query to answer the following question:
`What is the Set 1 with a Score of 3–0, and has a Set 3 of 15–10?`

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

CREATE TABLE "pool_a" (
  "date" text,
  "score" text,
  "set_1" text,
  "set_2" text,
  "set_3" text,
  "total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Set 1 with a Score of 3–0, and has a Set 3 of 15–10?`:
```sql
                SELECT "set_1" FROM "pool_a" WHERE "score"='3–0' AND "set_3"='15–10';
```
## Task
Generate a SQL query to answer the following question:
`What is the Set 2 with a Total with 45–12?`

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

CREATE TABLE "pool_a" (
  "date" text,
  "score" text,
  "set_1" text,
  "set_2" text,
  "set_3" text,
  "total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Set 2 with a Total with 45–12?`:
```sql
                SELECT "set_2" FROM "pool_a" WHERE "total"='45–12';
```
## Task
Generate a SQL query to answer the following question:
`What is the Total with a Score of 3–0, and a Date of 14 oct, and has a Set 1 of 15–12?`

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

CREATE TABLE "pool_a" (
  "date" text,
  "score" text,
  "set_1" text,
  "set_2" text,
  "set_3" text,
  "total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Total with a Score of 3–0, and a Date of 14 oct, and has a Set 1 of 15–12?`:
```sql
                SELECT "total" FROM "pool_a" WHERE "score"='3–0' AND "date"='14 oct' AND "set_1"='15–12';
```
## Task
Generate a SQL query to answer the following question:
`What was the date of the footscray home game?`

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

CREATE TABLE "round_9" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the footscray home game?`:
```sql
                SELECT "date" FROM "round_9" WHERE "home_team"='footscray';
```
## Task
Generate a SQL query to answer the following question:
`Tell me the time for martin kampmann`

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

CREATE TABLE "mixed_martial_arts_record" (
  "res" text,
  "record" text,
  "opponent" text,
  "method" text,
  "round" real,
  "time" text,
  "location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the time for martin kampmann`:
```sql
                SELECT "time" FROM "mixed_martial_arts_record" WHERE "opponent"='martin kampmann';
```
## Task
Generate a SQL query to answer the following question:
`Tell me the sum of round for record of 6-3`

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

CREATE TABLE "mixed_martial_arts_record" (
  "res" text,
  "record" text,
  "opponent" text,
  "method" text,
  "round" real,
  "time" text,
  "location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the sum of round for record of 6-3`:
```sql
                SELECT SUM("round") FROM "mixed_martial_arts_record" WHERE "record"='6-3';
```
## Task
Generate a SQL query to answer the following question:
`Tell me the location for win with record of 8-5`

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

CREATE TABLE "mixed_martial_arts_record" (
  "res" text,
  "record" text,
  "opponent" text,
  "method" text,
  "round" real,
  "time" text,
  "location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the location for win with record of 8-5`:
```sql
                SELECT "location" FROM "mixed_martial_arts_record" WHERE "res"='win' AND "record"='8-5';
```
## Task
Generate a SQL query to answer the following question:
`In which of North Melbourne's away games was there the lowest crowd?`

### 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 `In which of North Melbourne's away games was there the lowest crowd?`:
```sql
                SELECT MIN("crowd") FROM "round_13" WHERE "away_team"='north melbourne';
```
## Task
Generate a SQL query to answer the following question:
`What is the build date of the model with PRR Class brs24?`

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

CREATE TABLE "baldwin_locomotive_works" (
  "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 build date of the model with PRR Class brs24?`:
```sql
                SELECT "build_date" FROM "baldwin_locomotive_works" WHERE "prr_class"='brs24';
```
## Task
Generate a SQL query to answer the following question:
`How many total units were built of Model ds-4-4-660 with a b-b wheel arrangement and a PRR Class of bs6?`

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

CREATE TABLE "baldwin_locomotive_works" (
  "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 `How many total units were built of Model ds-4-4-660 with a b-b wheel arrangement and a PRR Class of bs6?`:
```sql
                SELECT SUM("total_produced") FROM "baldwin_locomotive_works" WHERE "wheel_arrangement"='b-b' AND "prr_class"='bs6' AND "builder_s_model"='ds-4-4-660';
```
## Task
Generate a SQL query to answer the following question:
`What is the build date of the model with a PRR Class of brs24?`

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

CREATE TABLE "baldwin_locomotive_works" (
  "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 build date of the model with a PRR Class of brs24?`:
```sql
                SELECT "build_date" FROM "baldwin_locomotive_works" WHERE "prr_class"='brs24';
```
## Task
Generate a SQL query to answer the following question:
`What is the total number of roll for Te Hapua school?`

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

CREATE TABLE "far_north" (
  "name" text,
  "years" text,
  "area" text,
  "authority" text,
  "decile" real,
  "roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of roll for Te Hapua school?`:
```sql
                SELECT COUNT("roll") FROM "far_north" WHERE "name"='te hapua school';
```
## Task
Generate a SQL query to answer the following question:
`Name the place of action for the marine corps and corporal rank`

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

CREATE TABLE "korean_expedition" (
  "name" text,
  "service" text,
  "rank" text,
  "place_of_action" text,
  "unit" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the place of action for the marine corps and corporal rank`:
```sql
                SELECT "place_of_action" FROM "korean_expedition" WHERE "service"='marine corps' AND "rank"='corporal';
```
## Task
Generate a SQL query to answer the following question:
`When driver heinz-harald frentzen has a number of laps greater than 60, what is the sum of grid?`

### 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 `When driver heinz-harald frentzen has a number of laps greater than 60, what is the sum of grid?`:
```sql
                SELECT COUNT("grid") FROM "race" WHERE "laps">60 AND "driver"='heinz-harald frentzen';
```
## Task
Generate a SQL query to answer the following question:
`What is the population total for saint-wenceslas with a region number of under 17?`

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

CREATE TABLE "list_of_municipalities_in_quebec" (
  "code" real,
  "type" text,
  "name" text,
  "area_km_2" real,
  "population" real,
  "regional_county_municipality" text,
  "region" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the population total for saint-wenceslas with a region number of under 17?`:
```sql
                SELECT SUM("population") FROM "list_of_municipalities_in_quebec" WHERE "name"='saint-wenceslas' AND "region"<17;
```
## Task
Generate a SQL query to answer the following question:
`What is the smallest code associated with a type of m for a region less than 17 named, named saint-sylvère?`

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

CREATE TABLE "list_of_municipalities_in_quebec" (
  "code" real,
  "type" text,
  "name" text,
  "area_km_2" real,
  "population" real,
  "regional_county_municipality" text,
  "region" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest code associated with a type of m for a region less than 17 named, named saint-sylvère?`:
```sql
                SELECT MIN("code") FROM "list_of_municipalities_in_quebec" WHERE "type"='m' AND "name"='saint-sylvère' AND "region"<17;
```
## Task
Generate a SQL query to answer the following question:
`What competition was at the Daugava Stadium, Riga, Latvia?`

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

CREATE TABLE "ireland_international_goals" (
  "goal" real,
  "date" text,
  "venue" text,
  "score" text,
  "result" text,
  "competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What competition was at the Daugava Stadium, Riga, Latvia?`:
```sql
                SELECT "competition" FROM "ireland_international_goals" WHERE "venue"='daugava stadium, riga, latvia';
```
## Task
Generate a SQL query to answer the following question:
`How many total goals were made at the game on 15 November 1989?`

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

CREATE TABLE "ireland_international_goals" (
  "goal" real,
  "date" text,
  "venue" text,
  "score" text,
  "result" text,
  "competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many total goals were made at the game on 15 November 1989?`:
```sql
                SELECT COUNT("goal") FROM "ireland_international_goals" WHERE "date"='15 november 1989';
```
## Task
Generate a SQL query to answer the following question:
`What is the captain's name of team Leeds United?`

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

CREATE TABLE "personnel_and_kits" (
  "team" text,
  "manager" text,
  "captain" text,
  "kit_manufacturer" text,
  "shirt_sponsor" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the captain's name of team Leeds United?`:
```sql
                SELECT "captain" FROM "personnel_and_kits" WHERE "team"='leeds united';
```
## Task
Generate a SQL query to answer the following question:
`Who is the shirt sponsor for Captain Geoff Thomas' team?`

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

CREATE TABLE "personnel_and_kits" (
  "team" text,
  "manager" text,
  "captain" text,
  "kit_manufacturer" text,
  "shirt_sponsor" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the shirt sponsor for Captain Geoff Thomas' team?`:
```sql
                SELECT "shirt_sponsor" FROM "personnel_and_kits" WHERE "captain"='geoff thomas';
```
## Task
Generate a SQL query to answer the following question:
`What is the name of the team that Tulip Computers NV sponsors?`

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

CREATE TABLE "personnel_and_kits" (
  "team" text,
  "manager" text,
  "captain" text,
  "kit_manufacturer" text,
  "shirt_sponsor" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the team that Tulip Computers NV sponsors?`:
```sql
                SELECT "team" FROM "personnel_and_kits" WHERE "shirt_sponsor"='tulip computers nv';
```
## Task
Generate a SQL query to answer the following question:
`What is the name of the captain for team Norwich City?`

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

CREATE TABLE "personnel_and_kits" (
  "team" text,
  "manager" text,
  "captain" text,
  "kit_manufacturer" text,
  "shirt_sponsor" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the captain for team Norwich City?`:
```sql
                SELECT "captain" FROM "personnel_and_kits" WHERE "team"='norwich city';
```
## Task
Generate a SQL query to answer the following question:
`What team does Graeme Souness manage?`

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

CREATE TABLE "personnel_and_kits" (
  "team" text,
  "manager" text,
  "captain" text,
  "kit_manufacturer" text,
  "shirt_sponsor" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team does Graeme Souness manage?`:
```sql
                SELECT "team" FROM "personnel_and_kits" WHERE "manager"='graeme souness';
```
## Task
Generate a SQL query to answer the following question:
`what is the lowest laps when the grid is smaller than 5 and the driver is juan manuel fangio?`

### 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 lowest laps when the grid is smaller than 5 and the driver is juan manuel fangio?`:
```sql
                SELECT MIN("laps") FROM "classification" WHERE "grid"<5 AND "driver"='juan manuel fangio';
```
## Task
Generate a SQL query to answer the following question:
`what is the grid when the time/retired is +9 laps and the laps is larger than 91?`

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

CREATE TABLE "classification" (
  "driver" text,
  "constructor" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the grid when the time/retired is +9 laps and the laps is larger than 91?`:
```sql
                SELECT COUNT("grid") FROM "classification" WHERE "time_retired"='+9 laps' AND "laps">91;
```
## Task
Generate a SQL query to answer the following question:
`what is the lowest grid when the time retired is clutch, the driver is peter collins and the laps is smaller than 26?`

### 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 lowest grid when the time retired is clutch, the driver is peter collins and the laps is smaller than 26?`:
```sql
                SELECT MIN("grid") FROM "classification" WHERE "time_retired"='clutch' AND "driver"='peter collins' AND "laps"<26;
```
## Task
Generate a SQL query to answer the following question:
`What zone has camp type D/S in area Bl9?`

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

CREATE TABLE "grand_canyon_zoning_and_use_limits" (
  "area" text,
  "name" text,
  "zone" text,
  "group_s" real,
  "parties" real,
  "max_people" real,
  "camp_type" text
);
### SQL
Given the database schema, here is the SQL query that answers `What zone has camp type D/S in area Bl9?`:
```sql
                SELECT "zone" FROM "grand_canyon_zoning_and_use_limits" WHERE "camp_type"='d/s' AND "area"='bl9';
```
## Task
Generate a SQL query to answer the following question:
`Which name has group 0 in Bl4 area?`

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

CREATE TABLE "grand_canyon_zoning_and_use_limits" (
  "area" text,
  "name" text,
  "zone" text,
  "group_s" real,
  "parties" real,
  "max_people" real,
  "camp_type" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which name has group 0 in Bl4 area?`:
```sql
                SELECT "name" FROM "grand_canyon_zoning_and_use_limits" WHERE "group_s"=0 AND "area"='bl4';
```
## Task
Generate a SQL query to answer the following question:
`Which zone has max capacity of 23 in a group under 2 at Robbers Roost?`

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

CREATE TABLE "grand_canyon_zoning_and_use_limits" (
  "area" text,
  "name" text,
  "zone" text,
  "group_s" real,
  "parties" real,
  "max_people" real,
  "camp_type" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which zone has max capacity of 23 in a group under 2 at Robbers Roost?`:
```sql
                SELECT "zone" FROM "grand_canyon_zoning_and_use_limits" WHERE "max_people">23 AND "group_s"<2 AND "name"='robbers roost';
```
## Task
Generate a SQL query to answer the following question:
`I want to know the average crowd for away team of melbourne`

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

CREATE TABLE "round_11" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want to know the average crowd for away team of melbourne`:
```sql
                SELECT AVG("crowd") FROM "round_11" WHERE "away_team"='melbourne';
```
## Task
Generate a SQL query to answer the following question:
`Which driver had a time off course?`

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

CREATE TABLE "race" (
  "driver" text,
  "team" text,
  "laps" real,
  "time_retired" text,
  "grid" text,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which driver had a time off course?`:
```sql
                SELECT "driver" FROM "race" WHERE "time_retired"='off course';
```