cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`Which Points 1 has Drawn of 5, and a Goal Difference of +58, and a Lost larger than 4?`

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

CREATE TABLE "third_division_final_table" (
  "position" real,
  "team" text,
  "played" real,
  "drawn" real,
  "lost" real,
  "goals_for" real,
  "goals_against" real,
  "goal_difference" text,
  "points_1" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Points 1 has Drawn of 5, and a Goal Difference of +58, and a Lost larger than 4?`:
```sql
                SELECT MAX("points_1") FROM "third_division_final_table" WHERE "drawn"=5 AND "goal_difference"='+58' AND "lost">4;
```
## Task
Generate a SQL query to answer the following question:
`Which Lost has Goals Against larger than 92?`

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

CREATE TABLE "third_division_final_table" (
  "position" real,
  "team" text,
  "played" real,
  "drawn" real,
  "lost" real,
  "goals_for" real,
  "goals_against" real,
  "goal_difference" text,
  "points_1" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Lost has Goals Against larger than 92?`:
```sql
                SELECT MAX("lost") FROM "third_division_final_table" WHERE "goals_against">92;
```
## Task
Generate a SQL query to answer the following question:
`Which Points 1 has a Team of atherton collieries, and a Position smaller than 8?`

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

CREATE TABLE "third_division_final_table" (
  "position" real,
  "team" text,
  "played" real,
  "drawn" real,
  "lost" real,
  "goals_for" real,
  "goals_against" real,
  "goal_difference" text,
  "points_1" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Points 1 has a Team of atherton collieries, and a Position smaller than 8?`:
```sql
                SELECT MAX("points_1") FROM "third_division_final_table" WHERE "team"='atherton collieries' AND "position"<8;
```
## Task
Generate a SQL query to answer the following question:
`How much Played has a Position of 7, and a Drawn smaller than 7?`

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

CREATE TABLE "third_division_final_table" (
  "position" real,
  "team" text,
  "played" real,
  "drawn" real,
  "lost" real,
  "goals_for" real,
  "goals_against" real,
  "goal_difference" text,
  "points_1" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much Played has a Position of 7, and a Drawn smaller than 7?`:
```sql
                SELECT SUM("played") FROM "third_division_final_table" WHERE "position"=7 AND "drawn"<7;
```
## Task
Generate a SQL query to answer the following question:
`How much Drawn has Points 1 of 51, and a Lost larger than 5?`

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

CREATE TABLE "third_division_final_table" (
  "position" real,
  "team" text,
  "played" real,
  "drawn" real,
  "lost" real,
  "goals_for" real,
  "goals_against" real,
  "goal_difference" text,
  "points_1" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much Drawn has Points 1 of 51, and a Lost larger than 5?`:
```sql
                SELECT COUNT("drawn") FROM "third_division_final_table" WHERE "points_1"=51 AND "lost">5;
```
## Task
Generate a SQL query to answer the following question:
`When was the aircraft introduced that could seat 115 people?`

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

CREATE TABLE "fleet_history" (
  "aircraft" text,
  "introduced" real,
  "retired" text,
  "seating" text,
  "notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the aircraft introduced that could seat 115 people?`:
```sql
                SELECT AVG("introduced") FROM "fleet_history" WHERE "seating"='115';
```
## Task
Generate a SQL query to answer the following question:
`What year was the aircraft retired when it was replaced by 737-300s?`

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

CREATE TABLE "fleet_history" (
  "aircraft" text,
  "introduced" real,
  "retired" text,
  "seating" text,
  "notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was the aircraft retired when it was replaced by 737-300s?`:
```sql
                SELECT "retired" FROM "fleet_history" WHERE "notes"='replaced by 737-300s';
```
## Task
Generate a SQL query to answer the following question:
`What aircraft was introduced in 2004 and has a retired of —?`

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

CREATE TABLE "fleet_history" (
  "aircraft" text,
  "introduced" real,
  "retired" text,
  "seating" text,
  "notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What aircraft was introduced in 2004 and has a retired of —?`:
```sql
                SELECT "aircraft" FROM "fleet_history" WHERE "retired"='—' AND "introduced"=2004;
```
## Task
Generate a SQL query to answer the following question:
`Which aircraft has 148/9 seating?`

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

CREATE TABLE "fleet_history" (
  "aircraft" text,
  "introduced" real,
  "retired" text,
  "seating" text,
  "notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which aircraft has 148/9 seating?`:
```sql
                SELECT "aircraft" FROM "fleet_history" WHERE "seating"='148/9';
```
## Task
Generate a SQL query to answer the following question:
`How many people can be seated on the aircraft that was introduced in 2008 and has notes of in service?`

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

CREATE TABLE "fleet_history" (
  "aircraft" text,
  "introduced" real,
  "retired" text,
  "seating" text,
  "notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people can be seated on the aircraft that was introduced in 2008 and has notes of in service?`:
```sql
                SELECT "seating" FROM "fleet_history" WHERE "notes"='in service' AND "introduced"=2008;
```
## Task
Generate a SQL query to answer the following question:
`What is the nationality of the player who was previously with the Detroit Pistons?`

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

CREATE TABLE "selections" (
  "player" text,
  "pos" text,
  "nationality" text,
  "previous_team" text,
  "years_of_nba_experience_a" real,
  "career_with_the_franchise" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the nationality of the player who was previously with the Detroit Pistons?`:
```sql
                SELECT "nationality" FROM "selections" WHERE "previous_team"='detroit pistons';
```
## Task
Generate a SQL query to answer the following question:
`What is the career with the franchise of the f/c player with fewer than 9 years of NBA experience who previously played for the Phoenix Suns?`

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

CREATE TABLE "selections" (
  "player" text,
  "pos" text,
  "nationality" text,
  "previous_team" text,
  "years_of_nba_experience_a" real,
  "career_with_the_franchise" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the career with the franchise of the f/c player with fewer than 9 years of NBA experience who previously played for the Phoenix Suns?`:
```sql
                SELECT "career_with_the_franchise" FROM "selections" WHERE "years_of_nba_experience_a"<9 AND "pos"='f/c' AND "previous_team"='phoenix suns';
```
## Task
Generate a SQL query to answer the following question:
`What was the tie number when Bournemouth was the home team?`

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

CREATE TABLE "fifth_round_proper" (
  "tie_no" text,
  "home_team" text,
  "score" text,
  "away_team" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the tie number when Bournemouth was the home team?`:
```sql
                SELECT "tie_no" FROM "fifth_round_proper" WHERE "home_team"='bournemouth';
```
## Task
Generate a SQL query to answer the following question:
`Who was the away team when the home team was Norwich City?`

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

CREATE TABLE "fifth_round_proper" (
  "tie_no" text,
  "home_team" text,
  "score" text,
  "away_team" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the away team when the home team was Norwich City?`:
```sql
                SELECT "away_team" FROM "fifth_round_proper" WHERE "home_team"='norwich city';
```
## Task
Generate a SQL query to answer the following question:
`On what date was Wimbledon the home team?`

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

CREATE TABLE "fifth_round_proper" (
  "tie_no" text,
  "home_team" text,
  "score" text,
  "away_team" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was Wimbledon the home team?`:
```sql
                SELECT "date" FROM "fifth_round_proper" WHERE "home_team"='wimbledon';
```
## Task
Generate a SQL query to answer the following question:
`On what date was the away team West Ham United?`

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

CREATE TABLE "fifth_round_proper" (
  "tie_no" text,
  "home_team" text,
  "score" text,
  "away_team" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was the away team West Ham United?`:
```sql
                SELECT "date" FROM "fifth_round_proper" WHERE "away_team"='west ham united';
```
## Task
Generate a SQL query to answer the following question:
`On what date was the away team Bournemouth?`

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

CREATE TABLE "fifth_round_proper" (
  "tie_no" text,
  "home_team" text,
  "score" text,
  "away_team" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was the away team Bournemouth?`:
```sql
                SELECT "date" FROM "fifth_round_proper" WHERE "away_team"='bournemouth';
```
## Task
Generate a SQL query to answer the following question:
`What district has abhayapuri south as the name?`

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

CREATE TABLE "assembly_segments" (
  "constituency_number" real,
  "name" text,
  "reserved_for_sc_st_none" text,
  "district" text,
  "electorates_2011" real
);
### SQL
Given the database schema, here is the SQL query that answers `What district has abhayapuri south as the name?`:
```sql
                SELECT "district" FROM "assembly_segments" WHERE "name"='abhayapuri south';
```
## Task
Generate a SQL query to answer the following question:
`Which Bronze has a Gold larger than 1, and a Silver smaller than 3, and a Rank smaller than 5?`

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

CREATE TABLE "performances_by_nation" (
  "rank" real,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Bronze has a Gold larger than 1, and a Silver smaller than 3, and a Rank smaller than 5?`:
```sql
                SELECT "bronze" FROM "performances_by_nation" WHERE "gold">1 AND "silver"<3 AND "rank"<5;
```
## Task
Generate a SQL query to answer the following question:
`Which Rank has a Gold larger than 1, and a Bronze of 4, and a Silver smaller than 1?`

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

CREATE TABLE "performances_by_nation" (
  "rank" real,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank has a Gold larger than 1, and a Bronze of 4, and a Silver smaller than 1?`:
```sql
                SELECT MAX("rank") FROM "performances_by_nation" WHERE "gold">1 AND "bronze"=4 AND "silver"<1;
```
## Task
Generate a SQL query to answer the following question:
`Which Rank has a Gold of 3, and a Bronze of 4, and a Total larger than 8?`

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

CREATE TABLE "performances_by_nation" (
  "rank" real,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank has a Gold of 3, and a Bronze of 4, and a Total larger than 8?`:
```sql
                SELECT MIN("rank") FROM "performances_by_nation" WHERE "gold"=3 AND "bronze"=4 AND "total">8;
```
## Task
Generate a SQL query to answer the following question:
`How much Total has a Rank smaller than 10, and a Silver larger than 3, and a Gold larger than 3?`

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

CREATE TABLE "performances_by_nation" (
  "rank" real,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much Total has a Rank smaller than 10, and a Silver larger than 3, and a Gold larger than 3?`:
```sql
                SELECT SUM("total") FROM "performances_by_nation" WHERE "rank"<10 AND "silver">3 AND "gold">3;
```
## Task
Generate a SQL query to answer the following question:
`Which Total has a Rank of 9, and a Silver smaller than 2?`

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

CREATE TABLE "performances_by_nation" (
  "rank" real,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Total has a Rank of 9, and a Silver smaller than 2?`:
```sql
                SELECT MAX("total") FROM "performances_by_nation" WHERE "rank"=9 AND "silver"<2;
```
## Task
Generate a SQL query to answer the following question:
`What event had Xu Zhilin competing?`

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

CREATE TABLE "medalists" (
  "medal" text,
  "name" text,
  "sport" text,
  "event" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What event had Xu Zhilin competing?`:
```sql
                SELECT "event" FROM "medalists" WHERE "name"='xu zhilin';
```
## Task
Generate a SQL query to answer the following question:
`What sport has Ma Yuxi in it?`

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

CREATE TABLE "medalists" (
  "medal" text,
  "name" text,
  "sport" text,
  "event" text,
  "date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What sport has Ma Yuxi in it?`:
```sql
                SELECT "sport" FROM "medalists" WHERE "name"='ma yuxi';
```
## Task
Generate a SQL query to answer the following question:
`How many years is Antonio Pompa-Baldi Italy first?`

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

CREATE TABLE "table_showing_prize_winners_from_the_cle" (
  "year" real,
  "first" text,
  "second" text,
  "third" text,
  "fourth" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years is Antonio Pompa-Baldi Italy first?`:
```sql
                SELECT COUNT("year") FROM "table_showing_prize_winners_from_the_cle" WHERE "first"='antonio pompa-baldi italy';
```
## Task
Generate a SQL query to answer the following question:
`Who is fourth when Anders Martinson USA is second?`

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

CREATE TABLE "table_showing_prize_winners_from_the_cle" (
  "year" real,
  "first" text,
  "second" text,
  "third" text,
  "fourth" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is fourth when Anders Martinson USA is second?`:
```sql
                SELECT "fourth" FROM "table_showing_prize_winners_from_the_cle" WHERE "second"='anders martinson usa';
```
## Task
Generate a SQL query to answer the following question:
`Can you tell me the sum of Wins that has the Club of abuls smiltene, and the Goals smaller than 18?`

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

CREATE TABLE "league_standings" (
  "position" real,
  "club" text,
  "played" real,
  "wins" real,
  "draws" real,
  "losses" real,
  "goals_for" real,
  "goals_against" real,
  "points" real,
  "goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the sum of Wins that has the Club of abuls smiltene, and the Goals smaller than 18?`:
```sql
                SELECT SUM("wins") FROM "league_standings" WHERE "club"='abuls smiltene' AND "goals_for"<18;
```
## Task
Generate a SQL query to answer the following question:
`Can you tell me the average Wins that has the Goal Difference larger than -24, and the Draws larger than 7?`

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

CREATE TABLE "league_standings" (
  "position" real,
  "club" text,
  "played" real,
  "wins" real,
  "draws" real,
  "losses" real,
  "goals_for" real,
  "goals_against" real,
  "points" real,
  "goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the average Wins that has the Goal Difference larger than -24, and the Draws larger than 7?`:
```sql
                SELECT AVG("wins") FROM "league_standings" WHERE "goal_difference">-24 AND "draws">7;
```
## Task
Generate a SQL query to answer the following question:
`Can you tell me the highest Draws that has the Goal Difference smaller than 64, and the Played larger than 30?`

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

CREATE TABLE "league_standings" (
  "position" real,
  "club" text,
  "played" real,
  "wins" real,
  "draws" real,
  "losses" real,
  "goals_for" real,
  "goals_against" real,
  "points" real,
  "goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the highest Draws that has the Goal Difference smaller than 64, and the Played larger than 30?`:
```sql
                SELECT MAX("draws") FROM "league_standings" WHERE "goal_difference"<64 AND "played">30;
```
## Task
Generate a SQL query to answer the following question:
`Can you tell me the highest Points that has the Played smaller than 30?`

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

CREATE TABLE "league_standings" (
  "position" real,
  "club" text,
  "played" real,
  "wins" real,
  "draws" real,
  "losses" real,
  "goals_for" real,
  "goals_against" real,
  "points" real,
  "goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the highest Points that has the Played smaller than 30?`:
```sql
                SELECT MAX("points") FROM "league_standings" WHERE "played"<30;
```
## Task
Generate a SQL query to answer the following question:
`What rank was the country with no bronze but at least 1 silver medals?`

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

CREATE TABLE "medal_count" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What rank was the country with no bronze but at least 1 silver medals?`:
```sql
                SELECT AVG("rank") FROM "medal_count" WHERE "bronze"<1 AND "silver">1;
```
## Task
Generate a SQL query to answer the following question:
`What is the smallest number of gold medals a country with 1 bronze, and a total of 3 medals which is lower than rank 7?`

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

CREATE TABLE "medal_count" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest number of gold medals a country with 1 bronze, and a total of 3 medals which is lower than rank 7?`:
```sql
                SELECT MIN("gold") FROM "medal_count" WHERE "bronze"=1 AND "total"=3 AND "rank">7;
```
## Task
Generate a SQL query to answer the following question:
`What is the smallest number of gold medals a country with 7 medals has?`

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

CREATE TABLE "medal_count" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest number of gold medals a country with 7 medals has?`:
```sql
                SELECT MIN("gold") FROM "medal_count" WHERE "total"=7;
```
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Host City that has the Games of vii?`

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

CREATE TABLE "venues" (
  "games" text,
  "year" real,
  "host_city" text,
  "province" text,
  "dates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Host City that has the Games of vii?`:
```sql
                SELECT "host_city" FROM "venues" WHERE "games"='vii';
```
## Task
Generate a SQL query to answer the following question:
`What was the nominated work after 2006, that was awarded the Drama Desk award and the Outstanding featured actor in a musical?`

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

CREATE TABLE "awards_and_nominations" (
  "year" real,
  "award" text,
  "category" text,
  "nominated_work" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the nominated work after 2006, that was awarded the Drama Desk award and the Outstanding featured actor in a musical?`:
```sql
                SELECT "nominated_work" FROM "awards_and_nominations" WHERE "year">2006 AND "award"='drama desk award' AND "category"='outstanding featured actor in a musical';
```
## Task
Generate a SQL query to answer the following question:
`What year was Evita nominated for outstanding featured actor in a musical?`

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

CREATE TABLE "awards_and_nominations" (
  "year" real,
  "award" text,
  "category" text,
  "nominated_work" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was Evita nominated for outstanding featured actor in a musical?`:
```sql
                SELECT COUNT("year") FROM "awards_and_nominations" WHERE "category"='outstanding featured actor in a musical' AND "nominated_work"='evita';
```
## Task
Generate a SQL query to answer the following question:
`What was the nominated work, nominated for the drama league award before 2007?`

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

CREATE TABLE "awards_and_nominations" (
  "year" real,
  "award" text,
  "category" text,
  "nominated_work" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the nominated work, nominated for the drama league award before 2007?`:
```sql
                SELECT "nominated_work" FROM "awards_and_nominations" WHERE "result"='nominated' AND "award"='drama league award' AND "year"<2007;
```
## Task
Generate a SQL query to answer the following question:
`Who had the pole position on 7 August?`

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

CREATE TABLE "race_calendar_and_winners" (
  "round" real,
  "circuit" text,
  "date" text,
  "pole_position" text,
  "fastest_lap" text,
  "winning_driver" text,
  "winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had the pole position on 7 August?`:
```sql
                SELECT "pole_position" FROM "race_calendar_and_winners" WHERE "date"='7 august';
```
## Task
Generate a SQL query to answer the following question:
`Who was the winning team at Zandvoort?`

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

CREATE TABLE "race_calendar_and_winners" (
  "round" real,
  "circuit" text,
  "date" text,
  "pole_position" text,
  "fastest_lap" text,
  "winning_driver" text,
  "winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the winning team at Zandvoort?`:
```sql
                SELECT "winning_team" FROM "race_calendar_and_winners" WHERE "circuit"='zandvoort';
```
## Task
Generate a SQL query to answer the following question:
`Which Losses have Wins smaller than 6, and a South West DFL of sandford?`

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

CREATE TABLE "2010_ladder" (
  "south_west_dfl" text,
  "wins" real,
  "byes" real,
  "losses" real,
  "draws" real,
  "against" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Losses have Wins smaller than 6, and a South West DFL of sandford?`:
```sql
                SELECT MIN("losses") FROM "2010_ladder" WHERE "wins"<6 AND "south_west_dfl"='sandford';
```
## Task
Generate a SQL query to answer the following question:
`How much Against has Draws of 2, and Losses smaller than 4?`

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

CREATE TABLE "2010_ladder" (
  "south_west_dfl" text,
  "wins" real,
  "byes" real,
  "losses" real,
  "draws" real,
  "against" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much Against has Draws of 2, and Losses smaller than 4?`:
```sql
                SELECT SUM("against") FROM "2010_ladder" WHERE "draws"=2 AND "losses"<4;
```
## Task
Generate a SQL query to answer the following question:
`How many Losses have South West DFL of coleraine, and an Against smaller than 891?`

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

CREATE TABLE "2010_ladder" (
  "south_west_dfl" text,
  "wins" real,
  "byes" real,
  "losses" real,
  "draws" real,
  "against" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Losses have South West DFL of coleraine, and an Against smaller than 891?`:
```sql
                SELECT COUNT("losses") FROM "2010_ladder" WHERE "south_west_dfl"='coleraine' AND "against"<891;
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest played number when goals for is 47, and wins is smaller than 14?`

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

CREATE TABLE "group_i" (
  "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 played number when goals for is 47, and wins is smaller than 14?`:
```sql
                SELECT MIN("played") FROM "group_i" WHERE "goals_for"=47 AND "wins"<14;
```
## Task
Generate a SQL query to answer the following question:
`What Club has 13 wins, goals against less than 48, and a position of 4?`

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

CREATE TABLE "group_i" (
  "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 Club has 13 wins, goals against less than 48, and a position of 4?`:
```sql
                SELECT "club" FROM "group_i" WHERE "wins"=13 AND "goals_against"<48 AND "position"=4;
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest position number when goals against was 59, and a goals for is smaller than 24?`

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

CREATE TABLE "group_i" (
  "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 position number when goals against was 59, and a goals for is smaller than 24?`:
```sql
                SELECT MIN("position") FROM "group_i" WHERE "goals_against"=59 AND "goals_for"<24;
```
## Task
Generate a SQL query to answer the following question:
`What is the highest goals against when points are larger than 31, the goal difference is smaller than 9, wins are 13, and draws are larger than 6?`

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

CREATE TABLE "group_i" (
  "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 goals against when points are larger than 31, the goal difference is smaller than 9, wins are 13, and draws are larger than 6?`:
```sql
                SELECT MAX("goals_against") FROM "group_i" WHERE "points">31 AND "goal_difference"<9 AND "wins"=13 AND "draws">6;
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest played number when points are larger than 32, and a wins are larger than 18?`

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

CREATE TABLE "group_i" (
  "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 played number when points are larger than 32, and a wins are larger than 18?`:
```sql
                SELECT MIN("played") FROM "group_i" WHERE "points">32 AND "wins">18;
```
## Task
Generate a SQL query to answer the following question:
`Can you tell me the highest Against that has the Status of six nations, and the Date of 02/03/2002?`

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

CREATE TABLE "2002" (
  "opposing_teams" text,
  "against" real,
  "date" text,
  "venue" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the highest Against that has the Status of six nations, and the Date of 02/03/2002?`:
```sql
                SELECT MAX("against") FROM "2002" WHERE "status"='six nations' AND "date"='02/03/2002';
```
## Task
Generate a SQL query to answer the following question:
`Can you tell me the average Against thaylt has the Date of 23/03/2002?`

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

CREATE TABLE "2002" (
  "opposing_teams" text,
  "against" real,
  "date" text,
  "venue" text,
  "status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the average Against thaylt has the Date of 23/03/2002?`:
```sql
                SELECT AVG("against") FROM "2002" WHERE "date"='23/03/2002';
```
## Task
Generate a SQL query to answer the following question:
`What is the population of area of 11?`

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

CREATE TABLE "subdivisions" (
  "english_name" text,
  "simplified" text,
  "traditional" text,
  "pinyin" text,
  "area" text,
  "population" text,
  "density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the population of area of 11?`:
```sql
                SELECT "population" FROM "subdivisions" WHERE "area"='11';
```
## Task
Generate a SQL query to answer the following question:
`What shows for traditional when the population was 44,803?`

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

CREATE TABLE "subdivisions" (
  "english_name" text,
  "simplified" text,
  "traditional" text,
  "pinyin" text,
  "area" text,
  "population" text,
  "density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What shows for traditional when the population was 44,803?`:
```sql
                SELECT "traditional" FROM "subdivisions" WHERE "population"='44,803';
```
## Task
Generate a SQL query to answer the following question:
`What is the population when the area is 4,575?`

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

CREATE TABLE "subdivisions" (
  "english_name" text,
  "simplified" text,
  "traditional" text,
  "pinyin" text,
  "area" text,
  "population" text,
  "density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the population when the area is 4,575?`:
```sql
                SELECT "population" FROM "subdivisions" WHERE "area"='4,575';
```
## Task
Generate a SQL query to answer the following question:
`What shows for simplified when the density is 52?`

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

CREATE TABLE "subdivisions" (
  "english_name" text,
  "simplified" text,
  "traditional" text,
  "pinyin" text,
  "area" text,
  "population" text,
  "density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What shows for simplified when the density is 52?`:
```sql
                SELECT "simplified" FROM "subdivisions" WHERE "density"='52';
```
## Task
Generate a SQL query to answer the following question:
`What is the density when simplified shows 南山区?`

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

CREATE TABLE "subdivisions" (
  "english_name" text,
  "simplified" text,
  "traditional" text,
  "pinyin" text,
  "area" text,
  "population" text,
  "density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the density when simplified shows 南山区?`:
```sql
                SELECT "density" FROM "subdivisions" WHERE "simplified"='南山区';
```
## Task
Generate a SQL query to answer the following question:
`What is the pinyin when the simplified shows 南山区?`

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

CREATE TABLE "subdivisions" (
  "english_name" text,
  "simplified" text,
  "traditional" text,
  "pinyin" text,
  "area" text,
  "population" text,
  "density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the pinyin when the simplified shows 南山区?`:
```sql
                SELECT "pinyin" FROM "subdivisions" WHERE "simplified"='南山区';
```
## Task
Generate a SQL query to answer the following question:
`What country does Greg Norman represent?`

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

CREATE TABLE "made_the_cut" (
  "player" text,
  "country" text,
  "year_s_won" text,
  "total" real,
  "to_par" text,
  "finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country does Greg Norman represent?`:
```sql
                SELECT "country" FROM "made_the_cut" WHERE "player"='greg norman';
```
## Task
Generate a SQL query to answer the following question:
`What years won have a total of 286?`

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

CREATE TABLE "made_the_cut" (
  "player" text,
  "country" text,
  "year_s_won" text,
  "total" real,
  "to_par" text,
  "finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `What years won have a total of 286?`:
```sql
                SELECT "year_s_won" FROM "made_the_cut" WHERE "total"=286;
```
## Task
Generate a SQL query to answer the following question:
`Which player had a total of 295?`

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

CREATE TABLE "made_the_cut" (
  "player" text,
  "country" text,
  "year_s_won" text,
  "total" real,
  "to_par" text,
  "finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player had a total of 295?`:
```sql
                SELECT "player" FROM "made_the_cut" WHERE "total"=295;
```
## Task
Generate a SQL query to answer the following question:
`What is the To par when there was a total of 291?`

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

CREATE TABLE "made_the_cut" (
  "player" text,
  "country" text,
  "year_s_won" text,
  "total" real,
  "to_par" text,
  "finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the To par when there was a total of 291?`:
```sql
                SELECT "to_par" FROM "made_the_cut" WHERE "total"=291;
```
## Task
Generate a SQL query to answer the following question:
`What is the year of daylight service when the builder was Alco?`

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

CREATE TABLE "locomotives" (
  "builder" text,
  "model" text,
  "years_of_daylight_service" text,
  "retired" text,
  "current_disposition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the year of daylight service when the builder was Alco?`:
```sql
                SELECT "years_of_daylight_service" FROM "locomotives" WHERE "builder"='alco';
```
## Task
Generate a SQL query to answer the following question:
`What is 2006-07 Season, when Team is "KF Fushë Kosova"?`

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

CREATE TABLE "teams" (
  "team" text,
  "club_home_city" text,
  "2006_07_season" text,
  "stadium" text,
  "stadium_capacity" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 2006-07 Season, when Team is "KF Fushë Kosova"?`:
```sql
                SELECT "2006_07_season" FROM "teams" WHERE "team"='kf fushë kosova';
```
## Task
Generate a SQL query to answer the following question:
`What is 2006-07 Season, when Stadium Capacity is "0 2,500"?`

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

CREATE TABLE "teams" (
  "team" text,
  "club_home_city" text,
  "2006_07_season" text,
  "stadium" text,
  "stadium_capacity" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 2006-07 Season, when Stadium Capacity is "0 2,500"?`:
```sql
                SELECT "2006_07_season" FROM "teams" WHERE "stadium_capacity"='0 2,500';
```
## Task
Generate a SQL query to answer the following question:
`What is Stadium Capacity, when 2006-07 Season is "12th"?`

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

CREATE TABLE "teams" (
  "team" text,
  "club_home_city" text,
  "2006_07_season" text,
  "stadium" text,
  "stadium_capacity" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Stadium Capacity, when 2006-07 Season is "12th"?`:
```sql
                SELECT "stadium_capacity" FROM "teams" WHERE "2006_07_season"='12th';
```
## Task
Generate a SQL query to answer the following question:
`What is Stadium, when Club Home City is "Peć", and when 2006-07 Season is "1st"?`

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

CREATE TABLE "teams" (
  "team" text,
  "club_home_city" text,
  "2006_07_season" text,
  "stadium" text,
  "stadium_capacity" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Stadium, when Club Home City is "Peć", and when 2006-07 Season is "1st"?`:
```sql
                SELECT "stadium" FROM "teams" WHERE "club_home_city"='peć' AND "2006_07_season"='1st';
```
## Task
Generate a SQL query to answer the following question:
`What is Club Home City, when Stadium Capacity is "0 2,500"?`

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

CREATE TABLE "teams" (
  "team" text,
  "club_home_city" text,
  "2006_07_season" text,
  "stadium" text,
  "stadium_capacity" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Club Home City, when Stadium Capacity is "0 2,500"?`:
```sql
                SELECT "club_home_city" FROM "teams" WHERE "stadium_capacity"='0 2,500';
```
## Task
Generate a SQL query to answer the following question:
`What is Stadium, when Stadium Capacity is "10,000", and when Team is "KF Drita"?`

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

CREATE TABLE "teams" (
  "team" text,
  "club_home_city" text,
  "2006_07_season" text,
  "stadium" text,
  "stadium_capacity" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Stadium, when Stadium Capacity is "10,000", and when Team is "KF Drita"?`:
```sql
                SELECT "stadium" FROM "teams" WHERE "stadium_capacity"='10,000' AND "team"='kf drita';
```
## Task
Generate a SQL query to answer the following question:
`What is Year(s) Won, when Total is "145", and when Country is "United States"?`

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

CREATE TABLE "missed_the_cut" (
  "player" text,
  "country" text,
  "year_s_won" text,
  "total" real,
  "to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Year(s) Won, when Total is "145", and when Country is "United States"?`:
```sql
                SELECT "year_s_won" FROM "missed_the_cut" WHERE "total"=145 AND "country"='united states';
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest To par, when Total is greater than 148, and when Year(s) Won is "1959 , 1968 , 1974"?`

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

CREATE TABLE "missed_the_cut" (
  "player" text,
  "country" text,
  "year_s_won" text,
  "total" real,
  "to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest To par, when Total is greater than 148, and when Year(s) Won is "1959 , 1968 , 1974"?`:
```sql
                SELECT MIN("to_par") FROM "missed_the_cut" WHERE "total"<148 AND "year_s_won"='1959 , 1968 , 1974';
```
## Task
Generate a SQL query to answer the following question:
`What is Country, when To par is "1", and when Player is "Seve Ballesteros"?`

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

CREATE TABLE "missed_the_cut" (
  "player" text,
  "country" text,
  "year_s_won" text,
  "total" real,
  "to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Country, when To par is "1", and when Player is "Seve Ballesteros"?`:
```sql
                SELECT "country" FROM "missed_the_cut" WHERE "to_par"=1 AND "player"='seve ballesteros';
```
## Task
Generate a SQL query to answer the following question:
`What is the sum of Total, when Year(s) Won is "1966 , 1970 , 1978", and when To par is less than 4?`

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

CREATE TABLE "missed_the_cut" (
  "player" text,
  "country" text,
  "year_s_won" text,
  "total" real,
  "to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Total, when Year(s) Won is "1966 , 1970 , 1978", and when To par is less than 4?`:
```sql
                SELECT SUM("total") FROM "missed_the_cut" WHERE "year_s_won"='1966 , 1970 , 1978' AND "to_par"<4;
```
## Task
Generate a SQL query to answer the following question:
`What is Country, when Total is less than 148, and when Player is "Gary Player"?`

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

CREATE TABLE "missed_the_cut" (
  "player" text,
  "country" text,
  "year_s_won" text,
  "total" real,
  "to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Country, when Total is less than 148, and when Player is "Gary Player"?`:
```sql
                SELECT "country" FROM "missed_the_cut" WHERE "total"<148 AND "player"='gary player';
```
## Task
Generate a SQL query to answer the following question:
`What is To par, when Total is less than 148, and when Country is "South Africa"?`

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

CREATE TABLE "missed_the_cut" (
  "player" text,
  "country" text,
  "year_s_won" text,
  "total" real,
  "to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is To par, when Total is less than 148, and when Country is "South Africa"?`:
```sql
                SELECT "to_par" FROM "missed_the_cut" WHERE "total"<148 AND "country"='south africa';
```
## Task
Generate a SQL query to answer the following question:
`What is the average age at appointment of those attached to security?`

### 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,
  "govt_salary" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average age at appointment of those attached to security?`:
```sql
                SELECT AVG("age_at_appointment") FROM "political_assistants" WHERE "portfolio_attachment"='security';
```
## Task
Generate a SQL query to answer the following question:
`What was the distance of the race on saturday, august 23?`

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

CREATE TABLE "schedule" (
  "stage" text,
  "route" text,
  "distance" text,
  "date" text,
  "winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the distance of the race on saturday, august 23?`:
```sql
                SELECT "distance" FROM "schedule" WHERE "date"='saturday, august 23';
```
## Task
Generate a SQL query to answer the following question:
`Who was the winner of the race that had a distance of 175.6km?`

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

CREATE TABLE "schedule" (
  "stage" text,
  "route" text,
  "distance" text,
  "date" text,
  "winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the winner of the race that had a distance of 175.6km?`:
```sql
                SELECT "winner" FROM "schedule" WHERE "distance"='175.6km';
```