cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`Which Byes has a Losses smaller than 1?`

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

CREATE TABLE "2012_ladder" (
  "peel" text,
  "wins" real,
  "byes" real,
  "losses" real,
  "draws" real,
  "against" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Byes has a Losses smaller than 1?`:
```sql
                SELECT MAX("byes") FROM "2012_ladder" WHERE "losses"<1;
```
## Task
Generate a SQL query to answer the following question:
`What is the average number of games of the player with a rank less than 1?`

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

CREATE TABLE "points" (
  "rank" real,
  "name" text,
  "team" text,
  "games" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of games of the player with a rank less than 1?`:
```sql
                SELECT AVG("games") FROM "points" WHERE "rank"<1;
```
## Task
Generate a SQL query to answer the following question:
`What is the highest rank of the player with less than 32 points?`

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

CREATE TABLE "points" (
  "rank" real,
  "name" text,
  "team" text,
  "games" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest rank of the player with less than 32 points?`:
```sql
                SELECT MAX("rank") FROM "points" WHERE "points"<32;
```
## Task
Generate a SQL query to answer the following question:
`What is the rank of the player with less than 34 points?`

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

CREATE TABLE "points" (
  "rank" real,
  "name" text,
  "team" text,
  "games" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank of the player with less than 34 points?`:
```sql
                SELECT SUM("rank") FROM "points" WHERE "points"<34;
```
## Task
Generate a SQL query to answer the following question:
`Who's Fourth District has a Second District of bob springstead?`

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

CREATE TABLE "current_members" (
  "first_district" text,
  "second_district" text,
  "third_district" text,
  "fourth_district" text,
  "fifth_district" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who's Fourth District has a Second District of bob springstead?`:
```sql
                SELECT "fourth_district" FROM "current_members" WHERE "second_district"='bob springstead';
```
## Task
Generate a SQL query to answer the following question:
`Who's the First District with a Fifth District of prudy adam?`

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

CREATE TABLE "current_members" (
  "first_district" text,
  "second_district" text,
  "third_district" text,
  "fourth_district" text,
  "fifth_district" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who's the First District with a Fifth District of prudy adam?`:
```sql
                SELECT "first_district" FROM "current_members" WHERE "fifth_district"='prudy adam';
```
## Task
Generate a SQL query to answer the following question:
`Who's the Fourth District with a First District of beverly bodem?`

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

CREATE TABLE "current_members" (
  "first_district" text,
  "second_district" text,
  "third_district" text,
  "fourth_district" text,
  "fifth_district" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who's the Fourth District with a First District of beverly bodem?`:
```sql
                SELECT "fourth_district" FROM "current_members" WHERE "first_district"='beverly bodem';
```
## Task
Generate a SQL query to answer the following question:
`Who's the Fourth District with a Second District of kurt van koevering?`

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

CREATE TABLE "current_members" (
  "first_district" text,
  "second_district" text,
  "third_district" text,
  "fourth_district" text,
  "fifth_district" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who's the Fourth District with a Second District of kurt van koevering?`:
```sql
                SELECT "fourth_district" FROM "current_members" WHERE "second_district"='kurt van koevering';
```
## Task
Generate a SQL query to answer the following question:
`Who's the Fifth District with a Second District of paul leidig?`

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

CREATE TABLE "current_members" (
  "first_district" text,
  "second_district" text,
  "third_district" text,
  "fourth_district" text,
  "fifth_district" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who's the Fifth District with a Second District of paul leidig?`:
```sql
                SELECT "fifth_district" FROM "current_members" WHERE "second_district"='paul leidig';
```
## Task
Generate a SQL query to answer the following question:
`Who's the Fourth District with a Third District of sharon yentsch?`

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

CREATE TABLE "current_members" (
  "first_district" text,
  "second_district" text,
  "third_district" text,
  "fourth_district" text,
  "fifth_district" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who's the Fourth District with a Third District of sharon yentsch?`:
```sql
                SELECT "fourth_district" FROM "current_members" WHERE "third_district"='sharon yentsch';
```
## Task
Generate a SQL query to answer the following question:
`How many Sets did Gary Muller have?`

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

CREATE TABLE "men" (
  "aces" real,
  "player" text,
  "opponent" text,
  "event" text,
  "sets" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Sets did Gary Muller have?`:
```sql
                SELECT COUNT("sets") FROM "men" WHERE "player"='gary muller';
```
## Task
Generate a SQL query to answer the following question:
`What Player in 2005 Wimbledon had less than 5 Sets?`

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

CREATE TABLE "men" (
  "aces" real,
  "player" text,
  "opponent" text,
  "event" text,
  "sets" real
);
### SQL
Given the database schema, here is the SQL query that answers `What Player in 2005 Wimbledon had less than 5 Sets?`:
```sql
                SELECT "player" FROM "men" WHERE "sets"<5 AND "event"='2005 wimbledon';
```
## Task
Generate a SQL query to answer the following question:
`At the 2001 Davis Cup, what Opponent had less than 50 Aces?`

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

CREATE TABLE "men" (
  "aces" real,
  "player" text,
  "opponent" text,
  "event" text,
  "sets" real
);
### SQL
Given the database schema, here is the SQL query that answers `At the 2001 Davis Cup, what Opponent had less than 50 Aces?`:
```sql
                SELECT "opponent" FROM "men" WHERE "aces"<50 AND "event"='2001 davis cup';
```
## Task
Generate a SQL query to answer the following question:
`What is Channel 4 and Channel 4+1's rating in E4 and E4+1 when the ratings were 780,200?`

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

CREATE TABLE "united_kingdom" (
  "episode_number" real,
  "title" text,
  "original_airing_on_channel_4" text,
  "time_of_airing_on_channel_4" text,
  "original_airing_on_e4" text,
  "time_of_airing_on_e4" text,
  "position_in_channel_4_and_channel_4_1_s_ratings" text,
  "position_in_e4_and_e4_1_s_ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Channel 4 and Channel 4+1's rating in E4 and E4+1 when the ratings were 780,200?`:
```sql
                SELECT "position_in_channel_4_and_channel_4_1_s_ratings" FROM "united_kingdom" WHERE "position_in_e4_and_e4_1_s_ratings"='780,200';
```
## Task
Generate a SQL query to answer the following question:
`What time did Channel 4 air an episode number larger than 106 with the title of Marry Me A Little?`

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

CREATE TABLE "united_kingdom" (
  "episode_number" real,
  "title" text,
  "original_airing_on_channel_4" text,
  "time_of_airing_on_channel_4" text,
  "original_airing_on_e4" text,
  "time_of_airing_on_e4" text,
  "position_in_channel_4_and_channel_4_1_s_ratings" text,
  "position_in_e4_and_e4_1_s_ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `What time did Channel 4 air an episode number larger than 106 with the title of Marry Me A Little?`:
```sql
                SELECT "time_of_airing_on_channel_4" FROM "united_kingdom" WHERE "episode_number">106 AND "title"='marry me a little';
```
## Task
Generate a SQL query to answer the following question:
`What is the total number of sunk by U-boats with less than 2 German submarines lost, 56328 sunk by aircrafts, and more than 8269 sunk by mines?`

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

CREATE TABLE "references" (
  "month_year" text,
  "sunk_by_u_boat" real,
  "sunk_by_aircraft" real,
  "sunk_by_warship_or_raider" real,
  "sunk_by_mines" real,
  "german_submarines_lost" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of sunk by U-boats with less than 2 German submarines lost, 56328 sunk by aircrafts, and more than 8269 sunk by mines?`:
```sql
                SELECT COUNT("sunk_by_u_boat") FROM "references" WHERE "german_submarines_lost"<2 AND "sunk_by_aircraft"=56328 AND "sunk_by_mines">8269;
```
## Task
Generate a SQL query to answer the following question:
`What is the total number sunk by warship or raider with 20 German submarines lost and more than 21616 sunk by aircraft?`

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

CREATE TABLE "references" (
  "month_year" text,
  "sunk_by_u_boat" real,
  "sunk_by_aircraft" real,
  "sunk_by_warship_or_raider" real,
  "sunk_by_mines" real,
  "german_submarines_lost" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number sunk by warship or raider with 20 German submarines lost and more than 21616 sunk by aircraft?`:
```sql
                SELECT COUNT("sunk_by_warship_or_raider") FROM "references" WHERE "german_submarines_lost"=20 AND "sunk_by_aircraft">21616;
```
## Task
Generate a SQL query to answer the following question:
`What is the total number of German submarines lost with more than 120958 sunk by mines?`

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

CREATE TABLE "references" (
  "month_year" text,
  "sunk_by_u_boat" real,
  "sunk_by_aircraft" real,
  "sunk_by_warship_or_raider" real,
  "sunk_by_mines" real,
  "german_submarines_lost" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of German submarines lost with more than 120958 sunk by mines?`:
```sql
                SELECT COUNT("german_submarines_lost") FROM "references" WHERE "sunk_by_mines">120958;
```
## Task
Generate a SQL query to answer the following question:
`What is the month and year less than 5 German submarines were lost, less than 6893 were sunk by warship or raider, less than 133746 were sunk by aircraft, and more than 111263 were sunk by U-boat?`

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

CREATE TABLE "references" (
  "month_year" text,
  "sunk_by_u_boat" real,
  "sunk_by_aircraft" real,
  "sunk_by_warship_or_raider" real,
  "sunk_by_mines" real,
  "german_submarines_lost" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the month and year less than 5 German submarines were lost, less than 6893 were sunk by warship or raider, less than 133746 were sunk by aircraft, and more than 111263 were sunk by U-boat?`:
```sql
                SELECT "month_year" FROM "references" WHERE "german_submarines_lost"<5 AND "sunk_by_warship_or_raider"<6893 AND "sunk_by_aircraft"<133746 AND "sunk_by_u_boat">111263;
```
## Task
Generate a SQL query to answer the following question:
`What is the month and year less than 106005 were sunk by aircraft and 61857 were sunk by warship or raider?`

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

CREATE TABLE "references" (
  "month_year" text,
  "sunk_by_u_boat" real,
  "sunk_by_aircraft" real,
  "sunk_by_warship_or_raider" real,
  "sunk_by_mines" real,
  "german_submarines_lost" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the month and year less than 106005 were sunk by aircraft and 61857 were sunk by warship or raider?`:
```sql
                SELECT "month_year" FROM "references" WHERE "sunk_by_aircraft"<106005 AND "sunk_by_warship_or_raider"=61857;
```
## Task
Generate a SQL query to answer the following question:
`What is the post-1986 provinces with a 全羅道 Hanja?`

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

CREATE TABLE "provinces_of_joseon" (
  "rr_romaja" text,
  "m_r_romaja" text,
  "hangul" text,
  "hanja" text,
  "name_origin" text,
  "capital" text,
  "region" text,
  "korean_dialect" text,
  "post_1896_provinces" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the post-1986 provinces with a 全羅道 Hanja?`:
```sql
                SELECT "post_1896_provinces" FROM "provinces_of_joseon" WHERE "hanja"='全羅道';
```
## Task
Generate a SQL query to answer the following question:
`What is the Korean dialect in the daegu capital?`

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

CREATE TABLE "provinces_of_joseon" (
  "rr_romaja" text,
  "m_r_romaja" text,
  "hangul" text,
  "hanja" text,
  "name_origin" text,
  "capital" text,
  "region" text,
  "korean_dialect" text,
  "post_1896_provinces" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Korean dialect in the daegu capital?`:
```sql
                SELECT "korean_dialect" FROM "provinces_of_joseon" WHERE "capital"='daegu';
```
## Task
Generate a SQL query to answer the following question:
`What is the Korean dialect with a jeolla RR Romaja?`

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

CREATE TABLE "provinces_of_joseon" (
  "rr_romaja" text,
  "m_r_romaja" text,
  "hangul" text,
  "hanja" text,
  "name_origin" text,
  "capital" text,
  "region" text,
  "korean_dialect" text,
  "post_1896_provinces" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Korean dialect with a jeolla RR Romaja?`:
```sql
                SELECT "korean_dialect" FROM "provinces_of_joseon" WHERE "rr_romaja"='jeolla';
```
## Task
Generate a SQL query to answer the following question:
`What is the Hanja for the hamgyeong RR Romaja?`

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

CREATE TABLE "provinces_of_joseon" (
  "rr_romaja" text,
  "m_r_romaja" text,
  "hangul" text,
  "hanja" text,
  "name_origin" text,
  "capital" text,
  "region" text,
  "korean_dialect" text,
  "post_1896_provinces" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Hanja for the hamgyeong RR Romaja?`:
```sql
                SELECT "hanja" FROM "provinces_of_joseon" WHERE "rr_romaja"='hamgyeong';
```
## Task
Generate a SQL query to answer the following question:
`What is the mean huc example code when the example name's lower snake, there are 6 digits, and less than 3 levels?`

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

CREATE TABLE "united_states" (
  "name" text,
  "level" real,
  "digits" real,
  "average_size_square_miles" text,
  "number_of_h_us_approximate" real,
  "example_name" text,
  "example_code_huc" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the mean huc example code when the example name's lower snake, there are 6 digits, and less than 3 levels?`:
```sql
                SELECT AVG("example_code_huc") FROM "united_states" WHERE "example_name"='lower snake' AND "digits"=6 AND "level"<3;
```
## Task
Generate a SQL query to answer the following question:
`What's the approximate number of HUs when there are more than 2 digits, and 6 levels?`

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

CREATE TABLE "united_states" (
  "name" text,
  "level" real,
  "digits" real,
  "average_size_square_miles" text,
  "number_of_h_us_approximate" real,
  "example_name" text,
  "example_code_huc" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the approximate number of HUs when there are more than 2 digits, and 6 levels?`:
```sql
                SELECT COUNT("number_of_h_us_approximate") FROM "united_states" WHERE "digits">2 AND "level"=6;
```
## Task
Generate a SQL query to answer the following question:
`How many HUC example codes have 1 level?`

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

CREATE TABLE "united_states" (
  "name" text,
  "level" real,
  "digits" real,
  "average_size_square_miles" text,
  "number_of_h_us_approximate" real,
  "example_name" text,
  "example_code_huc" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many HUC example codes have 1 level?`:
```sql
                SELECT COUNT("example_code_huc") FROM "united_states" WHERE "level"=1;
```
## Task
Generate a SQL query to answer the following question:
`What is the mean level number when the example name is lower snake and the approximate number is hus is less than 370?`

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

CREATE TABLE "united_states" (
  "name" text,
  "level" real,
  "digits" real,
  "average_size_square_miles" text,
  "number_of_h_us_approximate" real,
  "example_name" text,
  "example_code_huc" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the mean level number when the example name is lower snake and the approximate number is hus is less than 370?`:
```sql
                SELECT AVG("level") FROM "united_states" WHERE "example_name"='lower snake' AND "number_of_h_us_approximate"<370;
```
## Task
Generate a SQL query to answer the following question:
`What is the losses average when the against is greater than 1255 and wins is 0 and the draws less than 0?`

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

CREATE TABLE "2004_ladder" (
  "ballarat_fl" text,
  "wins" real,
  "byes" real,
  "losses" real,
  "draws" real,
  "against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the losses average when the against is greater than 1255 and wins is 0 and the draws less than 0?`:
```sql
                SELECT AVG("losses") FROM "2004_ladder" WHERE "against">1255 AND "wins"=0 AND "draws"<0;
```
## Task
Generate a SQL query to answer the following question:
`What is the smallest losses when the wins are 5 and the against less than 1852?`

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

CREATE TABLE "2004_ladder" (
  "ballarat_fl" text,
  "wins" real,
  "byes" real,
  "losses" real,
  "draws" real,
  "against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest losses when the wins are 5 and the against less than 1852?`:
```sql
                SELECT MIN("losses") FROM "2004_ladder" WHERE "wins"=5 AND "against"<1852;
```
## Task
Generate a SQL query to answer the following question:
`What is the total against that has wins less than 9, and losses less than 16, and 2 as the byes, and Ballarat FL of ballarat?`

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

CREATE TABLE "2004_ladder" (
  "ballarat_fl" text,
  "wins" real,
  "byes" real,
  "losses" real,
  "draws" real,
  "against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total against that has wins less than 9, and losses less than 16, and 2 as the byes, and Ballarat FL of ballarat?`:
```sql
                SELECT SUM("against") FROM "2004_ladder" WHERE "wins"<9 AND "losses"<16 AND "byes"=2 AND "ballarat_fl"='ballarat';
```
## Task
Generate a SQL query to answer the following question:
`What is the fewest losses that Ballarat FL of Lake Wendouree has when the wins are smaller than 9?`

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

CREATE TABLE "2004_ladder" (
  "ballarat_fl" text,
  "wins" real,
  "byes" real,
  "losses" real,
  "draws" real,
  "against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the fewest losses that Ballarat FL of Lake Wendouree has when the wins are smaller than 9?`:
```sql
                SELECT MIN("losses") FROM "2004_ladder" WHERE "ballarat_fl"='lake wendouree' AND "wins"<9;
```
## Task
Generate a SQL query to answer the following question:
`What is the smallest byes when the wins are 3?`

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

CREATE TABLE "2004_ladder" (
  "ballarat_fl" text,
  "wins" real,
  "byes" real,
  "losses" real,
  "draws" real,
  "against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest byes when the wins are 3?`:
```sql
                SELECT MIN("byes") FROM "2004_ladder" WHERE "wins"=3;
```
## Task
Generate a SQL query to answer the following question:
`Can you tell me the total number of Zone than has the Station users 2007-08 larger than 243,800, and the Year opened of 1855?`

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

CREATE TABLE "stations" (
  "station" text,
  "year_opened" text,
  "metropolitan_borough_c" text,
  "zone" real,
  "station_users_2006_07" real,
  "station_users_2007_08" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the total number of Zone than has the Station users 2007-08 larger than 243,800, and the Year opened of 1855?`:
```sql
                SELECT COUNT("zone") FROM "stations" WHERE "station_users_2007_08">'243,800' AND "year_opened"='1855';
```
## Task
Generate a SQL query to answer the following question:
`What is the highest Attendance when the away team was Wrexham?`

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

CREATE TABLE "second_round_proper" (
  "tie_no" text,
  "home_team" text,
  "score" text,
  "away_team" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Attendance when the away team was Wrexham?`:
```sql
                SELECT MAX("attendance") FROM "second_round_proper" WHERE "away_team"='wrexham';
```
## Task
Generate a SQL query to answer the following question:
`What is the Away team when the home team was wycombe wanderers?`

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

CREATE TABLE "second_round_proper" (
  "tie_no" text,
  "home_team" text,
  "score" text,
  "away_team" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Away team when the home team was wycombe wanderers?`:
```sql
                SELECT "away_team" FROM "second_round_proper" WHERE "home_team"='wycombe wanderers';
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest Attendance when the home team was slough town?`

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

CREATE TABLE "second_round_proper" (
  "tie_no" text,
  "home_team" text,
  "score" text,
  "away_team" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Attendance when the home team was slough town?`:
```sql
                SELECT MIN("attendance") FROM "second_round_proper" WHERE "home_team"='slough town';
```
## Task
Generate a SQL query to answer the following question:
`What is the sum of Attendance when macclesfield town was the way team?`

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

CREATE TABLE "second_round_proper" (
  "tie_no" text,
  "home_team" text,
  "score" text,
  "away_team" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Attendance when macclesfield town was the way team?`:
```sql
                SELECT SUM("attendance") FROM "second_round_proper" WHERE "away_team"='macclesfield town';
```
## Task
Generate a SQL query to answer the following question:
`How many Spins sources have a CCM Chart of CHR with a peak position less than 1?`

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

CREATE TABLE "radio_singles" (
  "single" text,
  "ccm_chart" text,
  "debut" text,
  "peak_date" text,
  "peak_pos" real,
  "total_wks" real,
  "spins_since_1998_source_mediabase" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Spins sources have a CCM Chart of CHR with a peak position less than 1?`:
```sql
                SELECT COUNT("spins_since_1998_source_mediabase") FROM "radio_singles" WHERE "ccm_chart"='chr' AND "peak_pos"<1;
```
## Task
Generate a SQL query to answer the following question:
`What CCM Chart had 18 total weeks?`

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

CREATE TABLE "radio_singles" (
  "single" text,
  "ccm_chart" text,
  "debut" text,
  "peak_date" text,
  "peak_pos" real,
  "total_wks" real,
  "spins_since_1998_source_mediabase" real
);
### SQL
Given the database schema, here is the SQL query that answers `What CCM Chart had 18 total weeks?`:
```sql
                SELECT "ccm_chart" FROM "radio_singles" WHERE "total_wks"=18;
```
## Task
Generate a SQL query to answer the following question:
`What is Opponent, when Date is December 18, 1988?`

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

CREATE TABLE "schedule" (
  "week" real,
  "date" text,
  "opponent" text,
  "result" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Opponent, when Date is December 18, 1988?`:
```sql
                SELECT "opponent" FROM "schedule" WHERE "date"='december 18, 1988';
```
## Task
Generate a SQL query to answer the following question:
`What is Attendance, when Opponent is Pittsburgh Steelers?`

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

CREATE TABLE "schedule" (
  "week" real,
  "date" text,
  "opponent" text,
  "result" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Attendance, when Opponent is Pittsburgh Steelers?`:
```sql
                SELECT "attendance" FROM "schedule" WHERE "opponent"='pittsburgh steelers';
```
## Task
Generate a SQL query to answer the following question:
`What is the average Week, when Result is l 37–34?`

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

CREATE TABLE "schedule" (
  "week" real,
  "date" text,
  "opponent" text,
  "result" text,
  "attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Week, when Result is l 37–34?`:
```sql
                SELECT AVG("week") FROM "schedule" WHERE "result"='l 37–34';
```
## Task
Generate a SQL query to answer the following question:
`When was Shannon Long the Centerfold model?`

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

CREATE TABLE "1988" (
  "date" text,
  "cover_model" text,
  "centerfold_model" text,
  "interview_subject" text,
  "20_questions" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was Shannon Long the Centerfold model?`:
```sql
                SELECT "date" FROM "1988" WHERE "centerfold_model"='shannon long';
```
## Task
Generate a SQL query to answer the following question:
`Who was the Centerfold model on 5-88?`

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

CREATE TABLE "1988" (
  "date" text,
  "cover_model" text,
  "centerfold_model" text,
  "interview_subject" text,
  "20_questions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Centerfold model on 5-88?`:
```sql
                SELECT "centerfold_model" FROM "1988" WHERE "date"='5-88';
```
## Task
Generate a SQL query to answer the following question:
`On which date was the interview subject 20 Questions of Judge Reinhold?`

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

CREATE TABLE "1988" (
  "date" text,
  "cover_model" text,
  "centerfold_model" text,
  "interview_subject" text,
  "20_questions" text
);
### SQL
Given the database schema, here is the SQL query that answers `On which date was the interview subject 20 Questions of Judge Reinhold?`:
```sql
                SELECT "date" FROM "1988" WHERE "20_questions"='judge reinhold';
```
## Task
Generate a SQL query to answer the following question:
`Who was the Centerfild model that used Bruce Willis as her Interview subject?`

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

CREATE TABLE "1988" (
  "date" text,
  "cover_model" text,
  "centerfold_model" text,
  "interview_subject" text,
  "20_questions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Centerfild model that used Bruce Willis as her Interview subject?`:
```sql
                SELECT "centerfold_model" FROM "1988" WHERE "interview_subject"='bruce willis';
```
## Task
Generate a SQL query to answer the following question:
`What is Series, when Launch Date is 23 February 2013?`

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

CREATE TABLE "series_details" (
  "series" text,
  "host" text,
  "launch_date" text,
  "finale_date" text,
  "days" real,
  "winner" text,
  "prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Series, when Launch Date is 23 February 2013?`:
```sql
                SELECT "series" FROM "series_details" WHERE "launch_date"='23 february 2013';
```
## Task
Generate a SQL query to answer the following question:
`What is Series, when Days is greater than 99, and when Prize is €50,000?`

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

CREATE TABLE "series_details" (
  "series" text,
  "host" text,
  "launch_date" text,
  "finale_date" text,
  "days" real,
  "winner" text,
  "prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Series, when Days is greater than 99, and when Prize is €50,000?`:
```sql
                SELECT "series" FROM "series_details" WHERE "days">99 AND "prize"='€50,000';
```
## Task
Generate a SQL query to answer the following question:
`What is Series, when Winner is Jetmir Salaj?`

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

CREATE TABLE "series_details" (
  "series" text,
  "host" text,
  "launch_date" text,
  "finale_date" text,
  "days" real,
  "winner" text,
  "prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Series, when Winner is Jetmir Salaj?`:
```sql
                SELECT "series" FROM "series_details" WHERE "winner"='jetmir salaj';
```
## Task
Generate a SQL query to answer the following question:
`What is Highest Days, when Launch Date is 23 January 2010?`

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

CREATE TABLE "series_details" (
  "series" text,
  "host" text,
  "launch_date" text,
  "finale_date" text,
  "days" real,
  "winner" text,
  "prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Highest Days, when Launch Date is 23 January 2010?`:
```sql
                SELECT MAX("days") FROM "series_details" WHERE "launch_date"='23 january 2010';
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest Rank, when Name is Jeremiah Massey, and when Games is less than 20?`

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

CREATE TABLE "points" (
  "rank" real,
  "name" text,
  "team" text,
  "games" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Rank, when Name is Jeremiah Massey, and when Games is less than 20?`:
```sql
                SELECT MIN("rank") FROM "points" WHERE "name"='jeremiah massey' AND "games"<20;
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest Games, when Name is Jeremiah Massey, and when Points is less than 340?`

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

CREATE TABLE "points" (
  "rank" real,
  "name" text,
  "team" text,
  "games" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Games, when Name is Jeremiah Massey, and when Points is less than 340?`:
```sql
                SELECT MIN("games") FROM "points" WHERE "name"='jeremiah massey' AND "points"<340;
```
## Task
Generate a SQL query to answer the following question:
`What is the lowest Points, when Games is greater than 20, and when Team is Partizan Belgrade?`

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

CREATE TABLE "points" (
  "rank" real,
  "name" text,
  "team" text,
  "games" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Points, when Games is greater than 20, and when Team is Partizan Belgrade?`:
```sql
                SELECT MIN("points") FROM "points" WHERE "games">20 AND "team"='partizan belgrade';
```
## Task
Generate a SQL query to answer the following question:
`What is Games, when Points is less than 340, and when Rank is greater than 3?`

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

CREATE TABLE "points" (
  "rank" real,
  "name" text,
  "team" text,
  "games" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Games, when Points is less than 340, and when Rank is greater than 3?`:
```sql
                SELECT "games" FROM "points" WHERE "points"<340 AND "rank">3;
```
## Task
Generate a SQL query to answer the following question:
`What is the sum of Rank, when Name is Will Solomon, and when Games is greater than 21?`

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

CREATE TABLE "points" (
  "rank" real,
  "name" text,
  "team" text,
  "games" real,
  "points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Rank, when Name is Will Solomon, and when Games is greater than 21?`:
```sql
                SELECT SUM("rank") FROM "points" WHERE "name"='will solomon' AND "games">21;
```
## Task
Generate a SQL query to answer the following question:
`What was the first leg score in the match against Twente?`

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

CREATE TABLE "borussia_m_nchengladbach" (
  "round" text,
  "opposition" text,
  "first_leg" text,
  "second_leg" text,
  "aggregate_score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the first leg score in the match against Twente?`:
```sql
                SELECT "first_leg" FROM "borussia_m_nchengladbach" WHERE "opposition"='twente';
```
## Task
Generate a SQL query to answer the following question:
`What was the first leg score in the 2nd round?`

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

CREATE TABLE "borussia_m_nchengladbach" (
  "round" text,
  "opposition" text,
  "first_leg" text,
  "second_leg" text,
  "aggregate_score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the first leg score in the 2nd round?`:
```sql
                SELECT "first_leg" FROM "borussia_m_nchengladbach" WHERE "round"='2nd';
```
## Task
Generate a SQL query to answer the following question:
`What were the Bills points on Nov. 11?`

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

CREATE TABLE "schedule" (
  "game" real,
  "date" text,
  "opponent" text,
  "result" text,
  "bills_points" real,
  "opponents" real,
  "bills_first_downs" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the Bills points on Nov. 11?`:
```sql
                SELECT SUM("bills_points") FROM "schedule" WHERE "date"='nov. 11';
```
## Task
Generate a SQL query to answer the following question:
`What was the Bills first downs on Oct. 29 with more the 23 Bills points?`

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

CREATE TABLE "schedule" (
  "game" real,
  "date" text,
  "opponent" text,
  "result" text,
  "bills_points" real,
  "opponents" real,
  "bills_first_downs" real,
  "record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Bills first downs on Oct. 29 with more the 23 Bills points?`:
```sql
                SELECT MIN("bills_first_downs") FROM "schedule" WHERE "date"='oct. 29' AND "bills_points">23;
```
## Task
Generate a SQL query to answer the following question:
`What was the Bill's attendance on December 6?`

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

CREATE TABLE "season_schedule" (
  "week" real,
  "date" text,
  "opponent" text,
  "result" text,
  "attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Bill's attendance on December 6?`:
```sql
                SELECT "attendance" FROM "season_schedule" WHERE "date"='december 6';
```
## Task
Generate a SQL query to answer the following question:
`On what date did the Bills play the Houston Oilers before week 12?`

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

CREATE TABLE "season_schedule" (
  "week" real,
  "date" text,
  "opponent" text,
  "result" text,
  "attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date did the Bills play the Houston Oilers before week 12?`:
```sql
                SELECT "date" FROM "season_schedule" WHERE "week"<12 AND "opponent"='houston oilers';
```
## Task
Generate a SQL query to answer the following question:
`Which team won on the day when attendance was 42,308?`

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

CREATE TABLE "season_schedule" (
  "week" real,
  "date" text,
  "opponent" text,
  "result" text,
  "attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team won on the day when attendance was 42,308?`:
```sql
                SELECT "result" FROM "season_schedule" WHERE "attendance"='42,308';
```
## Task
Generate a SQL query to answer the following question:
`What week of the season was December 13?`

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

CREATE TABLE "season_schedule" (
  "week" real,
  "date" text,
  "opponent" text,
  "result" text,
  "attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What week of the season was December 13?`:
```sql
                SELECT "week" FROM "season_schedule" WHERE "date"='december 13';
```
## Task
Generate a SQL query to answer the following question:
`What is the highest Points in Position 2 with more than 3 Drawn games?`

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

CREATE TABLE "campeonato_paulista" (
  "position" real,
  "team" text,
  "points" real,
  "played" real,
  "drawn" real,
  "lost" real,
  "against" real,
  "difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Points in Position 2 with more than 3 Drawn games?`:
```sql
                SELECT MAX("points") FROM "campeonato_paulista" WHERE "position"=2 AND "drawn">3;
```
## Task
Generate a SQL query to answer the following question:
`What is the goal Difference at Position 5?`

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

CREATE TABLE "campeonato_paulista" (
  "position" real,
  "team" text,
  "points" real,
  "played" real,
  "drawn" real,
  "lost" real,
  "against" real,
  "difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the goal Difference at Position 5?`:
```sql
                SELECT "difference" FROM "campeonato_paulista" WHERE "position"=5;
```
## Task
Generate a SQL query to answer the following question:
`What is the average games Played with positions higher than 3 that have goals Against less than 27 and a Lost games smaller than 6?`

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

CREATE TABLE "campeonato_paulista" (
  "position" real,
  "team" text,
  "points" real,
  "played" real,
  "drawn" real,
  "lost" real,
  "against" real,
  "difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average games Played with positions higher than 3 that have goals Against less than 27 and a Lost games smaller than 6?`:
```sql
                SELECT AVG("played") FROM "campeonato_paulista" WHERE "position">3 AND "against"<27 AND "lost"<6;
```
## Task
Generate a SQL query to answer the following question:
`What is the highest Points with a Lost total of 8?`

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

CREATE TABLE "campeonato_paulista" (
  "position" real,
  "team" text,
  "points" real,
  "played" real,
  "drawn" real,
  "lost" real,
  "against" real,
  "difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Points with a Lost total of 8?`:
```sql
                SELECT MAX("points") FROM "campeonato_paulista" WHERE "lost"=8;
```
## Task
Generate a SQL query to answer the following question:
`Which average Points has a Lost higher than 20?`

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

CREATE TABLE "campeonato_paulista" (
  "position" real,
  "team" text,
  "points" real,
  "played" real,
  "drawn" real,
  "lost" real,
  "against" real,
  "difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which average Points has a Lost higher than 20?`:
```sql
                SELECT AVG("points") FROM "campeonato_paulista" WHERE "lost">20;
```
## Task
Generate a SQL query to answer the following question:
`What are the Cuts made with a Top-10 smaller than 2?`

### 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,
  "top_10" real,
  "top_25" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are the Cuts made with a Top-10 smaller than 2?`:
```sql
                SELECT SUM("cuts_made") FROM "summary" WHERE "top_10"<2;
```
## Task
Generate a SQL query to answer the following question:
`What is the Top-25 with a Top-10 of 8, and an Events of 45?`

### 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,
  "top_10" real,
  "top_25" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Top-25 with a Top-10 of 8, and an Events of 45?`:
```sql
                SELECT AVG("top_25") FROM "summary" WHERE "top_10"=8 AND "events"=45;
```
## Task
Generate a SQL query to answer the following question:
`What is the Top-25 with an Events of 20, and a Wins larger than 2?`

### 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,
  "top_10" real,
  "top_25" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Top-25 with an Events of 20, and a Wins larger than 2?`:
```sql
                SELECT AVG("top_25") FROM "summary" WHERE "events"=20 AND "wins">2;
```
## Task
Generate a SQL query to answer the following question:
`Which Top-10 has a Top-25 smaller than 18, and a Top-5 of 6, and a Cuts made smaller than 20?`

### 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,
  "top_10" real,
  "top_25" real,
  "events" real,
  "cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Top-10 has a Top-25 smaller than 18, and a Top-5 of 6, and a Cuts made smaller than 20?`:
```sql
                SELECT MAX("top_10") FROM "summary" WHERE "top_25"<18 AND "top_5"=6 AND "cuts_made"<20;
```
## Task
Generate a SQL query to answer the following question:
`What is Top Par, when Score is less than 68, and when Country is England?`

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

CREATE TABLE "first_round_thursday" (
  "place" text,
  "player" text,
  "country" text,
  "score" real,
  "to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Top Par, when Score is less than 68, and when Country is England?`:
```sql
                SELECT "to_par" FROM "first_round_thursday" WHERE "score"<68 AND "country"='england';
```
## Task
Generate a SQL query to answer the following question:
`What is Sum of Score, when Player is Vijay Singh?`

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

CREATE TABLE "first_round_thursday" (
  "place" text,
  "player" text,
  "country" text,
  "score" real,
  "to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Sum of Score, when Player is Vijay Singh?`:
```sql
                SELECT SUM("score") FROM "first_round_thursday" WHERE "player"='vijay singh';
```