cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`What team(s) had an outgoing manager of joão alves?`

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

CREATE TABLE "managerial_changes" (
  "team" text,
  "outgoing_manage" text,
  "manner" text,
  "date_of_vacancy" text,
  "incoming_manager" text,
  "date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team(s) had an outgoing manager of joão alves?`:
```sql
                SELECT "team" FROM "managerial_changes" WHERE "outgoing_manage"='João Alves';
```
## Task
Generate a SQL query to answer the following question:
`What day did the job open up when bogićević was outgoing?`

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

CREATE TABLE "managerial_changes" (
  "team" text,
  "outgoing_manage" text,
  "manner" text,
  "date_of_vacancy" text,
  "incoming_manager" text,
  "date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `What day did the job open up when bogićević was outgoing?`:
```sql
                SELECT "date_of_vacancy" FROM "managerial_changes" WHERE "outgoing_manage"='Bogićević';
```
## Task
Generate a SQL query to answer the following question:
`Name the 0-100 km/hs for name of 2.0 8v`

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

CREATE TABLE "engines" (
  "name" text,
  "volume" text,
  "engine" text,
  "fuel" text,
  "output" text,
  "torque" text,
  "engine_id_code_s" text,
  "0_100km_h_s" text,
  "top_speed" text,
  "co_2" text,
  "years" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 0-100 km/hs for name of 2.0 8v`:
```sql
                SELECT "0_100km_h_s" FROM "engines" WHERE "name"='2.0 8v';
```
## Task
Generate a SQL query to answer the following question:
`Name the top speed for 0-100 km/hs for 12.7`

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

CREATE TABLE "engines" (
  "name" text,
  "volume" text,
  "engine" text,
  "fuel" text,
  "output" text,
  "torque" text,
  "engine_id_code_s" text,
  "0_100km_h_s" text,
  "top_speed" text,
  "co_2" text,
  "years" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the top speed for 0-100 km/hs for 12.7`:
```sql
                SELECT "top_speed" FROM "engines" WHERE "0_100km_h_s"='12.7';
```
## Task
Generate a SQL query to answer the following question:
`Name the total number for co 2 for atd/axr`

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

CREATE TABLE "engines" (
  "name" text,
  "volume" text,
  "engine" text,
  "fuel" text,
  "output" text,
  "torque" text,
  "engine_id_code_s" text,
  "0_100km_h_s" text,
  "top_speed" text,
  "co_2" text,
  "years" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number for co 2 for atd/axr`:
```sql
                SELECT COUNT("co_2") FROM "engines" WHERE "engine_id_code_s"='ATD/AXR';
```
## Task
Generate a SQL query to answer the following question:
`Name the volume for co 2 for 168 g/km`

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

CREATE TABLE "engines" (
  "name" text,
  "volume" text,
  "engine" text,
  "fuel" text,
  "output" text,
  "torque" text,
  "engine_id_code_s" text,
  "0_100km_h_s" text,
  "top_speed" text,
  "co_2" text,
  "years" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the volume for co 2 for 168 g/km`:
```sql
                SELECT "volume" FROM "engines" WHERE "co_2"='168 g/km';
```
## Task
Generate a SQL query to answer the following question:
`When 60 is the tries against what is the tries for?`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 60 is the tries against what is the tries for?`:
```sql
                SELECT "tries_for" FROM "league_table" WHERE "tries_against"='60';
```
## Task
Generate a SQL query to answer the following question:
`When 22 is the tries for what is the lost?`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 22 is the tries for what is the lost?`:
```sql
                SELECT "lost" FROM "league_table" WHERE "tries_for"='22';
```
## Task
Generate a SQL query to answer the following question:
`When 98 is the points what is the club?`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 98 is the points what is the club?`:
```sql
                SELECT "club" FROM "league_table" WHERE "points"='98';
```
## Task
Generate a SQL query to answer the following question:
`When 80 is the tries for what is the try bonus?`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 80 is the tries for what is the try bonus?`:
```sql
                SELECT "try_bonus" FROM "league_table" WHERE "tries_for"='80';
```
## Task
Generate a SQL query to answer the following question:
`When 55 is the tries for what is the lost?`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 55 is the tries for what is the lost?`:
```sql
                SELECT "lost" FROM "league_table" WHERE "tries_for"='55';
```
## Task
Generate a SQL query to answer the following question:
`When 17 is the tries for what is the points against?`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 17 is the tries for what is the points against?`:
```sql
                SELECT "points_against" FROM "league_table" WHERE "tries_for"='17';
```
## Task
Generate a SQL query to answer the following question:
`How many draws were there in played games?`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many draws were there in played games?`:
```sql
                SELECT "drawn" FROM "league_table" WHERE "played"='Played';
```
## Task
Generate a SQL query to answer the following question:
`Which club had 2 wins and 1 draw?`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which club had 2 wins and 1 draw?`:
```sql
                SELECT "club" FROM "league_table" WHERE "drawn"='1' AND "won"='2';
```
## Task
Generate a SQL query to answer the following question:
`How many times were there plays with a try of 56?`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many times were there plays with a try of 56?`:
```sql
                SELECT "played" FROM "league_table" WHERE "tries_for"='56';
```
## Task
Generate a SQL query to answer the following question:
`How many tries against were there with points of 150?`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many tries against were there with points of 150?`:
```sql
                SELECT "tries_against" FROM "league_table" WHERE "points_for"='150';
```
## Task
Generate a SQL query to answer the following question:
`What was the losing bonus that had 53 points?`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the losing bonus that had 53 points?`:
```sql
                SELECT "losing_bonus" FROM "league_table" WHERE "points"='53';
```
## Task
Generate a SQL query to answer the following question:
`List all points against with a 0 try bonus and points for of 150.`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `List all points against with a 0 try bonus and points for of 150.`:
```sql
                SELECT "points_against" FROM "league_table" WHERE "try_bonus"='0' AND "points_for"='150';
```
## Task
Generate a SQL query to answer the following question:
`Name the tries against when tries for is 30`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the tries against when tries for is 30`:
```sql
                SELECT "tries_against" FROM "league_table" WHERE "tries_for"='30';
```
## Task
Generate a SQL query to answer the following question:
`Name the points when tries for is 49`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the points when tries for is 49`:
```sql
                SELECT "points" FROM "league_table" WHERE "tries_for"='49';
```
## Task
Generate a SQL query to answer the following question:
`Name the try bonus for lost being 11 and losing bonus is 6`

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

CREATE TABLE "league_table" (
  "club" text,
  "played" text,
  "won" text,
  "drawn" text,
  "lost" text,
  "points_for" text,
  "points_against" text,
  "tries_for" text,
  "tries_against" text,
  "try_bonus" text,
  "losing_bonus" text,
  "points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the try bonus for lost being 11 and losing bonus is 6`:
```sql
                SELECT "try_bonus" FROM "league_table" WHERE "lost"='11' AND "losing_bonus"='6';
```
## Task
Generate a SQL query to answer the following question:
`What is the aggregate when the second leg is 1-3?`

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

CREATE TABLE "knockout_stages" (
  "home_1st_leg" text,
  "home_2nd_leg" text,
  "1st_leg" text,
  "2nd_leg" text,
  "aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the aggregate when the second leg is 1-3?`:
```sql
                SELECT "aggregate" FROM "knockout_stages" WHERE "2nd_leg"='1-3';
```
## Task
Generate a SQL query to answer the following question:
`For home of River Plate, what is the first leg listed?`

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

CREATE TABLE "knockout_stages" (
  "home_1st_leg" text,
  "home_2nd_leg" text,
  "1st_leg" text,
  "2nd_leg" text,
  "aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `For home of River Plate, what is the first leg listed?`:
```sql
                SELECT "1st_leg" FROM "knockout_stages" WHERE "home_2nd_leg"='River Plate';
```
## Task
Generate a SQL query to answer the following question:
`With an aggregate of 0-2, what is listed for home?`

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

CREATE TABLE "knockout_stages" (
  "home_1st_leg" text,
  "home_2nd_leg" text,
  "1st_leg" text,
  "2nd_leg" text,
  "aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `With an aggregate of 0-2, what is listed for home?`:
```sql
                SELECT "home_2nd_leg" FROM "knockout_stages" WHERE "aggregate"='0-2';
```
## Task
Generate a SQL query to answer the following question:
`If the home is Atlético Tucumán, what is the name of the first leg?`

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

CREATE TABLE "knockout_stages" (
  "home_1st_leg" text,
  "home_2nd_leg" text,
  "1st_leg" text,
  "2nd_leg" text,
  "aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the home is Atlético Tucumán, what is the name of the first leg?`:
```sql
                SELECT "1st_leg" FROM "knockout_stages" WHERE "home_2nd_leg"='Atlético Tucumán';
```
## Task
Generate a SQL query to answer the following question:
`If second leg is Newell's Old Boys, what name is first leg?`

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

CREATE TABLE "knockout_stages" (
  "home_1st_leg" text,
  "home_2nd_leg" text,
  "1st_leg" text,
  "2nd_leg" text,
  "aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `If second leg is Newell's Old Boys, what name is first leg?`:
```sql
                SELECT "1st_leg" FROM "knockout_stages" WHERE "home_2nd_leg"='Newell''s Old Boys';
```
## Task
Generate a SQL query to answer the following question:
`What is the chinese name for whom chan chi-yuen, paul is listed as the romanised name?`

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

CREATE TABLE "political_assistants" (
  "romanised_name" text,
  "chinese_name" text,
  "age_at_appointment" real,
  "foreign_nationality" text,
  "portfolio_attachment" text,
  "prior_occupation" text,
  "govt_salary" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the chinese name for whom chan chi-yuen, paul is listed as the romanised name?`:
```sql
                SELECT "chinese_name" FROM "political_assistants" WHERE "romanised_name"='Chan Chi-yuen, Paul';
```
## Task
Generate a SQL query to answer the following question:
`The name cheung, raymond man-to is listed as a romanised name is cheung, raymond man-to?`

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

CREATE TABLE "political_assistants" (
  "romanised_name" text,
  "chinese_name" text,
  "age_at_appointment" real,
  "foreign_nationality" text,
  "portfolio_attachment" text,
  "prior_occupation" text,
  "govt_salary" text
);
### SQL
Given the database schema, here is the SQL query that answers `The name cheung, raymond man-to is listed as a romanised name is cheung, raymond man-to?`:
```sql
                SELECT "foreign_nationality" FROM "political_assistants" WHERE "romanised_name"='Cheung, Raymond Man-to';
```
## Task
Generate a SQL query to answer the following question:
`For the chinese name  盧奕基 how many in total is the govt salary?`

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

CREATE TABLE "political_assistants" (
  "romanised_name" text,
  "chinese_name" text,
  "age_at_appointment" real,
  "foreign_nationality" text,
  "portfolio_attachment" text,
  "prior_occupation" text,
  "govt_salary" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the chinese name  盧奕基 how many in total is the govt salary?`:
```sql
                SELECT COUNT("govt_salary") FROM "political_assistants" WHERE "chinese_name"='盧奕基';
```
## Task
Generate a SQL query to answer the following question:
`For the name romanised name is lo yik-kee, victor what is the total number foreign nationality that is listed?`

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

CREATE TABLE "political_assistants" (
  "romanised_name" text,
  "chinese_name" text,
  "age_at_appointment" real,
  "foreign_nationality" text,
  "portfolio_attachment" text,
  "prior_occupation" text,
  "govt_salary" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the name romanised name is lo yik-kee, victor what is the total number foreign nationality that is listed?`:
```sql
                SELECT COUNT("foreign_nationality") FROM "political_assistants" WHERE "romanised_name"='Lo Yik-kee, Victor';
```
## Task
Generate a SQL query to answer the following question:
`For the prior occupation listed as assistant police commissioner (ret'd) what are the entire list of romanised name. `

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

CREATE TABLE "political_assistants" (
  "romanised_name" text,
  "chinese_name" text,
  "age_at_appointment" real,
  "foreign_nationality" text,
  "portfolio_attachment" text,
  "prior_occupation" text,
  "govt_salary" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the prior occupation listed as assistant police commissioner (ret'd) what are the entire list of romanised name. `:
```sql
                SELECT "romanised_name" FROM "political_assistants" WHERE "prior_occupation"='Assistant Police Commissioner (ret''d)';
```
## Task
Generate a SQL query to answer the following question:
`Name the most played when points is 105`

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

CREATE TABLE "relegation" (
  "team" text,
  "average" text,
  "points" real,
  "played" real,
  "1991_92" text,
  "1992_93" text,
  "1993_94" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most played when points is 105`:
```sql
                SELECT MAX("played") FROM "relegation" WHERE "points"=105;
```
## Task
Generate a SQL query to answer the following question:
`Name the total number of points for newell's old boys`

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

CREATE TABLE "relegation" (
  "team" text,
  "average" text,
  "points" real,
  "played" real,
  "1991_92" text,
  "1992_93" text,
  "1993_94" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of points for newell's old boys`:
```sql
                SELECT COUNT("points") FROM "relegation" WHERE "team"='Newell''s Old Boys';
```
## Task
Generate a SQL query to answer the following question:
`Name the points for 1992-93 for 42`

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

CREATE TABLE "relegation" (
  "team" text,
  "average" text,
  "points" real,
  "played" real,
  "1991_92" text,
  "1992_93" text,
  "1993_94" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the points for 1992-93 for 42`:
```sql
                SELECT "points" FROM "relegation" WHERE "1992_93"='42';
```
## Task
Generate a SQL query to answer the following question:
`If the aggregate is 3-4, what is the first leg?`

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

CREATE TABLE "losers_knockout" (
  "home_1st_leg" text,
  "home_2nd_leg" text,
  "1st_leg" text,
  "2nd_leg" text,
  "aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the aggregate is 3-4, what is the first leg?`:
```sql
                SELECT "home_1st_leg" FROM "losers_knockout" WHERE "aggregate"='3-4';
```
## Task
Generate a SQL query to answer the following question:
`If the second leg is Instituto, what is the total number of aggregate?`

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

CREATE TABLE "losers_knockout" (
  "home_1st_leg" text,
  "home_2nd_leg" text,
  "1st_leg" text,
  "2nd_leg" text,
  "aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the second leg is Instituto, what is the total number of aggregate?`:
```sql
                SELECT COUNT("aggregate") FROM "losers_knockout" WHERE "home_2nd_leg"='Instituto';
```
## Task
Generate a SQL query to answer the following question:
`If the second leg is 1-1, what is the first leg?`

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

CREATE TABLE "losers_knockout" (
  "home_1st_leg" text,
  "home_2nd_leg" text,
  "1st_leg" text,
  "2nd_leg" text,
  "aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the second leg is 1-1, what is the first leg?`:
```sql
                SELECT "home_1st_leg" FROM "losers_knockout" WHERE "2nd_leg"='1-1';
```
## Task
Generate a SQL query to answer the following question:
`If the second leg is 3-2, what is the first leg?`

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

CREATE TABLE "losers_knockout" (
  "home_1st_leg" text,
  "home_2nd_leg" text,
  "1st_leg" text,
  "2nd_leg" text,
  "aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the second leg is 3-2, what is the first leg?`:
```sql
                SELECT "home_1st_leg" FROM "losers_knockout" WHERE "2nd_leg"='3-2';
```
## Task
Generate a SQL query to answer the following question:
`If the second leg is 1-1, what is the first leg?`

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

CREATE TABLE "losers_knockout" (
  "home_1st_leg" text,
  "home_2nd_leg" text,
  "1st_leg" text,
  "2nd_leg" text,
  "aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the second leg is 1-1, what is the first leg?`:
```sql
                SELECT "1st_leg" FROM "losers_knockout" WHERE "2nd_leg"='1-1';
```
## Task
Generate a SQL query to answer the following question:
`How many games were played by the Vélez Sársfield team from 1989-90?`

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

CREATE TABLE "relegation" (
  "team" text,
  "average" text,
  "points" real,
  "played" real,
  "1988_89" text,
  "1989_90" text,
  "1990_1991" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many games were played by the Vélez Sársfield team from 1989-90?`:
```sql
                SELECT "1989_90" FROM "relegation" WHERE "team"='Vélez Sársfield';
```
## Task
Generate a SQL query to answer the following question:
`What was the average of the team if they played 31 games from 1990-1991?`

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

CREATE TABLE "relegation" (
  "team" text,
  "average" text,
  "points" real,
  "played" real,
  "1988_89" text,
  "1989_90" text,
  "1990_1991" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the average of the team if they played 31 games from 1990-1991?`:
```sql
                SELECT "average" FROM "relegation" WHERE "1990_1991"=31;
```
## Task
Generate a SQL query to answer the following question:
`What was the team that scored 122 points?`

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

CREATE TABLE "relegation" (
  "team" text,
  "average" text,
  "points" real,
  "played" real,
  "1988_89" text,
  "1989_90" text,
  "1990_1991" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the team that scored 122 points?`:
```sql
                SELECT "team" FROM "relegation" WHERE "points"=122;
```
## Task
Generate a SQL query to answer the following question:
`What was the average if the game played during 1990-91 is 40 and the points are less than 121.0?`

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

CREATE TABLE "relegation" (
  "team" text,
  "average" text,
  "points" real,
  "played" real,
  "1988_89" text,
  "1989_90" text,
  "1990_1991" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the average if the game played during 1990-91 is 40 and the points are less than 121.0?`:
```sql
                SELECT "average" FROM "relegation" WHERE "1990_1991"=40 AND "points"<121.0;
```
## Task
Generate a SQL query to answer the following question:
`What is the opponent played on October 4?`

### 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,
  "game_site" text,
  "record" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the opponent played on October 4?`:
```sql
                SELECT "opponent" FROM "schedule" WHERE "date"='October 4';
```
## Task
Generate a SQL query to answer the following question:
`Where is riverfront stadium the game site for the week?`

### 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,
  "game_site" text,
  "record" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Where is riverfront stadium the game site for the week?`:
```sql
                SELECT MIN("week") FROM "schedule" WHERE "game_site"='Riverfront Stadium';
```
## Task
Generate a SQL query to answer the following question:
`How many number of lakes are there in the Valdez-Cordova (CA) area?`

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

CREATE TABLE "table1_17978052_2" (
  "num_s_dam_and_gnis_query_link" real,
  "num_s_lake_and_gnis_query_link" real,
  "num_s_reservoir_and_gnis_query_link" real,
  "borough_or_census_area" text,
  "comment" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many number of lakes are there in the Valdez-Cordova (CA) area?`:
```sql
                SELECT MIN("num_s_lake_and_gnis_query_link") FROM "table1_17978052_2" WHERE "borough_or_census_area"='Valdez-Cordova (CA)';
```
## Task
Generate a SQL query to answer the following question:
`What was the comment on the Denali area?`

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

CREATE TABLE "table1_17978052_2" (
  "num_s_dam_and_gnis_query_link" real,
  "num_s_lake_and_gnis_query_link" real,
  "num_s_reservoir_and_gnis_query_link" real,
  "borough_or_census_area" text,
  "comment" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the comment on the Denali area?`:
```sql
                SELECT "comment" FROM "table1_17978052_2" WHERE "borough_or_census_area"='Denali';
```
## Task
Generate a SQL query to answer the following question:
`How many dams are there in the Lake and Peninsula area?`

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

CREATE TABLE "table1_17978052_2" (
  "num_s_dam_and_gnis_query_link" real,
  "num_s_lake_and_gnis_query_link" real,
  "num_s_reservoir_and_gnis_query_link" real,
  "borough_or_census_area" text,
  "comment" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many dams are there in the Lake and Peninsula area?`:
```sql
                SELECT MAX("num_s_dam_and_gnis_query_link") FROM "table1_17978052_2" WHERE "borough_or_census_area"='Lake and Peninsula';
```
## Task
Generate a SQL query to answer the following question:
`How many dams are there in the Nome (CA) area?`

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

CREATE TABLE "table1_17978052_2" (
  "num_s_dam_and_gnis_query_link" real,
  "num_s_lake_and_gnis_query_link" real,
  "num_s_reservoir_and_gnis_query_link" real,
  "borough_or_census_area" text,
  "comment" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many dams are there in the Nome (CA) area?`:
```sql
                SELECT MIN("num_s_dam_and_gnis_query_link") FROM "table1_17978052_2" WHERE "borough_or_census_area"='Nome (CA)';
```
## Task
Generate a SQL query to answer the following question:
`How many comments are there in the Bethel (CA) Borough area?`

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

CREATE TABLE "table1_17978052_2" (
  "num_s_dam_and_gnis_query_link" real,
  "num_s_lake_and_gnis_query_link" real,
  "num_s_reservoir_and_gnis_query_link" real,
  "borough_or_census_area" text,
  "comment" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many comments are there in the Bethel (CA) Borough area?`:
```sql
                SELECT COUNT("comment") FROM "table1_17978052_2" WHERE "borough_or_census_area"='Bethel (CA)';
```
## Task
Generate a SQL query to answer the following question:
`How many total numbers of attendance are there during the game in October 27?`

### 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,
  "game_site" text,
  "record" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many total numbers of attendance are there during the game in October 27?`:
```sql
                SELECT COUNT("attendance") FROM "schedule" WHERE "date"='October 27';
```
## Task
Generate a SQL query to answer the following question:
`What was the game record when the opponent was 'at Los Angeles Raiders'?`

### 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,
  "game_site" text,
  "record" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the game record when the opponent was 'at Los Angeles Raiders'?`:
```sql
                SELECT "record" FROM "schedule" WHERE "opponent"='at Los Angeles Raiders';
```
## Task
Generate a SQL query to answer the following question:
`When was the game played when the opponent was 'at Los Angeles Rams'?`

### 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,
  "game_site" text,
  "record" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `When was the game played when the opponent was 'at Los Angeles Rams'?`:
```sql
                SELECT "date" FROM "schedule" WHERE "opponent"='at Los Angeles Rams';
```
## Task
Generate a SQL query to answer the following question:
`How many total number of attendance were there when the game was held in Anaheim Stadium?`

### 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,
  "game_site" text,
  "record" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many total number of attendance were there when the game was held in Anaheim Stadium?`:
```sql
                SELECT COUNT("attendance") FROM "schedule" WHERE "game_site"='Anaheim Stadium';
```
## Task
Generate a SQL query to answer the following question:
`How many were in attendance when the game was held in Arrowhead Stadium?`

### 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,
  "game_site" text,
  "record" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many were in attendance when the game was held in Arrowhead Stadium?`:
```sql
                SELECT MIN("attendance") FROM "schedule" WHERE "game_site"='Arrowhead Stadium';
```
## Task
Generate a SQL query to answer the following question:
`What is the highest position a team with 7 draws earned?`

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

CREATE TABLE "a_lyga" (
  "position" real,
  "club" text,
  "games_played" real,
  "wins" real,
  "draws" real,
  "loses" real,
  "goals_scored" real,
  "goals_conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest position a team with 7 draws earned?`:
```sql
                SELECT MAX("position") FROM "a_lyga" WHERE "draws"=7;
```
## Task
Generate a SQL query to answer the following question:
`Name the original air date for ai% for 83`

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

CREATE TABLE "table1_18012738_1" (
  "story_no" text,
  "episode" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "uk_viewers_million" text,
  "ai_pct" real,
  "original_air_date" text,
  "production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the original air date for ai% for 83`:
```sql
                SELECT "original_air_date" FROM "table1_18012738_1" WHERE "ai_pct"=83;
```
## Task
Generate a SQL query to answer the following question:
`Name the story number for paul cornell`

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

CREATE TABLE "table1_18012738_1" (
  "story_no" text,
  "episode" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "uk_viewers_million" text,
  "ai_pct" real,
  "original_air_date" text,
  "production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the story number for paul cornell`:
```sql
                SELECT "story_no" FROM "table1_18012738_1" WHERE "written_by"='Paul Cornell';
```
## Task
Generate a SQL query to answer the following question:
`Name the total number directed by for uk viewers being 6.86`

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

CREATE TABLE "table1_18012738_1" (
  "story_no" text,
  "episode" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "uk_viewers_million" text,
  "ai_pct" real,
  "original_air_date" text,
  "production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number directed by for uk viewers being 6.86`:
```sql
                SELECT COUNT("directed_by") FROM "table1_18012738_1" WHERE "uk_viewers_million"='6.86';
```
## Task
Generate a SQL query to answer the following question:
`Name the least ai %`

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

CREATE TABLE "table1_18012738_1" (
  "story_no" text,
  "episode" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "uk_viewers_million" text,
  "ai_pct" real,
  "original_air_date" text,
  "production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least ai %`:
```sql
                SELECT MIN("ai_pct") FROM "table1_18012738_1";
```
## Task
Generate a SQL query to answer the following question:
`What is the highest number of games played?`

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

CREATE TABLE "2_lyga_zone_south" (
  "position" real,
  "club" text,
  "games_played" real,
  "wins" real,
  "draws" real,
  "loses" real,
  "goals_scored" real,
  "goals_conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of games played?`:
```sql
                SELECT MAX("games_played") FROM "2_lyga_zone_south";
```
## Task
Generate a SQL query to answer the following question:
`In the game with 31 points, how many goals were conceded?`

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

CREATE TABLE "2_lyga_zone_south" (
  "position" real,
  "club" text,
  "games_played" real,
  "wins" real,
  "draws" real,
  "loses" real,
  "goals_scored" real,
  "goals_conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `In the game with 31 points, how many goals were conceded?`:
```sql
                SELECT COUNT("goals_conceded") FROM "2_lyga_zone_south" WHERE "points"=31;
```
## Task
Generate a SQL query to answer the following question:
`How many games had 22 points?`

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

CREATE TABLE "2_lyga_zone_south" (
  "position" real,
  "club" text,
  "games_played" real,
  "wins" real,
  "draws" real,
  "loses" real,
  "goals_scored" real,
  "goals_conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many games had 22 points?`:
```sql
                SELECT COUNT("games_played") FROM "2_lyga_zone_south" WHERE "points"=22;
```
## Task
Generate a SQL query to answer the following question:
`How many wins had 58 goals scored?`

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

CREATE TABLE "farm_team_league" (
  "position" real,
  "club" text,
  "games_played" real,
  "wins" real,
  "draws" real,
  "loses" real,
  "goals_scored" real,
  "goals_conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins had 58 goals scored?`:
```sql
                SELECT "wins" FROM "farm_team_league" WHERE "goals_scored"=58;
```
## Task
Generate a SQL query to answer the following question:
`How many clubs had 29 points?`

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

CREATE TABLE "farm_team_league" (
  "position" real,
  "club" text,
  "games_played" real,
  "wins" real,
  "draws" real,
  "loses" real,
  "goals_scored" real,
  "goals_conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many clubs had 29 points?`:
```sql
                SELECT COUNT("club") FROM "farm_team_league" WHERE "points"=29;
```
## Task
Generate a SQL query to answer the following question:
`Which clubs had draws of 9?`

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

CREATE TABLE "farm_team_league" (
  "position" real,
  "club" text,
  "games_played" real,
  "wins" real,
  "draws" real,
  "loses" real,
  "goals_scored" real,
  "goals_conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which clubs had draws of 9?`:
```sql
                SELECT "club" FROM "farm_team_league" WHERE "draws"=9;
```
## Task
Generate a SQL query to answer the following question:
`How many draws were there when the conceded goals was numbered at 45?`

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

CREATE TABLE "farm_team_league" (
  "position" real,
  "club" text,
  "games_played" real,
  "wins" real,
  "draws" real,
  "loses" real,
  "goals_scored" real,
  "goals_conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many draws were there when the conceded goals was numbered at 45?`:
```sql
                SELECT COUNT("draws") FROM "farm_team_league" WHERE "goals_conceded"=45;
```
## Task
Generate a SQL query to answer the following question:
`What is the least amount of games played with 21 losses?`

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

CREATE TABLE "farm_team_league" (
  "position" real,
  "club" text,
  "games_played" real,
  "wins" real,
  "draws" real,
  "loses" real,
  "goals_scored" real,
  "goals_conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least amount of games played with 21 losses?`:
```sql
                SELECT MIN("games_played") FROM "farm_team_league" WHERE "loses"=21;
```
## Task
Generate a SQL query to answer the following question:
`How many games did each team played?`

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

CREATE TABLE "2_lyga_zone_east" (
  "position" real,
  "club" text,
  "games_played" real,
  "wins" real,
  "draws" real,
  "loses" real,
  "goals_scored" real,
  "goals_conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many games did each team played?`:
```sql
                SELECT MIN("games_played") FROM "2_lyga_zone_east";
```
## Task
Generate a SQL query to answer the following question:
`HOw many points where there when the number of goals scored was 47?`

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

CREATE TABLE "2_lyga_zone_east" (
  "position" real,
  "club" text,
  "games_played" real,
  "wins" real,
  "draws" real,
  "loses" real,
  "goals_scored" real,
  "goals_conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `HOw many points where there when the number of goals scored was 47?`:
```sql
                SELECT MAX("points") FROM "2_lyga_zone_east" WHERE "goals_scored"=47;
```
## Task
Generate a SQL query to answer the following question:
`How many goals were scored by club team fm (losc) vilnius`

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

CREATE TABLE "2_lyga_zone_east" (
  "position" real,
  "club" text,
  "games_played" real,
  "wins" real,
  "draws" real,
  "loses" real,
  "goals_scored" real,
  "goals_conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many goals were scored by club team fm (losc) vilnius`:
```sql
                SELECT "goals_scored" FROM "2_lyga_zone_east" WHERE "club"='FM (LOSC) Vilnius';
```
## Task
Generate a SQL query to answer the following question:
`How many losses occurred when the club team was ekranas-2 panevėžys`

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

CREATE TABLE "2_lyga_zone_east" (
  "position" real,
  "club" text,
  "games_played" real,
  "wins" real,
  "draws" real,
  "loses" real,
  "goals_scored" real,
  "goals_conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many losses occurred when the club team was ekranas-2 panevėžys`:
```sql
                SELECT MAX("loses") FROM "2_lyga_zone_east" WHERE "club"='Ekranas-2 Panevėžys';
```
## Task
Generate a SQL query to answer the following question:
`What was the highest number of wins for any team?`

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

CREATE TABLE "2_lyga_zone_east" (
  "position" real,
  "club" text,
  "games_played" real,
  "wins" real,
  "draws" real,
  "loses" real,
  "goals_scored" real,
  "goals_conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the highest number of wins for any team?`:
```sql
                SELECT MAX("wins") FROM "2_lyga_zone_east";
```
## Task
Generate a SQL query to answer the following question:
`What is the June 22 ncaat baseball record for Fresno State Bulldogs?`

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

CREATE TABLE "schedule_results" (
  "num" real,
  "date" text,
  "opponent" text,
  "score" text,
  "site_stadium" text,
  "win" text,
  "loss" text,
  "save" text,
  "attendance" real,
  "overall_record" text,
  "ncaat_record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the June 22 ncaat baseball record for Fresno State Bulldogs?`:
```sql
                SELECT "ncaat_record" FROM "schedule_results" WHERE "date"='June 22';
```
## Task
Generate a SQL query to answer the following question:
`How many saves were in the Georgia game, versus the Bulldogs, with a score of 7-6?`

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

CREATE TABLE "schedule_results" (
  "num" real,
  "date" text,
  "opponent" text,
  "score" text,
  "site_stadium" text,
  "win" text,
  "loss" text,
  "save" text,
  "attendance" real,
  "overall_record" text,
  "ncaat_record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many saves were in the Georgia game, versus the Bulldogs, with a score of 7-6?`:
```sql
                SELECT "save" FROM "schedule_results" WHERE "score"='7-6';
```