output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "player" FROM "2000_indiana_fever_miami_sol_portland_fi" WHERE "new_wnba_team"='miami sol' AND "college_country_team"='north carolina state'; |
## Task
Generate a SQL query to answer the following question:
`Who is the player who played for the Miami Sol and went to school at North Carolina State?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000_indiana_fever_miami_sol_portland_fi" (
"pick" real,
"player" text,
"nationality" text,
"new_wnba_team" text,
"former_wnba_team" text,
"college_country_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the player who played for the Miami Sol and went to school at North Carolina State?`:
```sql
|
SELECT AVG("ast_avg") FROM "assists" WHERE "games">101 AND "rank"=5 AND "total_assists"<331; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE AVG AST FOR GAMES LARGER THAN 101, RANK 5, TOTAL ASSISTS SMALLER THAN 331?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "assists" (
"rank" real,
"player" text,
"years" text,
"games" real,
"ast_avg" real,
"total_assists" real
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE AVG AST FOR GAMES LARGER THAN 101, RANK 5, TOTAL ASSISTS SMALLER THAN 331?`:
```sql
|
SELECT SUM("ast_avg") FROM "assists" WHERE "rank"=5 AND "games">108; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE SUM OF AST AVG WITH RANK 5 AND GAMES BIGGER THAN 108?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "assists" (
"rank" real,
"player" text,
"years" text,
"games" real,
"ast_avg" real,
"total_assists" real
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE SUM OF AST AVG WITH RANK 5 AND GAMES BIGGER THAN 108?`:
```sql
|
SELECT "round" FROM "washington_redskins_draft_history" WHERE "name"='john goodyear'; |
## Task
Generate a SQL query to answer the following question:
`Which Round has a Name of john goodyear?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "washington_redskins_draft_history" (
"round" real,
"pick" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Round has a Name of john goodyear?`:
```sql
|
SELECT COUNT("round") FROM "washington_redskins_draft_history" WHERE "college"='appalachian state' AND "overall"<156; |
## Task
Generate a SQL query to answer the following question:
`Which Round has a College of appalachian state, and an Overall smaller than 156?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "washington_redskins_draft_history" (
"round" real,
"pick" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Round has a College of appalachian state, and an Overall smaller than 156?`:
```sql
|
SELECT COUNT("pick") FROM "washington_redskins_draft_history" WHERE "round">17 AND "name"='gene stewart'; |
## Task
Generate a SQL query to answer the following question:
`Which Pick has a Round larger than 17, and a Name of gene stewart?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "washington_redskins_draft_history" (
"round" real,
"pick" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Pick has a Round larger than 17, and a Name of gene stewart?`:
```sql
|
SELECT "res" FROM "mixed_martial_arts_record" WHERE "opponent"='rory markham'; |
## Task
Generate a SQL query to answer the following question:
`What was the result when the opponent was Rory Markham?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result when the opponent was Rory Markham?`:
```sql
|
SELECT "branding" FROM "am_stations_radyo_agila" WHERE "frequency"='1080khz'; |
## Task
Generate a SQL query to answer the following question:
`Which Branding has a frequency of 1080khz?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "am_stations_radyo_agila" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Branding has a frequency of 1080khz?`:
```sql
|
SELECT "frequency" FROM "am_stations_radyo_agila" WHERE "location"='dagupan'; |
## Task
Generate a SQL query to answer the following question:
`Which frequency is located in Dagupan?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "am_stations_radyo_agila" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which frequency is located in Dagupan?`:
```sql
|
SELECT "frequency" FROM "am_stations_radyo_agila" WHERE "branding"='dzec radyo agila 1062'; |
## Task
Generate a SQL query to answer the following question:
`What frequency does branding dzec radyo agila 1062 have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "am_stations_radyo_agila" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What frequency does branding dzec radyo agila 1062 have?`:
```sql
|
SELECT "frequency" FROM "am_stations_radyo_agila" WHERE "power_k_w"='40kw'; |
## Task
Generate a SQL query to answer the following question:
`Which frequency has 40kw power?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "am_stations_radyo_agila" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which frequency has 40kw power?`:
```sql
|
SELECT "frequency" FROM "am_stations_radyo_agila" WHERE "location"='davao'; |
## Task
Generate a SQL query to answer the following question:
`Which frequency is located in Davao?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "am_stations_radyo_agila" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which frequency is located in Davao?`:
```sql
|
SELECT "peak_population_year" FROM "cities_formerly_over_100_000_people" WHERE "city"='scranton'; |
## Task
Generate a SQL query to answer the following question:
`what is the peak population (year) for scranton?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cities_formerly_over_100_000_people" (
"city" text,
"state" text,
"2010_population" text,
"peak_population_year" text,
"numeric_decline_from_peak_population" text,
"percent_decline_from_peak_population" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the peak population (year) for scranton?`:
```sql
|
SELECT "numeric_decline_from_peak_population" FROM "cities_formerly_over_100_000_people" WHERE "percent_decline_from_peak_population"='-16.76%'; |
## Task
Generate a SQL query to answer the following question:
`what is the numeric decline from peak population when the perfect decline from peak population is -16.76%`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cities_formerly_over_100_000_people" (
"city" text,
"state" text,
"2010_population" text,
"peak_population_year" text,
"numeric_decline_from_peak_population" text,
"percent_decline_from_peak_population" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the numeric decline from peak population when the perfect decline from peak population is -16.76%`:
```sql
|
SELECT "numeric_decline_from_peak_population" FROM "cities_formerly_over_100_000_people" WHERE "2010_population"='88857'; |
## Task
Generate a SQL query to answer the following question:
`what is the numeric decline from peak population when 2010 population is 88857?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cities_formerly_over_100_000_people" (
"city" text,
"state" text,
"2010_population" text,
"peak_population_year" text,
"numeric_decline_from_peak_population" text,
"percent_decline_from_peak_population" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the numeric decline from peak population when 2010 population is 88857?`:
```sql
|
SELECT "state" FROM "cities_formerly_over_100_000_people" WHERE "peak_population_year"='134995 (1950)'; |
## Task
Generate a SQL query to answer the following question:
`what is the state when the peak population (year) is 134995 (1950)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cities_formerly_over_100_000_people" (
"city" text,
"state" text,
"2010_population" text,
"peak_population_year" text,
"numeric_decline_from_peak_population" text,
"percent_decline_from_peak_population" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the state when the peak population (year) is 134995 (1950)?`:
```sql
|
SELECT "percent_decline_from_peak_population" FROM "cities_formerly_over_100_000_people" WHERE "peak_population_year"='178320 (1960)'; |
## Task
Generate a SQL query to answer the following question:
`what is the percent decline from peak population when the peak population (year) is 178320 (1960)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cities_formerly_over_100_000_people" (
"city" text,
"state" text,
"2010_population" text,
"peak_population_year" text,
"numeric_decline_from_peak_population" text,
"percent_decline_from_peak_population" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the percent decline from peak population when the peak population (year) is 178320 (1960)?`:
```sql
|
SELECT "rank" FROM "highest_grossing_films_u_s" WHERE "studio"='universal' AND "director"='john hughes'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE RANK OF UNIVERSAL, AND DIRECTOR JOHN HUGHES?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_grossing_films_u_s" (
"rank" real,
"title" text,
"studio" text,
"director" text,
"gross" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE RANK OF UNIVERSAL, AND DIRECTOR JOHN HUGHES?`:
```sql
|
SELECT "title" FROM "highest_grossing_films_u_s" WHERE "rank">10 AND "director"='walter hill'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE TITLE THAT HAS A RANK BIGGER THAN 10, FOR DIRECTOR WALTER HILL?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_grossing_films_u_s" (
"rank" real,
"title" text,
"studio" text,
"director" text,
"gross" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE TITLE THAT HAS A RANK BIGGER THAN 10, FOR DIRECTOR WALTER HILL?`:
```sql
|
SELECT "studio" FROM "highest_grossing_films_u_s" WHERE "title"='mask'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE STUDIO WITH THE TITLE MASK?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_grossing_films_u_s" (
"rank" real,
"title" text,
"studio" text,
"director" text,
"gross" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE STUDIO WITH THE TITLE MASK?`:
```sql
|
SELECT COUNT("rank") FROM "highest_grossing_films_u_s" WHERE "gross"='$96,773,200'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE RANK WITH A GROSS OF $96,773,200?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_grossing_films_u_s" (
"rank" real,
"title" text,
"studio" text,
"director" text,
"gross" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE RANK WITH A GROSS OF $96,773,200?`:
```sql
|
SELECT "drawn" FROM "premier_division_final_table" WHERE "lost"<12 AND "goal_difference"='+20'; |
## Task
Generate a SQL query to answer the following question:
`How many times was the player drawn that had less than 12 losses and a goal difference of +20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "premier_division_final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many times was the player drawn that had less than 12 losses and a goal difference of +20?`:
```sql
|
SELECT SUM("position") FROM "premier_division_final_table" WHERE "drawn"=10 AND "lost"<25 AND "goal_difference"='+20' AND "played"<42; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the positions for the player who had less than 25 losses, a goal difference of +20, 10 draws, and played less than 42?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "premier_division_final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the positions for the player who had less than 25 losses, a goal difference of +20, 10 draws, and played less than 42?`:
```sql
|
SELECT MAX("played") FROM "premier_division_final_table" WHERE "lost"<13 AND "goal_difference"='+46'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number played when there were less than 13 losses and a goal difference of +46?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "premier_division_final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number played when there were less than 13 losses and a goal difference of +46?`:
```sql
|
SELECT "points_1" FROM "premier_division_final_table" WHERE "position">4 AND "goals_for"=54 AND "lost">11; |
## Task
Generate a SQL query to answer the following question:
`What is listed under points 1 when the position was greater than 4, there were 54 goals for and more than 11 losses?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "premier_division_final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is listed under points 1 when the position was greater than 4, there were 54 goals for and more than 11 losses?`:
```sql
|
SELECT "worship_leader" FROM "track_listing_cd" WHERE "lead_supporting_vocal"='marcus temu'; |
## Task
Generate a SQL query to answer the following question:
`Who was the worship leader that had a lead supporting vocal Marcus Temu?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing_cd" (
"track" real,
"song" text,
"author" text,
"worship_leader" text,
"lead_supporting_vocal" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the worship leader that had a lead supporting vocal Marcus Temu?`:
```sql
|
SELECT "lead_supporting_vocal" FROM "track_listing_cd" WHERE "time"='4:54'; |
## Task
Generate a SQL query to answer the following question:
`Who was the lead supporting vocalist on the song that was 4:54 long?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing_cd" (
"track" real,
"song" text,
"author" text,
"worship_leader" text,
"lead_supporting_vocal" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the lead supporting vocalist on the song that was 4:54 long?`:
```sql
|
SELECT "worship_leader" FROM "track_listing_cd" WHERE "time"='7:05'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Worship Leader for the song that was 7:05 long?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing_cd" (
"track" real,
"song" text,
"author" text,
"worship_leader" text,
"lead_supporting_vocal" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Worship Leader for the song that was 7:05 long?`:
```sql
|
SELECT "song" FROM "track_listing_cd" WHERE "lead_supporting_vocal"='marcus temu'; |
## Task
Generate a SQL query to answer the following question:
`What is the song name that featured Marcus Temu as the lead supporting vocalist?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing_cd" (
"track" real,
"song" text,
"author" text,
"worship_leader" text,
"lead_supporting_vocal" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the song name that featured Marcus Temu as the lead supporting vocalist?`:
```sql
|
SELECT MIN("diameter") FROM "sulci" WHERE "longitude"='71.1w'; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest diameter when the longitude is 71.1w?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sulci" (
"name" text,
"latitude" text,
"longitude" text,
"diameter" real,
"year_named" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the lowest diameter when the longitude is 71.1w?`:
```sql
|
SELECT "longitude" FROM "sulci" WHERE "diameter"<'1,575.0' AND "year_named"=1997 AND "name"='philae sulcus'; |
## Task
Generate a SQL query to answer the following question:
`What's the longitude for philae sulcus in 1997 with a diameter less than 1,575.0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sulci" (
"name" text,
"latitude" text,
"longitude" text,
"diameter" real,
"year_named" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the longitude for philae sulcus in 1997 with a diameter less than 1,575.0?`:
```sql
|
SELECT MIN("diameter") FROM "sulci" WHERE "name"='dardanus sulcus'; |
## Task
Generate a SQL query to answer the following question:
`What is dardanus sulcus' lowest diameter?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sulci" (
"name" text,
"latitude" text,
"longitude" text,
"diameter" real,
"year_named" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is dardanus sulcus' lowest diameter?`:
```sql
|
SELECT COUNT("year_named") FROM "sulci" WHERE "name"='ur sulcus' AND "diameter"<'1,145.0'; |
## Task
Generate a SQL query to answer the following question:
`How many years is ur sulcus listed with a diameter less than 1,145.0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sulci" (
"name" text,
"latitude" text,
"longitude" text,
"diameter" real,
"year_named" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many years is ur sulcus listed with a diameter less than 1,145.0?`:
```sql
|
SELECT "score" FROM "round_6" WHERE "attendance"=3188; |
## Task
Generate a SQL query to answer the following question:
`When the attendance was 3188 what was the score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"date" text,
"home" text,
"score" text,
"away" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `When the attendance was 3188 what was the score?`:
```sql
|
SELECT MAX("attendance") FROM "round_6" WHERE "date"='16 august 2008' AND "home"='deportes savio'; |
## Task
Generate a SQL query to answer the following question:
`What is the maximum number of people in attendance on 16 August 2008 when the home team was Deportes Savio?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"date" text,
"home" text,
"score" text,
"away" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the maximum number of people in attendance on 16 August 2008 when the home team was Deportes Savio?`:
```sql
|
SELECT "away" FROM "round_6" WHERE "home"='deportes savio'; |
## Task
Generate a SQL query to answer the following question:
`What team was the away team when the Deportes Savio was the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"date" text,
"home" text,
"score" text,
"away" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the away team when the Deportes Savio was the home team?`:
```sql
|
SELECT "away" FROM "round_6" WHERE "score"='3:1'; |
## Task
Generate a SQL query to answer the following question:
`What was the away team when the score was 3:1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"date" text,
"home" text,
"score" text,
"away" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the away team when the score was 3:1?`:
```sql
|
SELECT "attendance" FROM "round_6" WHERE "date"='16 august 2008' AND "away"='platense'; |
## Task
Generate a SQL query to answer the following question:
`When Platense was the away team on 16 August 2008 how many people attended the game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"date" text,
"home" text,
"score" text,
"away" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `When Platense was the away team on 16 August 2008 how many people attended the game?`:
```sql
|
SELECT "score" FROM "round_6" WHERE "attendance"=2441; |
## Task
Generate a SQL query to answer the following question:
`What was the score when 2441 people were in attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"date" text,
"home" text,
"score" text,
"away" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score when 2441 people were in attendance?`:
```sql
|
SELECT "driver" FROM "classification" WHERE "points"='35+3'; |
## Task
Generate a SQL query to answer the following question:
`Which driver had 35+3 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"fin_pos" text,
"car_no" text,
"driver" text,
"team" text,
"laps" text,
"time_retired" text,
"grid" text,
"laps_led" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which driver had 35+3 points?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "points"='14'; |
## Task
Generate a SQL query to answer the following question:
`What was the time/retired for the driver with 14 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"fin_pos" text,
"car_no" text,
"driver" text,
"team" text,
"laps" text,
"time_retired" text,
"grid" text,
"laps_led" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the time/retired for the driver with 14 points?`:
```sql
|
SELECT "total" FROM "second_division" WHERE "league_cup_goals"='4' AND "fa_cup_goals"='0'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of goals when the league cup goals are 4 and the FA cup goals are 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_division" (
"scorer" text,
"club" text,
"league_goals" text,
"fa_cup_goals" text,
"league_cup_goals" text,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of goals when the league cup goals are 4 and the FA cup goals are 0?`:
```sql
|
SELECT "fa_cup_goals" FROM "second_division" WHERE "total">16 AND "league_cup_goals"='1' AND "club"='norwich city'; |
## Task
Generate a SQL query to answer the following question:
`What is the amount of FA cups goals that were made when the total goals is greater than 16, and the league cup goals is 1 for the Norwich City club?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_division" (
"scorer" text,
"club" text,
"league_goals" text,
"fa_cup_goals" text,
"league_cup_goals" text,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the amount of FA cups goals that were made when the total goals is greater than 16, and the league cup goals is 1 for the Norwich City club?`:
```sql
|
SELECT "league_goals" FROM "second_division" WHERE "league_cup_goals"='0' AND "scorer"='bill dearden'; |
## Task
Generate a SQL query to answer the following question:
`What is the number of league goals when Bill Dearden was the scorer and there was 0 league cup goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_division" (
"scorer" text,
"club" text,
"league_goals" text,
"fa_cup_goals" text,
"league_cup_goals" text,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of league goals when Bill Dearden was the scorer and there was 0 league cup goals?`:
```sql
|
SELECT "name" FROM "players_in" WHERE "transfer_window"='summer' AND "transfer_fee"='undisclosed' AND "moving_from"='brussels'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the player with a transfer window in summer, an undisclosed transfer fee, and is moving from brussels?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the player with a transfer window in summer, an undisclosed transfer fee, and is moving from brussels?`:
```sql
|
SELECT "type" FROM "players_in" WHERE "transfer_window"='summer' AND "name"='bulykin'; |
## Task
Generate a SQL query to answer the following question:
`What is the type of bulykin, which has a summer transfer window?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the type of bulykin, which has a summer transfer window?`:
```sql
|
SELECT "country" FROM "players_in" WHERE "name"='cordier'; |
## Task
Generate a SQL query to answer the following question:
`What is the country of cordier?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the country of cordier?`:
```sql
|
SELECT "country" FROM "players_in" WHERE "transfer_window"='summer' AND "moving_from"='belgrano'; |
## Task
Generate a SQL query to answer the following question:
`What is the country of the player moving from belgrano with a summer transfer window?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the country of the player moving from belgrano with a summer transfer window?`:
```sql
|
SELECT "transfer_window" FROM "players_in" WHERE "moving_from"='barueri'; |
## Task
Generate a SQL query to answer the following question:
`What is the transfer window of the player moving from barueri?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the transfer window of the player moving from barueri?`:
```sql
|
SELECT "type" FROM "players_in" WHERE "moving_from"='belgrano'; |
## Task
Generate a SQL query to answer the following question:
`What is the type of the player moving from belgrano?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the type of the player moving from belgrano?`:
```sql
|
SELECT AVG("round") FROM "washington_redskins_draft_history" WHERE "pick"=22 AND "overall"<229; |
## Task
Generate a SQL query to answer the following question:
`Average round for 22 pick that is overall smaller than 229?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "washington_redskins_draft_history" (
"round" real,
"pick" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Average round for 22 pick that is overall smaller than 229?`:
```sql
|
SELECT AVG("2002") FROM "copper_production_thousands_tonnes" WHERE "country"='peru' AND "2007">'1,200'; |
## Task
Generate a SQL query to answer the following question:
`What is the normal 2002 that has a Country of Peru, and 2007 bigger than 1,200?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "copper_production_thousands_tonnes" (
"country" text,
"2002" real,
"2003" real,
"2004" real,
"2005" real,
"2006" real,
"2007" real,
"2008" real,
"2009" real,
"2010" real,
"2011" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the normal 2002 that has a Country of Peru, and 2007 bigger than 1,200?`:
```sql
|
SELECT MIN("2007") FROM "copper_production_thousands_tonnes" WHERE "2008"<'1,270' AND "2003">870; |
## Task
Generate a SQL query to answer the following question:
`What is the most reduced 2007 that has 2008 littler than 1,270, and 2003 bigger than 870?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "copper_production_thousands_tonnes" (
"country" text,
"2002" real,
"2003" real,
"2004" real,
"2005" real,
"2006" real,
"2007" real,
"2008" real,
"2009" real,
"2010" real,
"2011" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the most reduced 2007 that has 2008 littler than 1,270, and 2003 bigger than 870?`:
```sql
|
SELECT MAX("2006") FROM "copper_production_thousands_tonnes" WHERE "2008"<'5,330' AND "country"='peru' AND "2009"<'1,260'; |
## Task
Generate a SQL query to answer the following question:
`What is the most noteworthy 2006 that has 2008 littler than 5,330, and a Country of Peru, and 2009 littler than 1,260?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "copper_production_thousands_tonnes" (
"country" text,
"2002" real,
"2003" real,
"2004" real,
"2005" real,
"2006" real,
"2007" real,
"2008" real,
"2009" real,
"2010" real,
"2011" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the most noteworthy 2006 that has 2008 littler than 5,330, and a Country of Peru, and 2009 littler than 1,260?`:
```sql
|
SELECT MIN("2009") FROM "copper_production_thousands_tonnes" WHERE "2005"<640 AND "2011"=425 AND "2003"<500; |
## Task
Generate a SQL query to answer the following question:
`What is the least 2009 that has 2005 littler than 640, and 2011 of 425, and 2003 littler than 500?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "copper_production_thousands_tonnes" (
"country" text,
"2002" real,
"2003" real,
"2004" real,
"2005" real,
"2006" real,
"2007" real,
"2008" real,
"2009" real,
"2010" real,
"2011" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least 2009 that has 2005 littler than 640, and 2011 of 425, and 2003 littler than 500?`:
```sql
|
SELECT COUNT("2005") FROM "copper_production_thousands_tonnes" WHERE "2004">'1,040' AND "country"='chile' AND "2006"<'5,560'; |
## Task
Generate a SQL query to answer the following question:
`What is the aggregate number of 2005 that has 2004 bigger than 1,040, and a Country of Chile, and 2006 littler than 5,560?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "copper_production_thousands_tonnes" (
"country" text,
"2002" real,
"2003" real,
"2004" real,
"2005" real,
"2006" real,
"2007" real,
"2008" real,
"2009" real,
"2010" real,
"2011" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the aggregate number of 2005 that has 2004 bigger than 1,040, and a Country of Chile, and 2006 littler than 5,560?`:
```sql
|
SELECT MAX("bronze") FROM "medal_table" WHERE "silver"<0; |
## Task
Generate a SQL query to answer the following question:
`How many Bronze medals did the Nation with 0 Silver receive?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_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 many Bronze medals did the Nation with 0 Silver receive?`:
```sql
|
SELECT MIN("gold") FROM "medal_table" WHERE "total"<8 AND "bronze"<1 AND "silver"<1; |
## Task
Generate a SQL query to answer the following question:
`How many Gold medals did the Nation with less than 8 Total medals including 1 Bronze and 0 Silver receive?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_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 many Gold medals did the Nation with less than 8 Total medals including 1 Bronze and 0 Silver receive?`:
```sql
|
SELECT AVG("total") FROM "medal_table" WHERE "bronze"<0; |
## Task
Generate a SQL query to answer the following question:
`How many Total medals did the Nation the got 0 Bronze medals receive?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_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 many Total medals did the Nation the got 0 Bronze medals receive?`:
```sql
|
SELECT "nation" FROM "medal_table" WHERE "silver"<3 AND "total">1 AND "gold"<4 AND "rank"='4'; |
## Task
Generate a SQL query to answer the following question:
`What Nation had a more than 1 Total medal including less than 3 Silver, less than 4 Gold and a Rank of 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_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 `What Nation had a more than 1 Total medal including less than 3 Silver, less than 4 Gold and a Rank of 4?`:
```sql
|
SELECT SUM("silver") FROM "medal_table" WHERE "gold"<1 AND "rank"='8' AND "total">1; |
## Task
Generate a SQL query to answer the following question:
`How many Silver medals did the Nation ranking 8 with more than 1 Total medal but less than 1 Gold receive?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_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 many Silver medals did the Nation ranking 8 with more than 1 Total medal but less than 1 Gold receive?`:
```sql
|
SELECT "start" FROM "series_summary" WHERE "main_host"='luke jacobz' AND "winning_mentor"='dannii minogue'; |
## Task
Generate a SQL query to answer the following question:
`What is the start date with Luke Jacobz hosting and Dannii Minogue as a winning mentor?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_summary" (
"series" text,
"start" text,
"finish" text,
"winner" text,
"runner_up" text,
"third_place" text,
"winning_mentor" text,
"main_host" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the start date with Luke Jacobz hosting and Dannii Minogue as a winning mentor?`:
```sql
|
SELECT "third_place" FROM "series_summary" WHERE "winning_mentor"='guy sebastian' AND "runner_up"='andrew wishart'; |
## Task
Generate a SQL query to answer the following question:
`Who was in third place when Guy Sebastian was the winning mentor and Andrew Wishart was the runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_summary" (
"series" text,
"start" text,
"finish" text,
"winner" text,
"runner_up" text,
"third_place" text,
"winning_mentor" text,
"main_host" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was in third place when Guy Sebastian was the winning mentor and Andrew Wishart was the runner-up?`:
```sql
|
SELECT SUM("election") FROM "municipalities_in_trentino" WHERE "mayor"='adalberto mosaner' AND "inhabitants"<'16,170'; |
## Task
Generate a SQL query to answer the following question:
`In what Election year was Adalberto Mosaner the Mayor with less than 16,170 Inhabitants?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "municipalities_in_trentino" (
"municipality" text,
"inhabitants" real,
"mayor" text,
"party" text,
"election" real
);
### SQL
Given the database schema, here is the SQL query that answers `In what Election year was Adalberto Mosaner the Mayor with less than 16,170 Inhabitants?`:
```sql
|
SELECT COUNT("election") FROM "municipalities_in_trentino" WHERE "inhabitants"<'16,170'; |
## Task
Generate a SQL query to answer the following question:
`In what Election year were there less than 16,170 Inhabitants?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "municipalities_in_trentino" (
"municipality" text,
"inhabitants" real,
"mayor" text,
"party" text,
"election" real
);
### SQL
Given the database schema, here is the SQL query that answers `In what Election year were there less than 16,170 Inhabitants?`:
```sql
|
SELECT "mayor" FROM "municipalities_in_trentino" WHERE "election"=2010 AND "municipality"='riva del garda'; |
## Task
Generate a SQL query to answer the following question:
`What is the Mayor of Riva del Garda in 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "municipalities_in_trentino" (
"municipality" text,
"inhabitants" real,
"mayor" text,
"party" text,
"election" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Mayor of Riva del Garda in 2010?`:
```sql
|
SELECT AVG("inhabitants") FROM "municipalities_in_trentino" WHERE "party"='union for trentino' AND "election">2009; |
## Task
Generate a SQL query to answer the following question:
`How many Inhabitants were there after 2009 in the Municipality with a Party of union for trentino?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "municipalities_in_trentino" (
"municipality" text,
"inhabitants" real,
"mayor" text,
"party" text,
"election" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Inhabitants were there after 2009 in the Municipality with a Party of union for trentino?`:
```sql
|
SELECT MIN("enrollment") FROM "members" WHERE "founded"='1992' AND "joined_conference"<1998; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest enrolled school that was founded in 1992 and joined a conference before 1998?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members" (
"institution" text,
"location" text,
"founded" text,
"joined_conference" real,
"enrollment" real,
"nickname" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest enrolled school that was founded in 1992 and joined a conference before 1998?`:
```sql
|
SELECT "football" FROM "boys_league_championships" WHERE "soccer"='wooster' AND "golf"='ashland'; |
## Task
Generate a SQL query to answer the following question:
`Which foot ball team played soccer at wooster, and Gold in Ashland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "boys_league_championships" (
"school_year" text,
"football" text,
"cross_country" text,
"soccer" text,
"golf" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which foot ball team played soccer at wooster, and Gold in Ashland?`:
```sql
|
SELECT COUNT("total") FROM "women" WHERE "bronze"<2 AND "rank"<4 AND "silver"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the total for the team with fewer than 2 bronze, ranked less than 4 and fewer than 1 silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women" (
"rank" real,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total for the team with fewer than 2 bronze, ranked less than 4 and fewer than 1 silver?`:
```sql
|
SELECT COUNT("silver") FROM "women" WHERE "bronze">2 AND "gold">7; |
## Task
Generate a SQL query to answer the following question:
`How many silver for the team with more than 2 bronze and more than 7 gold?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women" (
"rank" real,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many silver for the team with more than 2 bronze and more than 7 gold?`:
```sql
|
SELECT SUM("total") FROM "women" WHERE "bronze"=0 AND "silver"=3; |
## Task
Generate a SQL query to answer the following question:
`What is the total for the team with 0 bronze and 3 silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women" (
"rank" real,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total for the team with 0 bronze and 3 silver?`:
```sql
|
SELECT COUNT("round") FROM "mixed_martial_arts_record" WHERE "location"='nevada, united states' AND "time"='1:55'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Rounds held in Nevada, United States in which the time was 1:55?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Rounds held in Nevada, United States in which the time was 1:55?`:
```sql
|
SELECT "time" FROM "mixed_martial_arts_record" WHERE "opponent"='rudy martin'; |
## Task
Generate a SQL query to answer the following question:
`What was the time when his opponent was Rudy Martin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the time when his opponent was Rudy Martin?`:
```sql
|
SELECT "method" FROM "mixed_martial_arts_record" WHERE "time"='1:52'; |
## Task
Generate a SQL query to answer the following question:
`What was the method when the fight's time was 1:52?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the method when the fight's time was 1:52?`:
```sql
|
SELECT MIN("overs") FROM "best_economy" WHERE "team"='chennai super kings' AND "best_bowling"='2/17' AND "economy_rate"<5.92; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest overs of the Chennai Super Kings when the Economy Rate is less than 5.92 with a Best Bowling number of 2/17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "best_economy" (
"player" text,
"team" text,
"matches" real,
"overs" real,
"economy_rate" real,
"wickets" real,
"average" real,
"strike_rate" real,
"best_bowling" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest overs of the Chennai Super Kings when the Economy Rate is less than 5.92 with a Best Bowling number of 2/17?`:
```sql
|
SELECT MIN("overs") FROM "best_economy" WHERE "team"='royal challengers bangalore'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of Overs for the Royal Challengers Bangalore?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "best_economy" (
"player" text,
"team" text,
"matches" real,
"overs" real,
"economy_rate" real,
"wickets" real,
"average" real,
"strike_rate" real,
"best_bowling" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest number of Overs for the Royal Challengers Bangalore?`:
```sql
|
SELECT MAX("strike_rate") FROM "best_economy" WHERE "matches"<13 AND "average"<50.25; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Strike Rate when the average is less than 50.25 with less than 13 matches played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "best_economy" (
"player" text,
"team" text,
"matches" real,
"overs" real,
"economy_rate" real,
"wickets" real,
"average" real,
"strike_rate" real,
"best_bowling" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Strike Rate when the average is less than 50.25 with less than 13 matches played?`:
```sql
|
SELECT "venue" FROM "achievements" WHERE "position"='4th'; |
## Task
Generate a SQL query to answer the following question:
`What is the venue of the race where Lineth Chepkurui placed 4th?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the venue of the race where Lineth Chepkurui placed 4th?`:
```sql
|
SELECT "venue" FROM "achievements" WHERE "notes"='team' AND "year"<2010; |
## Task
Generate a SQL query to answer the following question:
`What is the venue of the team race that was before 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the venue of the team race that was before 2010?`:
```sql
|
SELECT "venue" FROM "achievements" WHERE "year">2008 AND "notes"='team'; |
## Task
Generate a SQL query to answer the following question:
`What is the venue of the team race that was after 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the venue of the team race that was after 2008?`:
```sql
|
SELECT "competition" FROM "achievements" WHERE "position"='5th'; |
## Task
Generate a SQL query to answer the following question:
`What competition did Lineth Chepkurui place 5th?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What competition did Lineth Chepkurui place 5th?`:
```sql
|
SELECT MAX("total_votes") FROM "presidential_elections" WHERE "outcome"='elected' AND "candidate"='lee teng-hui'; |
## Task
Generate a SQL query to answer the following question:
`How many votes did Lee Teng-Hui receive when he was elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "presidential_elections" (
"election" real,
"candidate" text,
"running_mate" text,
"total_votes" real,
"share_of_votes" text,
"outcome" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many votes did Lee Teng-Hui receive when he was elected?`:
```sql
|
SELECT "score" FROM "s_league" WHERE "match"<13 AND "home_away"='home' AND "date"='april 21, 2008'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for a match before 13, and a home game on April 21, 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_league" (
"match" real,
"date" text,
"home_away" text,
"opponent_team" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score for a match before 13, and a home game on April 21, 2008?`:
```sql
|
SELECT "home_away" FROM "s_league" WHERE "date"='february 29, 2008'; |
## Task
Generate a SQL query to answer the following question:
`What home/away game is on February 29, 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_league" (
"match" real,
"date" text,
"home_away" text,
"opponent_team" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What home/away game is on February 29, 2008?`:
```sql
|
SELECT "home_team" FROM "third_round" WHERE "away_team"='manchester city'; |
## Task
Generate a SQL query to answer the following question:
`What team was the home team when Manchester City was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the home team when Manchester City was the away team?`:
```sql
|
SELECT SUM("points") FROM "riders" WHERE "equipment"='zabel-bsu' AND "position"=42; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Points, when Equipment was "Zabel-BSU", and when Position was 42?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "riders" (
"position" real,
"equipment" text,
"points" real,
"wins" text,
"second" text,
"third" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Points, when Equipment was "Zabel-BSU", and when Position was 42?`:
```sql
|
SELECT "equipment" FROM "riders" WHERE "points"<6 AND "position"=53; |
## Task
Generate a SQL query to answer the following question:
`What is Equipment, when Points is less than 6, and when Position is 53?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "riders" (
"position" real,
"equipment" text,
"points" real,
"wins" text,
"second" text,
"third" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Equipment, when Points is less than 6, and when Position is 53?`:
```sql
|
SELECT "second" FROM "riders" WHERE "position">33 AND "points">12 AND "equipment"='zabel-vmc'; |
## Task
Generate a SQL query to answer the following question:
`What is Second, when Position is greater than 33, when Points is greater than 12, and when Equipment is Zabel-VMC?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "riders" (
"position" real,
"equipment" text,
"points" real,
"wins" text,
"second" text,
"third" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Second, when Position is greater than 33, when Points is greater than 12, and when Equipment is Zabel-VMC?`:
```sql
|
SELECT "equipment" FROM "riders" WHERE "position">28 AND "points">10; |
## Task
Generate a SQL query to answer the following question:
`What is Equipment, when Position is greater than 28, and when Points is greater than 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "riders" (
"position" real,
"equipment" text,
"points" real,
"wins" text,
"second" text,
"third" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Equipment, when Position is greater than 28, and when Points is greater than 10?`:
```sql
|
SELECT "away_team_score" FROM "1st_round" WHERE "away_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`When Hawthorn is the away team, what is their score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1st_round" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When Hawthorn is the away team, what is their score?`:
```sql
|
SELECT "ground" FROM "1st_round" WHERE "crowd">'41,185'; |
## Task
Generate a SQL query to answer the following question:
`Which ground has a crowd over 41,185?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1st_round" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which ground has a crowd over 41,185?`:
```sql
|
SELECT "away_team_score" FROM "1st_round" WHERE "crowd">'12,314' AND "home_team_score"='17.7 (109)'; |
## Task
Generate a SQL query to answer the following question:
`When the crowd is larger than 12,314 and the home team score is 17.7 (109), what is the away team score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1st_round" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the crowd is larger than 12,314 and the home team score is 17.7 (109), what is the away team score?`:
```sql
|
SELECT "place" FROM "final_round" WHERE "score"='67-68-78-77=290'; |
## Task
Generate a SQL query to answer the following question:
`What place has a 67-68-78-77=290 score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" real,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What place has a 67-68-78-77=290 score?`:
```sql
|
SELECT MAX("to_par") FROM "final_round" WHERE "country"='united states' AND "place"='t3' AND "score"='74-73-72-69=288'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest to par of the player from the United States with a t3 place and a 74-73-72-69=288 place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" real,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest to par of the player from the United States with a t3 place and a 74-73-72-69=288 place?`:
```sql
|
SELECT "place" FROM "final_round" WHERE "money"='7,500' AND "player"='peter oosterhuis'; |
## Task
Generate a SQL query to answer the following question:
`What is the place of player peter oosterhuis, who has $7,500?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" real,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the place of player peter oosterhuis, who has $7,500?`:
```sql
|
SELECT "country" FROM "final_round" WHERE "score"='72-70-75-72=289'; |
## Task
Generate a SQL query to answer the following question:
`What country has a 72-70-75-72=289 score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" real,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country has a 72-70-75-72=289 score?`:
```sql
|
SELECT "player" FROM "final_round" WHERE "country"='united states' AND "to_par"=4 AND "score"='74-73-72-69=288'; |
## Task
Generate a SQL query to answer the following question:
`Who is the player from the United States with a 4 to par and a 74-73-72-69=288 score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" real,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the player from the United States with a 4 to par and a 74-73-72-69=288 score?`:
```sql
|
SELECT "money" FROM "final_round" WHERE "to_par"<4 AND "score"='74-72-68-73=287'; |
## Task
Generate a SQL query to answer the following question:
`How much money does the player with a to par less than 4 and a score of 74-72-68-73=287 have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" real,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `How much money does the player with a to par less than 4 and a score of 74-72-68-73=287 have?`:
```sql
|
SELECT "high_assists" FROM "game_log" WHERE "high_points"='tayshaun prince (23)'; |
## Task
Generate a SQL query to answer the following question:
`What is High Assists, when High Points is "Tayshaun Prince (23)"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is High Assists, when High Points is "Tayshaun Prince (23)"?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.