cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`Which championship had a score in the final of 3–6, 6–4, 5–7?`

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

CREATE TABLE "singles_finals_16_9_7" (
  "outcome" text,
  "date" real,
  "championship" text,
  "surface" text,
  "opponent_in_the_final" text,
  "score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which championship had a score in the final of 3–6, 6–4, 5–7?`:
```sql
                SELECT "championship" FROM "singles_finals_16_9_7" WHERE "score_in_the_final"='3–6, 6–4, 5–7';
```
## Task
Generate a SQL query to answer the following question:
`What is the grid total when there are 37 laps?`

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

CREATE TABLE "classification" (
  "driver" text,
  "constructor" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the grid total when there are 37 laps?`:
```sql
                SELECT COUNT("grid") FROM "classification" WHERE "laps"=37;
```
## Task
Generate a SQL query to answer the following question:
`What constructor has a grid less than 13 with under 9 laps?`

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

CREATE TABLE "classification" (
  "driver" text,
  "constructor" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What constructor has a grid less than 13 with under 9 laps?`:
```sql
                SELECT "constructor" FROM "classification" WHERE "grid"<13 AND "laps"<9;
```
## Task
Generate a SQL query to answer the following question:
`What year was the Competition of World Junior Championships with a 20th (qf) position?`

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

CREATE TABLE "competition_record" (
  "year" real,
  "competition" text,
  "venue" text,
  "position" text,
  "event" text,
  "notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was the Competition of World Junior Championships with a 20th (qf) position?`:
```sql
                SELECT AVG("year") FROM "competition_record" WHERE "competition"='world junior championships' AND "position"='20th (qf)';
```
## Task
Generate a SQL query to answer the following question:
`What was the notes of the 400 m event before 2004 with a position of 12th (h)?`

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

CREATE TABLE "competition_record" (
  "year" real,
  "competition" text,
  "venue" text,
  "position" text,
  "event" text,
  "notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the notes of the 400 m event before 2004 with a position of 12th (h)?`:
```sql
                SELECT "notes" FROM "competition_record" WHERE "event"='400 m' AND "year"<2004 AND "position"='12th (h)';
```
## Task
Generate a SQL query to answer the following question:
`Which venue had a note of 3:34.88 after 2003?`

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

CREATE TABLE "competition_record" (
  "year" real,
  "competition" text,
  "venue" text,
  "position" text,
  "event" text,
  "notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue had a note of 3:34.88 after 2003?`:
```sql
                SELECT "venue" FROM "competition_record" WHERE "year">2003 AND "notes"='3:34.88';
```
## Task
Generate a SQL query to answer the following question:
`What were the notes of the All-Africa Games before 2007?`

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

CREATE TABLE "competition_record" (
  "year" real,
  "competition" text,
  "venue" text,
  "position" text,
  "event" text,
  "notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the notes of the All-Africa Games before 2007?`:
```sql
                SELECT "notes" FROM "competition_record" WHERE "competition"='all-africa games' AND "year"<2007;
```
## Task
Generate a SQL query to answer the following question:
`Which event in 2007 had a position of 5th?`

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

CREATE TABLE "competition_record" (
  "year" real,
  "competition" text,
  "venue" text,
  "position" text,
  "event" text,
  "notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which event in 2007 had a position of 5th?`:
```sql
                SELECT "event" FROM "competition_record" WHERE "year"=2007 AND "position"='5th';
```
## Task
Generate a SQL query to answer the following question:
`How many attended the game on 12/17 with stephen jackson as the leading scorer?`

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

CREATE TABLE "december" (
  "date" text,
  "visitor" text,
  "score" text,
  "home" text,
  "leading_scorer" text,
  "attendance" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many attended the game on 12/17 with stephen jackson as the leading scorer?`:
```sql
                SELECT SUM("attendance") FROM "december" WHERE "leading_scorer"='stephen jackson' AND "date"='12/17';
```
## Task
Generate a SQL query to answer the following question:
`WHAT WAS THE SCORE IN THE FINAL PLAYED AGAINST JOSE CHECA-CALVO IN THE SANT CUGAT TOURNAMENT ?`

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

CREATE TABLE "singles_titles_92" (
  "date" text,
  "tournament" text,
  "surface" text,
  "opponent_in_the_final" text,
  "score" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT WAS THE SCORE IN THE FINAL PLAYED AGAINST JOSE CHECA-CALVO IN THE SANT CUGAT TOURNAMENT ?`:
```sql
                SELECT "score" FROM "singles_titles_92" WHERE "tournament"='sant cugat' AND "opponent_in_the_final"='jose checa-calvo';
```
## Task
Generate a SQL query to answer the following question:
`WHAT WAS THE SCORE IN THE FINAL AGAINST RABIE CHAKI?`

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

CREATE TABLE "singles_titles_92" (
  "date" text,
  "tournament" text,
  "surface" text,
  "opponent_in_the_final" text,
  "score" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT WAS THE SCORE IN THE FINAL AGAINST RABIE CHAKI?`:
```sql
                SELECT "score" FROM "singles_titles_92" WHERE "opponent_in_the_final"='rabie chaki';
```
## Task
Generate a SQL query to answer the following question:
`What was the away team's score when Collingwood was the home team?`

### 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 away team's score when Collingwood was the home team?`:
```sql
                SELECT "away_team_score" FROM "round_9" WHERE "home_team"='collingwood';
```
## Task
Generate a SQL query to answer the following question:
`Who was the home team for the game played at Victoria Park?`

### 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 `Who was the home team for the game played at Victoria Park?`:
```sql
                SELECT "home_team" FROM "round_9" WHERE "venue"='victoria park';
```
## Task
Generate a SQL query to answer the following question:
`Who was the home team when Fitzroy was the away team?`

### 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 `Who was the home team when Fitzroy was the away team?`:
```sql
                SELECT "home_team" FROM "round_9" WHERE "away_team"='fitzroy';
```
## Task
Generate a SQL query to answer the following question:
`Who was the home team for the game played at Lake Oval?`

### 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 `Who was the home team for the game played at Lake Oval?`:
```sql
                SELECT "home_team" FROM "round_9" WHERE "venue"='lake oval';
```
## Task
Generate a SQL query to answer the following question:
`Who was the opponent in the championship in Johannesburg, South Africa?`

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

CREATE TABLE "career_finals" (
  "outcome" text,
  "date" text,
  "championship" text,
  "opponent_in_the_final" text,
  "score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent in the championship in Johannesburg, South Africa?`:
```sql
                SELECT "opponent_in_the_final" FROM "career_finals" WHERE "championship"='johannesburg, south africa';
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest amount of wins a manager with more than 0.526 pct., ranked higher than 37, and 947 losses has?`

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

CREATE TABLE "managers_with_1_000_or_more_wins" (
  "rank" real,
  "name" text,
  "wins" real,
  "losses" real,
  "pct" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest amount of wins a manager with more than 0.526 pct., ranked higher than 37, and 947 losses has?`:
```sql
                SELECT MIN("wins") FROM "managers_with_1_000_or_more_wins" WHERE "pct">0.526 AND "rank"<37 AND "losses"=947;
```
## Task
Generate a SQL query to answer the following question:
`I want the total number of people in the crowd for essendon home team`

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

CREATE TABLE "round_14" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the total number of people in the crowd for essendon home team`:
```sql
                SELECT COUNT("crowd") FROM "round_14" WHERE "home_team"='essendon';
```
## Task
Generate a SQL query to answer the following question:
`How many grids have 102 laps and a Time/Retired of + 6.18?`

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

CREATE TABLE "classification" (
  "driver" text,
  "constructor" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many grids have 102 laps and a Time/Retired of + 6.18?`:
```sql
                SELECT COUNT("grid") FROM "classification" WHERE "laps">102 AND "time_retired"='+ 6.18';
```
## Task
Generate a SQL query to answer the following question:
`How many laps did innes ireland drive with a grid higher than 11?`

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

CREATE TABLE "classification" (
  "driver" text,
  "constructor" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many laps did innes ireland drive with a grid higher than 11?`:
```sql
                SELECT SUM("laps") FROM "classification" WHERE "driver"='innes ireland' AND "grid">11;
```
## Task
Generate a SQL query to answer the following question:
`What is the average grid that has a Constructor of brm, tony maggs, and a Laps larger than 102?`

### 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 average grid that has a Constructor of brm, tony maggs, and a Laps larger than 102?`:
```sql
                SELECT AVG("grid") FROM "classification" WHERE "constructor"='brm' AND "driver"='tony maggs' AND "laps">102;
```
## Task
Generate a SQL query to answer the following question:
`I want the score for 23 july 1992`

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

CREATE TABLE "international_goals" (
  "date" text,
  "venue" text,
  "score" text,
  "result" text,
  "competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the score for 23 july 1992`:
```sql
                SELECT "score" FROM "international_goals" WHERE "date"='23 july 1992';
```
## Task
Generate a SQL query to answer the following question:
`I want the venue for 23 july 1992`

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

CREATE TABLE "international_goals" (
  "date" text,
  "venue" text,
  "score" text,
  "result" text,
  "competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the venue for 23 july 1992`:
```sql
                SELECT "venue" FROM "international_goals" WHERE "date"='23 july 1992';
```
## Task
Generate a SQL query to answer the following question:
`What is the Time/Retired that has a Grid smaller than 8, 73 laps, and a Constructor of williams - bmw?`

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

CREATE TABLE "race" (
  "driver" text,
  "constructor" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Time/Retired that has a Grid smaller than 8, 73 laps, and a Constructor of williams - bmw?`:
```sql
                SELECT "time_retired" FROM "race" WHERE "grid"<8 AND "laps"=73 AND "constructor"='williams - bmw';
```
## Task
Generate a SQL query to answer the following question:
`Which away team has a home team score of 12.10 (82)?`

### 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 `Which away team has a home team score of 12.10 (82)?`:
```sql
                SELECT "away_team" FROM "round_13" WHERE "home_team_score"='12.10 (82)';
```
## Task
Generate a SQL query to answer the following question:
`On what date was Richmond playing as an away team?`

### 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 `On what date was Richmond playing as an away team?`:
```sql
                SELECT "date" FROM "round_13" WHERE "away_team"='richmond';
```
## Task
Generate a SQL query to answer the following question:
`What is the crowd size for Victoria park?`

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

CREATE TABLE "round_5" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the crowd size for Victoria park?`:
```sql
                SELECT "crowd" FROM "round_5" WHERE "venue"='victoria park';
```
## Task
Generate a SQL query to answer the following question:
`What is the average crowd size for princes park?`

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

CREATE TABLE "round_5" (
  "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 for princes park?`:
```sql
                SELECT AVG("crowd") FROM "round_5" WHERE "venue"='princes park';
```
## Task
Generate a SQL query to answer the following question:
`What is the home team score when the away team score is 17.18 (120)?`

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

CREATE TABLE "round_5" (
  "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 home team score when the away team score is 17.18 (120)?`:
```sql
                SELECT "home_team_score" FROM "round_5" WHERE "away_team_score"='17.18 (120)';
```
## Task
Generate a SQL query to answer the following question:
`When the home team scored 12.21 (93), what was the average crowd size?`

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

CREATE TABLE "round_5" (
  "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 scored 12.21 (93), what was the average crowd size?`:
```sql
                SELECT AVG("crowd") FROM "round_5" WHERE "home_team_score"='12.21 (93)';
```
## Task
Generate a SQL query to answer the following question:
`Name the transfer wind for giuly`

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

CREATE TABLE "out" (
  "name" text,
  "country" text,
  "status" text,
  "moving_to" text,
  "transfer_window" text,
  "transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the transfer wind for giuly`:
```sql
                SELECT "transfer_window" FROM "out" WHERE "name"='giuly';
```
## Task
Generate a SQL query to answer the following question:
`Name the transfer fee for transfer status for fra`

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

CREATE TABLE "out" (
  "name" text,
  "country" text,
  "status" text,
  "moving_to" text,
  "transfer_window" text,
  "transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the transfer fee for transfer status for fra`:
```sql
                SELECT "transfer_fee" FROM "out" WHERE "status"='transfer' AND "country"='fra';
```
## Task
Generate a SQL query to answer the following question:
`Name the status for belletti`

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

CREATE TABLE "out" (
  "name" text,
  "country" text,
  "status" text,
  "moving_to" text,
  "transfer_window" text,
  "transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the status for belletti`:
```sql
                SELECT "status" FROM "out" WHERE "name"='belletti';
```
## Task
Generate a SQL query to answer the following question:
`Name the moving to for fra`

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

CREATE TABLE "out" (
  "name" text,
  "country" text,
  "status" text,
  "moving_to" text,
  "transfer_window" text,
  "transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the moving to for fra`:
```sql
                SELECT "moving_to" FROM "out" WHERE "country"='fra';
```
## Task
Generate a SQL query to answer the following question:
`Name the transfer window of realmadrid`

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

CREATE TABLE "out" (
  "name" text,
  "country" text,
  "status" text,
  "moving_to" text,
  "transfer_window" text,
  "transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the transfer window of realmadrid`:
```sql
                SELECT "transfer_window" FROM "out" WHERE "moving_to"='realmadrid';
```
## Task
Generate a SQL query to answer the following question:
`Name the country moving to chelsea`

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

CREATE TABLE "out" (
  "name" text,
  "country" text,
  "status" text,
  "moving_to" text,
  "transfer_window" text,
  "transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the country moving to chelsea`:
```sql
                SELECT "country" FROM "out" WHERE "moving_to"='chelsea';
```
## Task
Generate a SQL query to answer the following question:
`Who was the leading scorer of the game on 20 February 2008?`

### 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,
  "leading_scorer" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the leading scorer of the game on 20 February 2008?`:
```sql
                SELECT "leading_scorer" FROM "february" WHERE "date"='20 february 2008';
```
## Task
Generate a SQL query to answer the following question:
`What is the visitor team of the game with Rudy Gay (23) as the leading scorer?`

### 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,
  "leading_scorer" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the visitor team of the game with Rudy Gay (23) as the leading scorer?`:
```sql
                SELECT "visitor" FROM "february" WHERE "leading_scorer"='rudy gay (23)';
```
## Task
Generate a SQL query to answer the following question:
`What is the home team of the game where the Grizzlies were the visitor team and Rudy Gay (21) was the leading scorer?`

### 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,
  "leading_scorer" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home team of the game where the Grizzlies were the visitor team and Rudy Gay (21) was the leading scorer?`:
```sql
                SELECT "home" FROM "february" WHERE "visitor"='grizzlies' AND "leading_scorer"='rudy gay (21)';
```
## Task
Generate a SQL query to answer the following question:
`What is the record of the game on 5 February 2008?`

### 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,
  "leading_scorer" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record of the game on 5 February 2008?`:
```sql
                SELECT "record" FROM "february" WHERE "date"='5 february 2008';
```
## Task
Generate a SQL query to answer the following question:
`tell me the writer of production code ad1d09.`

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

CREATE TABLE "season_4" (
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `tell me the writer of production code ad1d09.`:
```sql
                SELECT "written_by" FROM "season_4" WHERE "production_code"='ad1d09';
```
## Task
Generate a SQL query to answer the following question:
`tell me the director of the production code ad1d02.`

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

CREATE TABLE "season_4" (
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `tell me the director of the production code ad1d02.`:
```sql
                SELECT "directed_by" FROM "season_4" WHERE "production_code"='ad1d02';
```
## Task
Generate a SQL query to answer the following question:
`Which team has a Reg GP of 0, a pick number under 136 with a player named Regan Darby?`

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

CREATE TABLE "list_of_vancouver_canucks_draft_picks" (
  "rd_num" real,
  "pick_num" real,
  "player" text,
  "team_league" text,
  "reg_gp" real,
  "pl_gp" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which team has a Reg GP of 0, a pick number under 136 with a player named Regan Darby?`:
```sql
                SELECT "team_league" FROM "list_of_vancouver_canucks_draft_picks" WHERE "reg_gp"=0 AND "pick_num"<136 AND "player"='regan darby';
```
## Task
Generate a SQL query to answer the following question:
`What planet orbits in 3.23 days?`

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

CREATE TABLE "planets" (
  "planet" text,
  "planet_type" text,
  "semimajor_axis_au" real,
  "orbital_period" text,
  "radial_velocity_m_s" real,
  "detectable_by" text
);
### SQL
Given the database schema, here is the SQL query that answers `What planet orbits in 3.23 days?`:
```sql
                SELECT "planet" FROM "planets" WHERE "orbital_period"='3.23 days';
```
## Task
Generate a SQL query to answer the following question:
`What type of planet has a radial velocity of 45.2 m/s?`

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

CREATE TABLE "planets" (
  "planet" text,
  "planet_type" text,
  "semimajor_axis_au" real,
  "orbital_period" text,
  "radial_velocity_m_s" real,
  "detectable_by" text
);
### SQL
Given the database schema, here is the SQL query that answers `What type of planet has a radial velocity of 45.2 m/s?`:
```sql
                SELECT "planet_type" FROM "planets" WHERE "radial_velocity_m_s">45.2;
```
## Task
Generate a SQL query to answer the following question:
`What type of planet has a semimajor axis of 0.07 AU?`

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

CREATE TABLE "planets" (
  "planet" text,
  "planet_type" text,
  "semimajor_axis_au" real,
  "orbital_period" text,
  "radial_velocity_m_s" real,
  "detectable_by" text
);
### SQL
Given the database schema, here is the SQL query that answers `What type of planet has a semimajor axis of 0.07 AU?`:
```sql
                SELECT "planet_type" FROM "planets" WHERE "semimajor_axis_au"=0.07;
```
## Task
Generate a SQL query to answer the following question:
`How can Planet, 51 pegasi b be detected?`

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

CREATE TABLE "planets" (
  "planet" text,
  "planet_type" text,
  "semimajor_axis_au" real,
  "orbital_period" text,
  "radial_velocity_m_s" real,
  "detectable_by" text
);
### SQL
Given the database schema, here is the SQL query that answers `How can Planet, 51 pegasi b be detected?`:
```sql
                SELECT "detectable_by" FROM "planets" WHERE "planet"='51 pegasi b';
```
## Task
Generate a SQL query to answer the following question:
`What is the city where the Telstra Dome is?`

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

CREATE TABLE "venues" (
  "stadium" text,
  "games" real,
  "city" text,
  "state" text,
  "capacity" real,
  "best_crowd" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the city where the Telstra Dome is?`:
```sql
                SELECT "city" FROM "venues" WHERE "stadium"='telstra dome';
```
## Task
Generate a SQL query to answer the following question:
`Name the D 41 which has a D 46 of r 6`

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

CREATE TABLE "before_the_elections" (
  "d_41" text,
  "d_42" text,
  "d_43" text,
  "d_44" text,
  "d_45" text,
  "d_46" text,
  "r_54" text,
  "r_53" text,
  "r_52" text,
  "r_51" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the D 41 which has a D 46 of r 6`:
```sql
                SELECT "d_41" FROM "before_the_elections" WHERE "d_46"='r 6';
```
## Task
Generate a SQL query to answer the following question:
`Name the D 41 which has a D 43 of r 18`

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

CREATE TABLE "before_the_elections" (
  "d_41" text,
  "d_42" text,
  "d_43" text,
  "d_44" text,
  "d_45" text,
  "d_46" text,
  "r_54" text,
  "r_53" text,
  "r_52" text,
  "r_51" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the D 41 which has a D 43 of r 18`:
```sql
                SELECT "d_41" FROM "before_the_elections" WHERE "d_43"='r 18';
```
## Task
Generate a SQL query to answer the following question:
`Name the R 52 which has a D 44 of d 44`

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

CREATE TABLE "before_the_elections" (
  "d_41" text,
  "d_42" text,
  "d_43" text,
  "d_44" text,
  "d_45" text,
  "d_46" text,
  "r_54" text,
  "r_53" text,
  "r_52" text,
  "r_51" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the R 52 which has a D 44 of d 44`:
```sql
                SELECT "r_52" FROM "before_the_elections" WHERE "d_44"='d 44';
```
## Task
Generate a SQL query to answer the following question:
`Name the D 46 which has a D 43 of majority→`

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

CREATE TABLE "before_the_elections" (
  "d_41" text,
  "d_42" text,
  "d_43" text,
  "d_44" text,
  "d_45" text,
  "d_46" text,
  "r_54" text,
  "r_53" text,
  "r_52" text,
  "r_51" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the D 46 which has a D 43 of majority→`:
```sql
                SELECT "d_46" FROM "before_the_elections" WHERE "d_43"='majority→';
```
## Task
Generate a SQL query to answer the following question:
`Name the D 42 which has a D 46 of r 26`

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

CREATE TABLE "before_the_elections" (
  "d_41" text,
  "d_42" text,
  "d_43" text,
  "d_44" text,
  "d_45" text,
  "d_46" text,
  "r_54" text,
  "r_53" text,
  "r_52" text,
  "r_51" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the D 42 which has a D 46 of r 26`:
```sql
                SELECT "d_42" FROM "before_the_elections" WHERE "d_46"='r 26';
```
## Task
Generate a SQL query to answer the following question:
`Name the D 42 which has a D 44 of d 44`

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

CREATE TABLE "before_the_elections" (
  "d_41" text,
  "d_42" text,
  "d_43" text,
  "d_44" text,
  "d_45" text,
  "d_46" text,
  "r_54" text,
  "r_53" text,
  "r_52" text,
  "r_51" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the D 42 which has a D 44 of d 44`:
```sql
                SELECT "d_42" FROM "before_the_elections" WHERE "d_44"='d 44';
```
## Task
Generate a SQL query to answer the following question:
`How many wins did SD Eibar, which played less than 38 games, have?`

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

CREATE TABLE "final_table" (
  "position" real,
  "club" text,
  "played" real,
  "points" real,
  "wins" real,
  "draws" real,
  "losses" real,
  "goals_for" real,
  "goals_against" real,
  "goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins did SD Eibar, which played less than 38 games, have?`:
```sql
                SELECT SUM("wins") FROM "final_table" WHERE "club"='sd eibar' AND "played"<38;
```
## Task
Generate a SQL query to answer the following question:
`What is the highest number of draws a club with less than 20 wins, less than 41 points, and less than 27 goals have?`

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

CREATE TABLE "final_table" (
  "position" real,
  "club" text,
  "played" real,
  "points" real,
  "wins" real,
  "draws" real,
  "losses" real,
  "goals_for" real,
  "goals_against" real,
  "goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of draws a club with less than 20 wins, less than 41 points, and less than 27 goals have?`:
```sql
                SELECT MAX("draws") FROM "final_table" WHERE "wins"<20 AND "points"<41 AND "goals_for"<27;
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest goal difference a club with more than 13 wins, less than 8 losses, and less than 11 draws has?`

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

CREATE TABLE "final_table" (
  "position" real,
  "club" text,
  "played" real,
  "points" real,
  "wins" real,
  "draws" real,
  "losses" real,
  "goals_for" real,
  "goals_against" real,
  "goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest goal difference a club with more than 13 wins, less than 8 losses, and less than 11 draws has?`:
```sql
                SELECT MIN("goal_difference") FROM "final_table" WHERE "wins">13 AND "losses"<8 AND "draws"<11;
```
## Task
Generate a SQL query to answer the following question:
`What is the number of played games a club with more than 71 points and less than 8 losses has?`

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

CREATE TABLE "final_table" (
  "position" real,
  "club" text,
  "played" real,
  "points" real,
  "wins" real,
  "draws" real,
  "losses" real,
  "goals_for" real,
  "goals_against" real,
  "goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of played games a club with more than 71 points and less than 8 losses has?`:
```sql
                SELECT SUM("played") FROM "final_table" WHERE "points">71 AND "losses"<8;
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest goal difference a club with 61 goals against and less than 11 draws has?`

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

CREATE TABLE "final_table" (
  "position" real,
  "club" text,
  "played" real,
  "points" real,
  "wins" real,
  "draws" real,
  "losses" real,
  "goals_for" real,
  "goals_against" real,
  "goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest goal difference a club with 61 goals against and less than 11 draws has?`:
```sql
                SELECT MIN("goal_difference") FROM "final_table" WHERE "goals_against"=61 AND "draws"<11;
```
## Task
Generate a SQL query to answer the following question:
`Which Crowd has a Venue of princes park?`

### 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 `Which Crowd has a Venue of princes park?`:
```sql
                SELECT MIN("crowd") FROM "round_13" WHERE "venue"='princes park';
```
## Task
Generate a SQL query to answer the following question:
`Which Date has an Away team score of 16.13 (109)?`

### 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 `Which Date has an Away team score of 16.13 (109)?`:
```sql
                SELECT "date" FROM "round_13" WHERE "away_team_score"='16.13 (109)';
```
## Task
Generate a SQL query to answer the following question:
`Which Away team has a Venue of mcg?`

### 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 `Which Away team has a Venue of mcg?`:
```sql
                SELECT "away_team" FROM "round_13" WHERE "venue"='mcg';
```
## Task
Generate a SQL query to answer the following question:
`Which average Crowd has a Home team of essendon?`

### 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 `Which average Crowd has a Home team of essendon?`:
```sql
                SELECT AVG("crowd") FROM "round_13" WHERE "home_team"='essendon';
```
## Task
Generate a SQL query to answer the following question:
`When was terry cook picked?`

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

CREATE TABLE "nfl_draft" (
  "pick" real,
  "round" text,
  "player" text,
  "position" text,
  "school" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was terry cook picked?`:
```sql
                SELECT AVG("pick") FROM "nfl_draft" WHERE "player"='terry cook';
```
## Task
Generate a SQL query to answer the following question:
`What position is todd hammel?`

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

CREATE TABLE "nfl_draft" (
  "pick" real,
  "round" text,
  "player" text,
  "position" text,
  "school" text
);
### SQL
Given the database schema, here is the SQL query that answers `What position is todd hammel?`:
```sql
                SELECT "position" FROM "nfl_draft" WHERE "player"='todd hammel';
```
## Task
Generate a SQL query to answer the following question:
`What is the score of the away team that played Essendon?`

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

CREATE TABLE "round_14" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the away team that played Essendon?`:
```sql
                SELECT "away_team_score" FROM "round_14" WHERE "home_team"='essendon';
```
## Task
Generate a SQL query to answer the following question:
`How many people attended the North Melbourne game?`

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

CREATE TABLE "round_14" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people attended the North Melbourne game?`:
```sql
                SELECT AVG("crowd") FROM "round_14" WHERE "home_team"='north melbourne';
```
## Task
Generate a SQL query to answer the following question:
`Where did Carlton play?`

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

CREATE TABLE "round_14" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did Carlton play?`:
```sql
                SELECT "venue" FROM "round_14" WHERE "away_team"='carlton';
```
## Task
Generate a SQL query to answer the following question:
`Which team played at VFL Park?`

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

CREATE TABLE "round_14" (
  "home_team" text,
  "home_team_score" text,
  "away_team" text,
  "away_team_score" text,
  "venue" text,
  "crowd" real,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team played at VFL Park?`:
```sql
                SELECT "home_team" FROM "round_14" WHERE "venue"='vfl park';
```
## Task
Generate a SQL query to answer the following question:
`Which player has a College of arizona?`

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

CREATE TABLE "2007_boys_team" (
  "player" text,
  "height" text,
  "school" text,
  "hometown" text,
  "college" text,
  "nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player has a College of arizona?`:
```sql
                SELECT "player" FROM "2007_boys_team" WHERE "college"='arizona';
```
## Task
Generate a SQL query to answer the following question:
`Which school has a Hometown of phoenix, az?`

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

CREATE TABLE "2007_boys_team" (
  "player" text,
  "height" text,
  "school" text,
  "hometown" text,
  "college" text,
  "nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which school has a Hometown of phoenix, az?`:
```sql
                SELECT "school" FROM "2007_boys_team" WHERE "hometown"='phoenix, az';
```
## Task
Generate a SQL query to answer the following question:
`Which NBA draft has a School of huntington high school?`

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

CREATE TABLE "2007_boys_team" (
  "player" text,
  "height" text,
  "school" text,
  "hometown" text,
  "college" text,
  "nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which NBA draft has a School of huntington high school?`:
```sql
                SELECT "nba_draft" FROM "2007_boys_team" WHERE "school"='huntington high school';
```
## Task
Generate a SQL query to answer the following question:
`Which NBA draft has a School of st. mary's high school?`

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

CREATE TABLE "2007_boys_team" (
  "player" text,
  "height" text,
  "school" text,
  "hometown" text,
  "college" text,
  "nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which NBA draft has a School of st. mary's high school?`:
```sql
                SELECT "nba_draft" FROM "2007_boys_team" WHERE "school"='st. mary''s high school';
```
## Task
Generate a SQL query to answer the following question:
`Which school has a Player of donte greene?`

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

CREATE TABLE "2007_boys_team" (
  "player" text,
  "height" text,
  "school" text,
  "hometown" text,
  "college" text,
  "nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which school has a Player of donte greene?`:
```sql
                SELECT "school" FROM "2007_boys_team" WHERE "player"='donte greene';
```
## Task
Generate a SQL query to answer the following question:
`For R. Magjistari scores over 12, what is the highest number of points?`

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

CREATE TABLE "final_16_december_2007" (
  "draw" real,
  "artist" text,
  "song" text,
  "rank" real,
  "points" real,
  "a_krajka" real,
  "gj_leka" real,
  "b_haxhia" real,
  "d_tukiqi" real,
  "r_magjistari" real,
  "gj_xhuvani" real,
  "a_sk_nderaj" real
);
### SQL
Given the database schema, here is the SQL query that answers `For R. Magjistari scores over 12, what is the highest number of points?`:
```sql
                SELECT MAX("points") FROM "final_16_december_2007" WHERE "r_magjistari">12;
```
## Task
Generate a SQL query to answer the following question:
`For R. Magjistari scores under 6, D. Tukiqi scores of 6, and ranks under 5, what is the average A. Krajka score?`

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

CREATE TABLE "final_16_december_2007" (
  "draw" real,
  "artist" text,
  "song" text,
  "rank" real,
  "points" real,
  "a_krajka" real,
  "gj_leka" real,
  "b_haxhia" real,
  "d_tukiqi" real,
  "r_magjistari" real,
  "gj_xhuvani" real,
  "a_sk_nderaj" real
);
### SQL
Given the database schema, here is the SQL query that answers `For R. Magjistari scores under 6, D. Tukiqi scores of 6, and ranks under 5, what is the average A. Krajka score?`:
```sql
                SELECT AVG("a_krajka") FROM "final_16_december_2007" WHERE "r_magjistari"<6 AND "d_tukiqi"=6 AND "rank"<5;
```
## Task
Generate a SQL query to answer the following question:
`Where did the Vitória de Setúbal club place in the 2006-2007 season?`

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

CREATE TABLE "club_information" (
  "club" text,
  "head_coach" text,
  "city" text,
  "stadium" text,
  "2006_2007_season" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did the Vitória de Setúbal club place in the 2006-2007 season?`:
```sql
                SELECT "2006_2007_season" FROM "club_information" WHERE "club"='vitória de setúbal';
```
## Task
Generate a SQL query to answer the following question:
`Name the total number of TD's for long more than 6 and cars less than 4`

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

CREATE TABLE "running_backs" (
  "player" text,
  "car" real,
  "yards" real,
  "avg" real,
  "td_s" real,
  "long" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of TD's for long more than 6 and cars less than 4`:
```sql
                SELECT COUNT("td_s") FROM "running_backs" WHERE "long">6 AND "car"<4;
```
## Task
Generate a SQL query to answer the following question:
`Name the sum of Long for yards less than 197 and players of matt nagy`

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

CREATE TABLE "running_backs" (
  "player" text,
  "car" real,
  "yards" real,
  "avg" real,
  "td_s" real,
  "long" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sum of Long for yards less than 197 and players of matt nagy`:
```sql
                SELECT SUM("long") FROM "running_backs" WHERE "yards"<197 AND "player"='matt nagy';
```