cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`What is the frequency for the radio owned by bell media with a call sign of chsu-fm?`

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

CREATE TABLE "radio" (
  "frequency" text,
  "call_sign" text,
  "branding" text,
  "format" text,
  "owner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the frequency for the radio owned by bell media with a call sign of chsu-fm?`:
```sql
                SELECT "frequency" FROM "radio" WHERE "owner"='bell media' AND "call_sign"='chsu-fm';
```
## Task
Generate a SQL query to answer the following question:
`What is the branding for the radio with a frequency of 1150 am?`

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

CREATE TABLE "radio" (
  "frequency" text,
  "call_sign" text,
  "branding" text,
  "format" text,
  "owner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the branding for the radio with a frequency of 1150 am?`:
```sql
                SELECT "branding" FROM "radio" WHERE "frequency"='1150 am';
```
## Task
Generate a SQL query to answer the following question:
`What was the format for the radio with a frequency of 00 96.3 fm?`

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

CREATE TABLE "radio" (
  "frequency" text,
  "call_sign" text,
  "branding" text,
  "format" text,
  "owner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the format for the radio with a frequency of 00 96.3 fm?`:
```sql
                SELECT "format" FROM "radio" WHERE "frequency"='00 96.3 fm';
```
## Task
Generate a SQL query to answer the following question:
`Who is the owner of the radio frequency of 0 101.5 fm?`

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

CREATE TABLE "radio" (
  "frequency" text,
  "call_sign" text,
  "branding" text,
  "format" text,
  "owner" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the owner of the radio frequency of 0 101.5 fm?`:
```sql
                SELECT "owner" FROM "radio" WHERE "frequency"='0 101.5 fm';
```
## Task
Generate a SQL query to answer the following question:
`how many times is the name matt targett and the lane higher than 7?`

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

CREATE TABLE "semifinal_2" (
  "rank" real,
  "lane" real,
  "name" text,
  "nationality" text,
  "time" real
);
### SQL
Given the database schema, here is the SQL query that answers `how many times is the name matt targett and the lane higher than 7?`:
```sql
                SELECT COUNT("time") FROM "semifinal_2" WHERE "name"='matt targett' AND "lane">7;
```
## Task
Generate a SQL query to answer the following question:
`what is the highest time when the rank is less than 5 and the name is eamon sullivan?`

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

CREATE TABLE "semifinal_2" (
  "rank" real,
  "lane" real,
  "name" text,
  "nationality" text,
  "time" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the highest time when the rank is less than 5 and the name is eamon sullivan?`:
```sql
                SELECT MAX("time") FROM "semifinal_2" WHERE "rank"<5 AND "name"='eamon sullivan';
```
## Task
Generate a SQL query to answer the following question:
`what is the average rank when the lane is more than 4 and the name is dominik meichtry?`

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

CREATE TABLE "semifinal_2" (
  "rank" real,
  "lane" real,
  "name" text,
  "nationality" text,
  "time" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the average rank when the lane is more than 4 and the name is dominik meichtry?`:
```sql
                SELECT AVG("rank") FROM "semifinal_2" WHERE "lane">4 AND "name"='dominik meichtry';
```
## Task
Generate a SQL query to answer the following question:
`What is the 2012 Employees (Total) when the rank (2012) is 7?`

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

CREATE TABLE "largest_employers" (
  "rank_2012" real,
  "rank_2010" real,
  "employer" text,
  "industry" text,
  "2012_employees_total" real,
  "2010_employees_total" real,
  "2007_employees_total" text,
  "head_office" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 2012 Employees (Total) when the rank (2012) is 7?`:
```sql
                SELECT "2012_employees_total" FROM "largest_employers" WHERE "rank_2012"=7;
```
## Task
Generate a SQL query to answer the following question:
`What is the total number of 2012 Employees (Total) when 2007 Employees (Total) is 8,985, and rank (2010) is smaller than 9?`

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

CREATE TABLE "largest_employers" (
  "rank_2012" real,
  "rank_2010" real,
  "employer" text,
  "industry" text,
  "2012_employees_total" real,
  "2010_employees_total" real,
  "2007_employees_total" text,
  "head_office" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of 2012 Employees (Total) when 2007 Employees (Total) is 8,985, and rank (2010) is smaller than 9?`:
```sql
                SELECT COUNT("2012_employees_total") FROM "largest_employers" WHERE "2007_employees_total"='8,985' AND "rank_2010"<9;
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest 2010 Employees (Total) when the 2007 Employees (Total) is see note, and the 2012 Employees (Total) is larger than 99,400?`

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

CREATE TABLE "largest_employers" (
  "rank_2012" real,
  "rank_2010" real,
  "employer" text,
  "industry" text,
  "2012_employees_total" real,
  "2010_employees_total" real,
  "2007_employees_total" text,
  "head_office" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest 2010 Employees (Total) when the 2007 Employees (Total) is see note, and the 2012 Employees (Total) is larger than 99,400?`:
```sql
                SELECT MIN("2010_employees_total") FROM "largest_employers" WHERE "2007_employees_total"='see note' AND "2012_employees_total">'99,400';
```
## Task
Generate a SQL query to answer the following question:
`What shows for 2010 Employees (Total) when the employer is University of Alberta?`

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

CREATE TABLE "largest_employers" (
  "rank_2012" real,
  "rank_2010" real,
  "employer" text,
  "industry" text,
  "2012_employees_total" real,
  "2010_employees_total" real,
  "2007_employees_total" text,
  "head_office" text
);
### SQL
Given the database schema, here is the SQL query that answers `What shows for 2010 Employees (Total) when the employer is University of Alberta?`:
```sql
                SELECT SUM("2010_employees_total") FROM "largest_employers" WHERE "employer"='university of alberta';
```
## Task
Generate a SQL query to answer the following question:
`How many floors when the rank is 73.0 72=?`

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

CREATE TABLE "tallest_buildings" (
  "rank" text,
  "name" text,
  "height_ft_m" text,
  "floors" real,
  "year" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many floors when the rank is 73.0 72=?`:
```sql
                SELECT "floors" FROM "tallest_buildings" WHERE "rank"='73.0 72=';
```
## Task
Generate a SQL query to answer the following question:
`What year was the 190 South Lasalle Street?`

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

CREATE TABLE "tallest_buildings" (
  "rank" text,
  "name" text,
  "height_ft_m" text,
  "floors" real,
  "year" real
);
### SQL
Given the database schema, here is the SQL query that answers `What year was the 190 South Lasalle Street?`:
```sql
                SELECT MAX("year") FROM "tallest_buildings" WHERE "name"='190 south lasalle street';
```
## Task
Generate a SQL query to answer the following question:
`What rank has a Time of 4:00.191?`

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

CREATE TABLE "heat_2" (
  "rank" real,
  "athletes" text,
  "country" text,
  "time" text,
  "notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What rank has a Time of 4:00.191?`:
```sql
                SELECT "rank" FROM "heat_2" WHERE "time"='4:00.191';
```
## Task
Generate a SQL query to answer the following question:
`What is the time for Brazil?`

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

CREATE TABLE "heat_2" (
  "rank" real,
  "athletes" text,
  "country" text,
  "time" text,
  "notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time for Brazil?`:
```sql
                SELECT "time" FROM "heat_2" WHERE "country"='brazil';
```
## Task
Generate a SQL query to answer the following question:
`what is the date when the format is cd (limited edition steel-box) from united kingdom?`

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

CREATE TABLE "release_history" (
  "country" text,
  "date" text,
  "label" text,
  "format" text,
  "catalogue_no" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the date when the format is cd (limited edition steel-box) from united kingdom?`:
```sql
                SELECT "date" FROM "release_history" WHERE "format"='cd (limited edition steel-box)' AND "country"='united kingdom';
```
## Task
Generate a SQL query to answer the following question:
`What is the country that has the format of cd, the label of sony music and the catalogue no sicp-2055?`

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

CREATE TABLE "release_history" (
  "country" text,
  "date" text,
  "label" text,
  "format" text,
  "catalogue_no" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the country that has the format of cd, the label of sony music and the catalogue no sicp-2055?`:
```sql
                SELECT "country" FROM "release_history" WHERE "format"='cd' AND "label"='sony music' AND "catalogue_no"='sicp-2055';
```
## Task
Generate a SQL query to answer the following question:
`what is the format for the country united kingdom on 20 october 2008?`

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

CREATE TABLE "release_history" (
  "country" text,
  "date" text,
  "label" text,
  "format" text,
  "catalogue_no" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the format for the country united kingdom on 20 october 2008?`:
```sql
                SELECT "format" FROM "release_history" WHERE "country"='united kingdom' AND "date"='20 october 2008';
```
## Task
Generate a SQL query to answer the following question:
`what is the catalogue no when the format is cd (limited edition steel-box) and the country is germany?`

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

CREATE TABLE "release_history" (
  "country" text,
  "date" text,
  "label" text,
  "format" text,
  "catalogue_no" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the catalogue no when the format is cd (limited edition steel-box) and the country is germany?`:
```sql
                SELECT "catalogue_no" FROM "release_history" WHERE "format"='cd (limited edition steel-box)' AND "country"='germany';
```
## Task
Generate a SQL query to answer the following question:
`Which Total has a Rank of 4, and a Silver larger than 2?`

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

CREATE TABLE "medals_table" (
  "rank" text,
  "nation" text,
  "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 4, and a Silver larger than 2?`:
```sql
                SELECT MIN("total") FROM "medals_table" WHERE "rank"='4' AND "silver">2;
```
## Task
Generate a SQL query to answer the following question:
`How much Total has a Rank of 5, and a Bronze larger than 3?`

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

CREATE TABLE "medals_table" (
  "rank" text,
  "nation" text,
  "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 of 5, and a Bronze larger than 3?`:
```sql
                SELECT SUM("total") FROM "medals_table" WHERE "rank"='5' AND "bronze">3;
```
## Task
Generate a SQL query to answer the following question:
`Which Silver has a Nation of total, and a Bronze smaller than 18?`

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

CREATE TABLE "medals_table" (
  "rank" text,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Silver has a Nation of total, and a Bronze smaller than 18?`:
```sql
                SELECT MAX("silver") FROM "medals_table" WHERE "nation"='total' AND "bronze"<18;
```
## Task
Generate a SQL query to answer the following question:
`How much Silver has a Nation of total, and a Total smaller than 54?`

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

CREATE TABLE "medals_table" (
  "rank" text,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much Silver has a Nation of total, and a Total smaller than 54?`:
```sql
                SELECT COUNT("silver") FROM "medals_table" WHERE "nation"='total' AND "total"<54;
```
## Task
Generate a SQL query to answer the following question:
`What was the result for the award for best current affairs presenter?`

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

CREATE TABLE "awards_achievements" (
  "year" real,
  "organisation" text,
  "award" text,
  "nominated_work_title" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result for the award for best current affairs presenter?`:
```sql
                SELECT "result" FROM "awards_achievements" WHERE "award"='best current affairs presenter';
```
## Task
Generate a SQL query to answer the following question:
`Which award was given to Lianhe Zaobao?`

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

CREATE TABLE "awards_achievements" (
  "year" real,
  "organisation" text,
  "award" text,
  "nominated_work_title" text,
  "result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which award was given to Lianhe Zaobao?`:
```sql
                SELECT "award" FROM "awards_achievements" WHERE "organisation"='lianhe zaobao';
```
## Task
Generate a SQL query to answer the following question:
`What's the release date of Feather Finger with an MM Series?`

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

CREATE TABLE "1966" (
  "title" text,
  "series" text,
  "director" text,
  "release_date" text,
  "characters" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the release date of Feather Finger with an MM Series?`:
```sql
                SELECT "release_date" FROM "1966" WHERE "series"='mm' AND "title"='feather finger';
```
## Task
Generate a SQL query to answer the following question:
`Which Opponent has a Venue of h, and a Result of 0–1, and a Date of 29 august 1998?`

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

CREATE TABLE "fa_premier_league" (
  "date" text,
  "opponent" text,
  "venue" text,
  "result" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Opponent has a Venue of h, and a Result of 0–1, and a Date of 29 august 1998?`:
```sql
                SELECT "opponent" FROM "fa_premier_league" WHERE "venue"='h' AND "result"='0–1' AND "date"='29 august 1998';
```
## Task
Generate a SQL query to answer the following question:
`Which Opponent has a Result of 1–1, and a Date of 28 november 1998?`

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

CREATE TABLE "fa_premier_league" (
  "date" text,
  "opponent" text,
  "venue" text,
  "result" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Opponent has a Result of 1–1, and a Date of 28 november 1998?`:
```sql
                SELECT "opponent" FROM "fa_premier_league" WHERE "result"='1–1' AND "date"='28 november 1998';
```
## Task
Generate a SQL query to answer the following question:
`What was the venue on 14 november 1998?`

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

CREATE TABLE "fa_premier_league" (
  "date" text,
  "opponent" text,
  "venue" text,
  "result" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the venue on 14 november 1998?`:
```sql
                SELECT "venue" FROM "fa_premier_league" WHERE "date"='14 november 1998';
```
## Task
Generate a SQL query to answer the following question:
`Which Place is the highest one that has a Draw larger than 1, and 49 Points?`

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

CREATE TABLE "festival_da_can_o_1996" (
  "draw" real,
  "singer" text,
  "song" text,
  "points" real,
  "place" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Place is the highest one that has a Draw larger than 1, and 49 Points?`:
```sql
                SELECT MAX("place") FROM "festival_da_can_o_1996" WHERE "draw">1 AND "points"=49;
```
## Task
Generate a SQL query to answer the following question:
`Which Song has Points smaller than 54, and a Draw smaller than 4, and a Place smaller than 10?`

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

CREATE TABLE "festival_da_can_o_1996" (
  "draw" real,
  "singer" text,
  "song" text,
  "points" real,
  "place" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Song has Points smaller than 54, and a Draw smaller than 4, and a Place smaller than 10?`:
```sql
                SELECT "song" FROM "festival_da_can_o_1996" WHERE "points"<54 AND "draw"<4 AND "place"<10;
```
## Task
Generate a SQL query to answer the following question:
`What is the bronze number when the total is 54/`

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

CREATE TABLE "world_championships_total_medals" (
  "rank" text,
  "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 bronze number when the total is 54/`:
```sql
                SELECT AVG("bronze") FROM "world_championships_total_medals" WHERE "total"=54;
```
## Task
Generate a SQL query to answer the following question:
`What is the least bronze number when the silver is less than 0?`

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

CREATE TABLE "world_championships_total_medals" (
  "rank" text,
  "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 least bronze number when the silver is less than 0?`:
```sql
                SELECT MIN("bronze") FROM "world_championships_total_medals" WHERE "silver"<0;
```
## Task
Generate a SQL query to answer the following question:
`What is the least silver when the total is more than 2, bronze is 3, gold is more than 0, and rank is 1?`

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

CREATE TABLE "world_championships_total_medals" (
  "rank" text,
  "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 least silver when the total is more than 2, bronze is 3, gold is more than 0, and rank is 1?`:
```sql
                SELECT MIN("silver") FROM "world_championships_total_medals" WHERE "total">2 AND "bronze"=3 AND "gold">0 AND "rank"='1';
```
## Task
Generate a SQL query to answer the following question:
`What is the number of silver when the total is more than 2, and bronze is less than 3, with  a rank of 7?`

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

CREATE TABLE "world_championships_total_medals" (
  "rank" text,
  "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 number of silver when the total is more than 2, and bronze is less than 3, with  a rank of 7?`:
```sql
                SELECT COUNT("silver") FROM "world_championships_total_medals" WHERE "total">2 AND "bronze"<3 AND "rank"='7';
```
## Task
Generate a SQL query to answer the following question:
`Which Time has a Lane smaller than 4, and a Rank larger than 6?`

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

CREATE TABLE "semifinal_2" (
  "rank" real,
  "lane" real,
  "name" text,
  "nationality" text,
  "time" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Time has a Lane smaller than 4, and a Rank larger than 6?`:
```sql
                SELECT AVG("time") FROM "semifinal_2" WHERE "lane"<4 AND "rank">6;
```
## Task
Generate a SQL query to answer the following question:
`Which Rank has a Nationality of france, and a Name of alain bernard, and a Lane smaller than 6?`

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

CREATE TABLE "semifinal_2" (
  "rank" real,
  "lane" real,
  "name" text,
  "nationality" text,
  "time" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank has a Nationality of france, and a Name of alain bernard, and a Lane smaller than 6?`:
```sql
                SELECT AVG("rank") FROM "semifinal_2" WHERE "nationality"='france' AND "name"='alain bernard' AND "lane"<6;
```
## Task
Generate a SQL query to answer the following question:
`Which Nationality has a Rank larger than 1, and a Time smaller than 22.12, and a Lane smaller than 4, and a Name of ashley callus?`

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

CREATE TABLE "semifinal_2" (
  "rank" real,
  "lane" real,
  "name" text,
  "nationality" text,
  "time" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Nationality has a Rank larger than 1, and a Time smaller than 22.12, and a Lane smaller than 4, and a Name of ashley callus?`:
```sql
                SELECT "nationality" FROM "semifinal_2" WHERE "rank">1 AND "time"<22.12 AND "lane"<4 AND "name"='ashley callus';
```
## Task
Generate a SQL query to answer the following question:
`When the date is 8 october 2008 what is the sum of attendance?`

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

CREATE TABLE "attendance_at_home_games" (
  "round" text,
  "date" text,
  "against" text,
  "score_aufc_away" text,
  "attendance" real,
  "weekday" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the date is 8 october 2008 what is the sum of attendance?`:
```sql
                SELECT SUM("attendance") FROM "attendance_at_home_games" WHERE "date"='8 october 2008';
```
## Task
Generate a SQL query to answer the following question:
`What date has an against of pohang steelers?`

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

CREATE TABLE "attendance_at_home_games" (
  "round" text,
  "date" text,
  "against" text,
  "score_aufc_away" text,
  "attendance" real,
  "weekday" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date has an against of pohang steelers?`:
```sql
                SELECT "date" FROM "attendance_at_home_games" WHERE "against"='pohang steelers';
```
## Task
Generate a SQL query to answer the following question:
`What weekday has an against of kashima antlers?`

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

CREATE TABLE "attendance_at_home_games" (
  "round" text,
  "date" text,
  "against" text,
  "score_aufc_away" text,
  "attendance" real,
  "weekday" text
);
### SQL
Given the database schema, here is the SQL query that answers `What weekday has an against of kashima antlers?`:
```sql
                SELECT "weekday" FROM "attendance_at_home_games" WHERE "against"='kashima antlers';
```
## Task
Generate a SQL query to answer the following question:
`What was the final score of Game #4?`

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

CREATE TABLE "game_log" (
  "game" real,
  "date" text,
  "opponent" text,
  "score" text,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the final score of Game #4?`:
```sql
                SELECT "score" FROM "game_log" WHERE "game"=4;
```
## Task
Generate a SQL query to answer the following question:
`Which Level has a Leading scorer 1 of tom greaves 8?`

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

CREATE TABLE "league_and_cup_history" (
  "season" text,
  "league_contested" text,
  "level" real,
  "league_position" text,
  "avg_home_attendance_1" text,
  "fa_cup" text,
  "fa_trophy" text,
  "leading_scorer_1" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Level has a Leading scorer 1 of tom greaves 8?`:
```sql
                SELECT "level" FROM "league_and_cup_history" WHERE "leading_scorer_1"='tom greaves 8';
```
## Task
Generate a SQL query to answer the following question:
`Which Leading scorer 1 has a Season of 2010–11?`

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

CREATE TABLE "league_and_cup_history" (
  "season" text,
  "league_contested" text,
  "level" real,
  "league_position" text,
  "avg_home_attendance_1" text,
  "fa_cup" text,
  "fa_trophy" text,
  "leading_scorer_1" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Leading scorer 1 has a Season of 2010–11?`:
```sql
                SELECT "leading_scorer_1" FROM "league_and_cup_history" WHERE "season"='2010–11';
```
## Task
Generate a SQL query to answer the following question:
`Which Leading scorer 1 has a League Contested of northern premier league premier division, and an FA Cup of 2q?`

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

CREATE TABLE "league_and_cup_history" (
  "season" text,
  "league_contested" text,
  "level" real,
  "league_position" text,
  "avg_home_attendance_1" text,
  "fa_cup" text,
  "fa_trophy" text,
  "leading_scorer_1" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Leading scorer 1 has a League Contested of northern premier league premier division, and an FA Cup of 2q?`:
```sql
                SELECT "leading_scorer_1" FROM "league_and_cup_history" WHERE "league_contested"='northern premier league premier division' AND "fa_cup"='2q';
```
## Task
Generate a SQL query to answer the following question:
`Which Level has a League Contested of northern premier league premier division, and a Season of 2011–12?`

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

CREATE TABLE "league_and_cup_history" (
  "season" text,
  "league_contested" text,
  "level" real,
  "league_position" text,
  "avg_home_attendance_1" text,
  "fa_cup" text,
  "fa_trophy" text,
  "leading_scorer_1" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Level has a League Contested of northern premier league premier division, and a Season of 2011–12?`:
```sql
                SELECT AVG("level") FROM "league_and_cup_history" WHERE "league_contested"='northern premier league premier division' AND "season"='2011–12';
```
## Task
Generate a SQL query to answer the following question:
`What is the least Top-5 when 1 is the cuts made?`

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

CREATE TABLE "summary" (
  "tournament" text,
  "wins" real,
  "top_5" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least Top-5 when 1 is the cuts made?`:
```sql
                SELECT MIN("top_5") FROM "summary" WHERE "cuts_made"=1;
```
## Task
Generate a SQL query to answer the following question:
`With events less than 0, what is the fewest Top-5?`

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

CREATE TABLE "summary" (
  "tournament" text,
  "wins" real,
  "top_5" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `With events less than 0, what is the fewest Top-5?`:
```sql
                SELECT MIN("top_5") FROM "summary" WHERE "events"<0;
```
## Task
Generate a SQL query to answer the following question:
`How many wins of average has cuts made less than 0?`

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

CREATE TABLE "summary" (
  "tournament" text,
  "wins" real,
  "top_5" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins of average has cuts made less than 0?`:
```sql
                SELECT AVG("wins") FROM "summary" WHERE "cuts_made"<0;
```
## Task
Generate a SQL query to answer the following question:
`How many events total is the Top-5 2, and 4 is the cuts made, and less than 0 wins?`

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

CREATE TABLE "summary" (
  "tournament" text,
  "wins" real,
  "top_5" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many events total is the Top-5 2, and 4 is the cuts made, and less than 0 wins?`:
```sql
                SELECT COUNT("events") FROM "summary" WHERE "top_5"=2 AND "cuts_made"=4 AND "wins"<0;
```
## Task
Generate a SQL query to answer the following question:
`In the Open Championship with more than 3 cuts made, what is the average wins?`

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

CREATE TABLE "summary" (
  "tournament" text,
  "wins" real,
  "top_5" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `In the Open Championship with more than 3 cuts made, what is the average wins?`:
```sql
                SELECT AVG("wins") FROM "summary" WHERE "tournament"='the open championship' AND "cuts_made">3;
```
## Task
Generate a SQL query to answer the following question:
`What lane did the barbados swimmer compete in before heat 3?`

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

CREATE TABLE "heats" (
  "rank" real,
  "heat" real,
  "lane" real,
  "name" text,
  "nationality" text,
  "time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What lane did the barbados swimmer compete in before heat 3?`:
```sql
                SELECT "lane" FROM "heats" WHERE "heat"<3 AND "nationality"='barbados';
```
## Task
Generate a SQL query to answer the following question:
`What was the time of the 5th ranked swimmer who swam after heat 3 and was in a lane under 5?`

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

CREATE TABLE "heats" (
  "rank" real,
  "heat" real,
  "lane" real,
  "name" text,
  "nationality" text,
  "time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the time of the 5th ranked swimmer who swam after heat 3 and was in a lane under 5?`:
```sql
                SELECT "time" FROM "heats" WHERE "heat">3 AND "lane"<5 AND "rank"=5;
```
## Task
Generate a SQL query to answer the following question:
`What is the average population for an area less than 433.7km and a 23013 code?`

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

CREATE TABLE "main_places" (
  "place" text,
  "code" real,
  "area_km_2" real,
  "population" real,
  "most_spoken_language" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average population for an area less than 433.7km and a 23013 code?`:
```sql
                SELECT AVG("population") FROM "main_places" WHERE "area_km_2"<433.7 AND "code"=23013;
```
## Task
Generate a SQL query to answer the following question:
`What is the total code number for Amadiba?`

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

CREATE TABLE "main_places" (
  "place" text,
  "code" real,
  "area_km_2" real,
  "population" real,
  "most_spoken_language" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total code number for Amadiba?`:
```sql
                SELECT COUNT("code") FROM "main_places" WHERE "place"='amadiba';
```
## Task
Generate a SQL query to answer the following question:
`What is the total capacity for the Leicester Tigers?`

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

CREATE TABLE "rugby_union" (
  "club" text,
  "league" text,
  "city_town" text,
  "stadium" text,
  "capacity" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total capacity for the Leicester Tigers?`:
```sql
                SELECT COUNT("capacity") FROM "rugby_union" WHERE "club"='leicester tigers';
```
## Task
Generate a SQL query to answer the following question:
`What town has the Welford Road Stadium?`

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

CREATE TABLE "rugby_union" (
  "club" text,
  "league" text,
  "city_town" text,
  "stadium" text,
  "capacity" real
);
### SQL
Given the database schema, here is the SQL query that answers `What town has the Welford Road Stadium?`:
```sql
                SELECT "city_town" FROM "rugby_union" WHERE "stadium"='welford road';
```
## Task
Generate a SQL query to answer the following question:
`What date was the Cross Code Debut of rl 1st test great britain v australia, and the Int'l Debut was RU Five Nations v Ireland?`

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

CREATE TABLE "scotland" (
  "player" text,
  "int_l_debut" text,
  "year" real,
  "cross_code_debut" text,
  "date" text,
  "position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the Cross Code Debut of rl 1st test great britain v australia, and the Int'l Debut was RU Five Nations v Ireland?`:
```sql
                SELECT "date" FROM "scotland" WHERE "cross_code_debut"='rl 1st test great britain v australia' AND "int_l_debut"='ru five nations v ireland';
```
## Task
Generate a SQL query to answer the following question:
`What year was the player David Rose?`

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

CREATE TABLE "scotland" (
  "player" text,
  "int_l_debut" text,
  "year" real,
  "cross_code_debut" text,
  "date" text,
  "position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was the player David Rose?`:
```sql
                SELECT SUM("year") FROM "scotland" WHERE "player"='david rose';
```
## Task
Generate a SQL query to answer the following question:
`What is the median family income when the per capita is $24,114?`

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

CREATE TABLE "tennessee_counties_ranked_by_per_capita_" (
  "county" text,
  "per_capita_income" text,
  "median_household_income" text,
  "median_family_income" text,
  "population" real,
  "number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the median family income when the per capita is $24,114?`:
```sql
                SELECT "median_family_income" FROM "tennessee_counties_ranked_by_per_capita_" WHERE "per_capita_income"='$24,114';
```
## Task
Generate a SQL query to answer the following question:
`What is the median household income when the per capita is $21,585?`

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

CREATE TABLE "tennessee_counties_ranked_by_per_capita_" (
  "county" text,
  "per_capita_income" text,
  "median_household_income" text,
  "median_family_income" text,
  "population" real,
  "number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the median household income when the per capita is $21,585?`:
```sql
                SELECT "median_household_income" FROM "tennessee_counties_ranked_by_per_capita_" WHERE "per_capita_income"='$21,585';
```
## Task
Generate a SQL query to answer the following question:
`What is the population where the median family income is $48,446 and there are more than 35,343 households?`

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

CREATE TABLE "tennessee_counties_ranked_by_per_capita_" (
  "county" text,
  "per_capita_income" text,
  "median_household_income" text,
  "median_family_income" text,
  "population" real,
  "number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the population where the median family income is $48,446 and there are more than 35,343 households?`:
```sql
                SELECT AVG("population") FROM "tennessee_counties_ranked_by_per_capita_" WHERE "median_family_income"='$48,446' AND "number_of_households">'35,343';
```
## Task
Generate a SQL query to answer the following question:
`What is the population where the median household income is $87,832 and there are fewer than 64,886 households?`

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

CREATE TABLE "tennessee_counties_ranked_by_per_capita_" (
  "county" text,
  "per_capita_income" text,
  "median_household_income" text,
  "median_family_income" text,
  "population" real,
  "number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the population where the median household income is $87,832 and there are fewer than 64,886 households?`:
```sql
                SELECT AVG("population") FROM "tennessee_counties_ranked_by_per_capita_" WHERE "median_household_income"='$87,832' AND "number_of_households"<'64,886';
```
## Task
Generate a SQL query to answer the following question:
`What is the score 1 for the major league soccer all-star game?`

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

CREATE TABLE "stats" (
  "match" real,
  "date" text,
  "competition_or_tour" text,
  "ground" text,
  "opponent" text,
  "score1" text,
  "scorers" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score 1 for the major league soccer all-star game?`:
```sql
                SELECT "score1" FROM "stats" WHERE "competition_or_tour"='major league soccer all-star game';
```
## Task
Generate a SQL query to answer the following question:
`What is the score 1 with a h ground?`

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

CREATE TABLE "stats" (
  "match" real,
  "date" text,
  "competition_or_tour" text,
  "ground" text,
  "opponent" text,
  "score1" text,
  "scorers" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score 1 with a h ground?`:
```sql
                SELECT "score1" FROM "stats" WHERE "ground"='h';
```
## Task
Generate a SQL query to answer the following question:
`Who are the scorers on 1 August 2008, where the ground was A?`

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

CREATE TABLE "stats" (
  "match" real,
  "date" text,
  "competition_or_tour" text,
  "ground" text,
  "opponent" text,
  "score1" text,
  "scorers" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the scorers on 1 August 2008, where the ground was A?`:
```sql
                SELECT "scorers" FROM "stats" WHERE "ground"='a' AND "date"='1 august 2008';
```
## Task
Generate a SQL query to answer the following question:
`What ground had Portsmouth reserves as an opponent?`

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

CREATE TABLE "stats" (
  "match" real,
  "date" text,
  "competition_or_tour" text,
  "ground" text,
  "opponent" text,
  "score1" text
);
### SQL
Given the database schema, here is the SQL query that answers `What ground had Portsmouth reserves as an opponent?`:
```sql
                SELECT "ground" FROM "stats" WHERE "opponent"='portsmouth reserves';
```
## Task
Generate a SQL query to answer the following question:
`What ground had a match smaller than 6 and Chelsea Reserves as the opponent?`

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

CREATE TABLE "stats" (
  "match" real,
  "date" text,
  "competition_or_tour" text,
  "ground" text,
  "opponent" text,
  "score1" text
);
### SQL
Given the database schema, here is the SQL query that answers `What ground had a match smaller than 6 and Chelsea Reserves as the opponent?`:
```sql
                SELECT "ground" FROM "stats" WHERE "match"<6 AND "opponent"='chelsea reserves';
```
## Task
Generate a SQL query to answer the following question:
`Which Team has Losses larger than 5, and a Position of 12?`

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

CREATE TABLE "torneo_clausura" (
  "position" real,
  "team" text,
  "played" real,
  "wins" real,
  "draws_p_k_wins_p_k_losses" text,
  "losses" real,
  "scored" real,
  "conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Team has Losses larger than 5, and a Position of 12?`:
```sql
                SELECT "team" FROM "torneo_clausura" WHERE "losses">5 AND "position"=12;
```
## Task
Generate a SQL query to answer the following question:
`How many Points have a Position larger than 4, and Losses larger than 5, and a Conceded of 15, and a Scored larger than 11?`

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

CREATE TABLE "torneo_clausura" (
  "position" real,
  "team" text,
  "played" real,
  "wins" real,
  "draws_p_k_wins_p_k_losses" text,
  "losses" real,
  "scored" real,
  "conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Points have a Position larger than 4, and Losses larger than 5, and a Conceded of 15, and a Scored larger than 11?`:
```sql
                SELECT COUNT("points") FROM "torneo_clausura" WHERE "position">4 AND "losses">5 AND "conceded"=15 AND "scored">11;
```
## Task
Generate a SQL query to answer the following question:
`How many positions have Played smaller than 12?`

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

CREATE TABLE "torneo_clausura" (
  "position" real,
  "team" text,
  "played" real,
  "wins" real,
  "draws_p_k_wins_p_k_losses" text,
  "losses" real,
  "scored" real,
  "conceded" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many positions have Played smaller than 12?`:
```sql
                SELECT SUM("position") FROM "torneo_clausura" WHERE "played"<12;
```
## Task
Generate a SQL query to answer the following question:
`Who was the Prato Elector with a faction of Italian?`

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

CREATE TABLE "cardinal_electors" (
  "elector" text,
  "nationality" text,
  "faction" text,
  "elevated" text,
  "elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Prato Elector with a faction of Italian?`:
```sql
                SELECT "elector" FROM "cardinal_electors" WHERE "faction"='italian' AND "nationality"='prato';
```
## Task
Generate a SQL query to answer the following question:
`What's the elevator of Jacques D'euse?`

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

CREATE TABLE "cardinal_electors" (
  "elector" text,
  "nationality" text,
  "faction" text,
  "elevated" text,
  "elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the elevator of Jacques D'euse?`:
```sql
                SELECT "elevator" FROM "cardinal_electors" WHERE "elector"='jacques d''euse';
```
## Task
Generate a SQL query to answer the following question:
`What's the nationality for Nicholas III?`

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

CREATE TABLE "cardinal_electors" (
  "elector" text,
  "nationality" text,
  "faction" text,
  "elevated" text,
  "elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the nationality for Nicholas III?`:
```sql
                SELECT "nationality" FROM "cardinal_electors" WHERE "elevator"='nicholas iii';
```
## Task
Generate a SQL query to answer the following question:
`What is the fewest mintage from Dora de Pédery-Hunt, and the year was before 2002?`

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

CREATE TABLE "specimen_set_editions" (
  "year" real,
  "theme" text,
  "artist" text,
  "mintage" real,
  "issue_price" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the fewest mintage from Dora de Pédery-Hunt, and the year was before 2002?`:
```sql
                SELECT MIN("mintage") FROM "specimen_set_editions" WHERE "artist"='dora de pédery-hunt' AND "year"<2002;
```
## Task
Generate a SQL query to answer the following question:
`What is the most mintage with common eider as the theme, and the year less than 2008?`

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

CREATE TABLE "specimen_set_editions" (
  "year" real,
  "theme" text,
  "artist" text,
  "mintage" real,
  "issue_price" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the most mintage with common eider as the theme, and the year less than 2008?`:
```sql
                SELECT MAX("mintage") FROM "specimen_set_editions" WHERE "theme"='common eider' AND "year"<2008;
```