output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "score" FROM "second_round_proper" WHERE "tie_no"='2'; |
## Task
Generate a SQL query to answer the following question:
`What is the Score in Tie 2?`
### 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,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Score in Tie 2?`:
```sql
|
SELECT "tie_no" FROM "second_round_proper" WHERE "home_team"='scarborough'; |
## Task
Generate a SQL query to answer the following question:
`What is the Tie no when Scarborough is the Home 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,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Tie no when Scarborough is the Home team?`:
```sql
|
SELECT "tie_no" FROM "second_round_proper" WHERE "score"='2–2' AND "away_team"='swansea city'; |
## Task
Generate a SQL query to answer the following question:
`What is the Tie no when Swansea City is the Away team with a Score of 2–2?`
### 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,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Tie no when Swansea City is the Away team with a Score of 2–2?`:
```sql
|
SELECT "name" FROM "assembly_segments" WHERE "constituency_number"='5'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of constituency 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of constituency 5?`:
```sql
|
SELECT "label" FROM "studio_albums" WHERE "date_of_release"='september 20, 2005'; |
## Task
Generate a SQL query to answer the following question:
`What label is released on September 20, 2005?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "studio_albums" (
"date_of_release" text,
"title" text,
"billboard_peak" real,
"riaa_cert" text,
"label" text
);
### SQL
Given the database schema, here is the SQL query that answers `What label is released on September 20, 2005?`:
```sql
|
SELECT MIN("total") FROM "individual_rope" WHERE "all_around"=10 AND "rope">10; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest total with an all around of 10 and a rope higher than 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual_rope" (
"place" real,
"name" text,
"all_around" real,
"rope" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest total with an all around of 10 and a rope higher than 10?`:
```sql
|
SELECT MAX("total") FROM "individual_rope" WHERE "name"='bianka panova' AND "place"<1; |
## Task
Generate a SQL query to answer the following question:
`What is Bianka Panova's highest total with lower than place 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual_rope" (
"place" real,
"name" text,
"all_around" real,
"rope" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Bianka Panova's highest total with lower than place 1?`:
```sql
|
SELECT "place" FROM "individual_rope" WHERE "rope"<9.8 AND "name"='milena reljin'; |
## Task
Generate a SQL query to answer the following question:
`What is Milena Reljin's place with a smaller than 9.8 rope?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual_rope" (
"place" real,
"name" text,
"all_around" real,
"rope" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Milena Reljin's place with a smaller than 9.8 rope?`:
```sql
|
SELECT MAX("game") FROM "game_log" WHERE "record"='24-23'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest game with a 24-23 record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"result" text,
"hornets_score" real,
"opponent_score" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest game with a 24-23 record?`:
```sql
|
SELECT MAX("game") FROM "game_log" WHERE "record"='1-0' AND "hornets_score">100; |
## Task
Generate a SQL query to answer the following question:
`What is the highest game with a 1-0 record, and the Hornets scored more than 100?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"result" text,
"hornets_score" real,
"opponent_score" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest game with a 1-0 record, and the Hornets scored more than 100?`:
```sql
|
SELECT "date_of_birth" FROM "spain" WHERE "name"='daniel moro'; |
## Task
Generate a SQL query to answer the following question:
`When was Daniel Moro born?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "spain" (
"name" text,
"pos" text,
"height" text,
"weight" text,
"date_of_birth" text,
"club" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was Daniel Moro born?`:
```sql
|
SELECT "score" FROM "final_leaderboard" WHERE "money"=450; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the player than won $450?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score for the player than won $450?`:
```sql
|
SELECT "score" FROM "final_leaderboard" WHERE "money"<'1,000' AND "to_par"='+9'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the player that had a to par score of +9 and took home less than $1,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the player that had a to par score of +9 and took home less than $1,000?`:
```sql
|
SELECT "place" FROM "final_leaderboard" WHERE "money"=350; |
## Task
Generate a SQL query to answer the following question:
`What place did the player that took won $350 finish in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `What place did the player that took won $350 finish in?`:
```sql
|
SELECT "player" FROM "final_leaderboard" WHERE "score"='71-73-68-75=287'; |
## Task
Generate a SQL query to answer the following question:
`Which player had a score of 71-73-68-75=287?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which player had a score of 71-73-68-75=287?`:
```sql
|
SELECT "year" FROM "other_incidents" WHERE "name"='dong shihou, 29 (董世侯)'; |
## Task
Generate a SQL query to answer the following question:
`What is Year, when Name is "Dong Shihou, 29 (董世侯)"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_incidents" (
"name" text,
"date" text,
"year" real,
"location" text,
"killed" text,
"injured" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Year, when Name is "Dong Shihou, 29 (董世侯)"?`:
```sql
|
SELECT "name" FROM "other_incidents" WHERE "location"='dz'; |
## Task
Generate a SQL query to answer the following question:
`What is Name, when Location is "DZ"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_incidents" (
"name" text,
"date" text,
"year" real,
"location" text,
"killed" text,
"injured" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Name, when Location is "DZ"?`:
```sql
|
SELECT "injured" FROM "other_incidents" WHERE "date"='09.15 sep. 15'; |
## Task
Generate a SQL query to answer the following question:
`What is Injured, when Date is "09.15 Sep. 15"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_incidents" (
"name" text,
"date" text,
"year" real,
"location" text,
"killed" text,
"injured" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Injured, when Date is "09.15 Sep. 15"?`:
```sql
|
SELECT "date" FROM "other_incidents" WHERE "name"='guay, albert , 32'; |
## Task
Generate a SQL query to answer the following question:
`What is Date, when Name is "Guay, Albert , 32"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_incidents" (
"name" text,
"date" text,
"year" real,
"location" text,
"killed" text,
"injured" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Date, when Name is "Guay, Albert , 32"?`:
```sql
|
SELECT MAX("grid") FROM "superbike_race_2_classification" WHERE "rider"='fonsi nieto'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest grid for rider Fonsi Nieto?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest grid for rider Fonsi Nieto?`:
```sql
|
SELECT COUNT("laps") FROM "superbike_race_2_classification" WHERE "time"='+7.951'; |
## Task
Generate a SQL query to answer the following question:
`What was the total number of Laps for the rider whose time was +7.951?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the total number of Laps for the rider whose time was +7.951?`:
```sql
|
SELECT MAX("laps") FROM "superbike_race_2_classification" WHERE "rider"='shuhei aoyama' AND "grid">24; |
## Task
Generate a SQL query to answer the following question:
`What was the highest number of laps for rider Shuhei Aoyama in a grid higher than 24?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the highest number of laps for rider Shuhei Aoyama in a grid higher than 24?`:
```sql
|
SELECT "grid" FROM "superbike_race_2_classification" WHERE "bike"='honda cbr1000rr' AND "rider"='russell holland'; |
## Task
Generate a SQL query to answer the following question:
`What was the grid for rider Russell Holland, riding a Honda CBR1000rr?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the grid for rider Russell Holland, riding a Honda CBR1000rr?`:
```sql
|
SELECT "rider" FROM "superbike_race_2_classification" WHERE "laps"=14 AND "grid">23 AND "bike"='honda cbr1000rr' AND "time"='+1''04.877'; |
## Task
Generate a SQL query to answer the following question:
`Who was the rider who went 14 laps on a Honda CBR1000rr, with a time of +1'04.877 on a grid larger than 23?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the rider who went 14 laps on a Honda CBR1000rr, with a time of +1'04.877 on a grid larger than 23?`:
```sql
|
SELECT MIN("year") FROM "awards_and_nominations" WHERE "award"='drama desk award' AND "nominated_work"='the mineola twins'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year with a Drama Desk award when the Mineola Twins was a nominated work?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_and_nominations" (
"year" real,
"award" text,
"category" text,
"nominated_work" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year with a Drama Desk award when the Mineola Twins was a nominated work?`:
```sql
|
SELECT "nominated_work" FROM "awards_and_nominations" WHERE "category"='best performance by a leading actress in a play' AND "year"<2007; |
## Task
Generate a SQL query to answer the following question:
`Which nominated work is in the category of best performance by a leading actress in a play earlier than 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_and_nominations" (
"year" real,
"award" text,
"category" text,
"nominated_work" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which nominated work is in the category of best performance by a leading actress in a play earlier than 2007?`:
```sql
|
SELECT MAX("year") FROM "awards_and_nominations" WHERE "nominated_work"='the mineola twins' AND "category"='outstanding actress in a play' AND "award"='drama desk award'; |
## Task
Generate a SQL query to answer the following question:
`What is the most recent year that the Mineola Twins was nominated for outstanding actress in a play and a Drama Desk award?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_and_nominations" (
"year" real,
"award" text,
"category" text,
"nominated_work" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the most recent year that the Mineola Twins was nominated for outstanding actress in a play and a Drama Desk award?`:
```sql
|
SELECT "result" FROM "awards_and_nominations" WHERE "award"='outer critics circle award' AND "year"<2004; |
## Task
Generate a SQL query to answer the following question:
`What is the result for the Outer Critics Circle award earlier than 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_and_nominations" (
"year" real,
"award" text,
"category" text,
"nominated_work" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result for the Outer Critics Circle award earlier than 2004?`:
```sql
|
SELECT SUM("year") FROM "awards_and_nominations" WHERE "nominated_work"='the house of blue leaves' AND "category"='outstanding actress in a play'; |
## Task
Generate a SQL query to answer the following question:
`In what year was The House of Blue Leaves nominated for outstanding actress in a play?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_and_nominations" (
"year" real,
"award" text,
"category" text,
"nominated_work" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what year was The House of Blue Leaves nominated for outstanding actress in a play?`:
```sql
|
SELECT "country" FROM "made_the_cut" WHERE "total"<284; |
## Task
Generate a SQL query to answer the following question:
`Which Country has a Total smaller than 284?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Country has a Total smaller than 284?`:
```sql
|
SELECT "to_par" FROM "made_the_cut" WHERE "year_s_won"='1983'; |
## Task
Generate a SQL query to answer the following question:
`Which To par has a Year(s) won of 1983?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which To par has a Year(s) won of 1983?`:
```sql
|
SELECT COUNT("total") FROM "made_the_cut" WHERE "player"='dave stockton'; |
## Task
Generate a SQL query to answer the following question:
`How many Total has a Player of dave stockton?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Total has a Player of dave stockton?`:
```sql
|
SELECT "outcome" FROM "women_s_doubles_10_4_titles_6_runner_ups" WHERE "year"=1973 AND "surface"='clay'; |
## Task
Generate a SQL query to answer the following question:
`What was the result in 1973 when the surface was clay?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women_s_doubles_10_4_titles_6_runner_ups" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result in 1973 when the surface was clay?`:
```sql
|
SELECT "outcome" FROM "women_s_doubles_10_4_titles_6_runner_ups" WHERE "year"=1975; |
## Task
Generate a SQL query to answer the following question:
`What was the outcome in 1975?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women_s_doubles_10_4_titles_6_runner_ups" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the outcome in 1975?`:
```sql
|
SELECT "opponents" FROM "women_s_doubles_10_4_titles_6_runner_ups" WHERE "surface"='clay' AND "partner"='margaret court' AND "year"=1975; |
## Task
Generate a SQL query to answer the following question:
`Who was Margaret Court's opponent on clay in 1975?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women_s_doubles_10_4_titles_6_runner_ups" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was Margaret Court's opponent on clay in 1975?`:
```sql
|
SELECT MAX("against") FROM "2011_ladder" WHERE "central_murray"='tooleybuc manangatang' AND "wins"<13; |
## Task
Generate a SQL query to answer the following question:
`What is the number of against when Central Murray is Tooleybuc Manangatang and there are fewer than 13 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_ladder" (
"central_murray" 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 number of against when Central Murray is Tooleybuc Manangatang and there are fewer than 13 wins?`:
```sql
|
SELECT AVG("byes") FROM "2011_ladder" WHERE "draws"<0; |
## Task
Generate a SQL query to answer the following question:
`How many byes when the draws are fewer than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_ladder" (
"central_murray" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many byes when the draws are fewer than 0?`:
```sql
|
SELECT SUM("byes") FROM "2011_ladder" WHERE "central_murray"='woorineen' AND "losses">13; |
## Task
Generate a SQL query to answer the following question:
`What is the byes for Woorineen when losses are more than 13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_ladder" (
"central_murray" 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 byes for Woorineen when losses are more than 13?`:
```sql
|
SELECT AVG("wins") FROM "2011_ladder" WHERE "losses"=4 AND "against"<1281; |
## Task
Generate a SQL query to answer the following question:
`How many wins when there are 4 losses and against are fewer than 1281?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_ladder" (
"central_murray" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins when there are 4 losses and against are fewer than 1281?`:
```sql
|
SELECT AVG("against") FROM "2011_ladder" WHERE "losses"=11 AND "wins"<5; |
## Task
Generate a SQL query to answer the following question:
`How many against when losses are 11 and wins are fewer than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_ladder" (
"central_murray" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many against when losses are 11 and wins are fewer than 5?`:
```sql
|
SELECT "player" FROM "third_round" WHERE "to_par"='–7' AND "country"='spain'; |
## Task
Generate a SQL query to answer the following question:
`which Player has a To par of –7, and a Country of spain?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `which Player has a To par of –7, and a Country of spain?`:
```sql
|
SELECT "doctor" FROM "external_links" WHERE "published"='june 2003'; |
## Task
Generate a SQL query to answer the following question:
`What doctor published on June 2003?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "external_links" (
"title" text,
"author" text,
"doctor" text,
"companion_s" text,
"published" text
);
### SQL
Given the database schema, here is the SQL query that answers `What doctor published on June 2003?`:
```sql
|
SELECT "title" FROM "external_links" WHERE "doctor"='1st' AND "published"='november 2001'; |
## Task
Generate a SQL query to answer the following question:
`What title was published on November 2001 and has a 1st Doctor?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "external_links" (
"title" text,
"author" text,
"doctor" text,
"companion_s" text,
"published" text
);
### SQL
Given the database schema, here is the SQL query that answers `What title was published on November 2001 and has a 1st Doctor?`:
```sql
|
SELECT "title" FROM "external_links" WHERE "doctor"='8th' AND "published"='january 2003'; |
## Task
Generate a SQL query to answer the following question:
`What is the title of the 8th doctor published in January 2003?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "external_links" (
"title" text,
"author" text,
"doctor" text,
"companion_s" text,
"published" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the title of the 8th doctor published in January 2003?`:
```sql
|
SELECT "companion_s" FROM "external_links" WHERE "author"='dave stone'; |
## Task
Generate a SQL query to answer the following question:
`What is the companion for the author Dave Stone?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "external_links" (
"title" text,
"author" text,
"doctor" text,
"companion_s" text,
"published" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the companion for the author Dave Stone?`:
```sql
|
SELECT "player" FROM "made_the_cut" WHERE "year_s_won"='1989'; |
## Task
Generate a SQL query to answer the following question:
`What Player won the PGA in 1989?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Player won the PGA in 1989?`:
```sql
|
SELECT "player" FROM "third_round" WHERE "country"='northern ireland'; |
## Task
Generate a SQL query to answer the following question:
`Which player is from Northern Ireland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player is from Northern Ireland?`:
```sql
|
SELECT "player" FROM "third_round" WHERE "score"='69-68-68=205'; |
## Task
Generate a SQL query to answer the following question:
`What player has a score of 69-68-68=205?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What player has a score of 69-68-68=205?`:
```sql
|
SELECT MIN("week") FROM "schedule" WHERE "attendance">'63,369'; |
## Task
Generate a SQL query to answer the following question:
`Which Week has an Attendance larger than 63,369?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Week has an Attendance larger than 63,369?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "date"='september 26'; |
## Task
Generate a SQL query to answer the following question:
`What was the result on september 26?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result on september 26?`:
```sql
|
SELECT MIN("week") FROM "schedule" WHERE "game_site"='oakland-alameda county coliseum' AND "attendance">'52,169'; |
## Task
Generate a SQL query to answer the following question:
`Which Week has a Game site of oakland-alameda county coliseum, and an Attendance larger than 52,169?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Week has a Game site of oakland-alameda county coliseum, and an Attendance larger than 52,169?`:
```sql
|
SELECT "player" FROM "second_round" WHERE "score"='68-71=139'; |
## Task
Generate a SQL query to answer the following question:
`What is Player, when Score is "68-71=139"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Player, when Score is "68-71=139"?`:
```sql
|
SELECT "country" FROM "second_round" WHERE "player"='tom watson'; |
## Task
Generate a SQL query to answer the following question:
`What is Country, when Player is "Tom Watson"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Country, when Player is "Tom Watson"?`:
```sql
|
SELECT "place" FROM "second_round" WHERE "player"='steve pate'; |
## Task
Generate a SQL query to answer the following question:
`What is Place, when Player is "Steve Pate"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Place, when Player is "Steve Pate"?`:
```sql
|
SELECT SUM("against") FROM "1985" WHERE "date"='08/06/1985'; |
## Task
Generate a SQL query to answer the following question:
`How many against on the date of 08/06/1985?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1985" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many against on the date of 08/06/1985?`:
```sql
|
SELECT "venue" FROM "1985" WHERE "date"='30/03/1985'; |
## Task
Generate a SQL query to answer the following question:
`What is the venue for the match on 30/03/1985?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1985" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the venue for the match on 30/03/1985?`:
```sql
|
SELECT "status" FROM "1985" WHERE "against"=24; |
## Task
Generate a SQL query to answer the following question:
`What is the status of the match with 24 against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1985" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the status of the match with 24 against?`:
```sql
|
SELECT "opposing_teams" FROM "1985" WHERE "status"='second test'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opposing team when the status is second test?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1985" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opposing team when the status is second test?`:
```sql
|
SELECT "status" FROM "1985" WHERE "against">13 AND "opposing_teams"='wales'; |
## Task
Generate a SQL query to answer the following question:
`What is the status when Wales is the opposing team and there are more than 13 against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1985" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the status when Wales is the opposing team and there are more than 13 against?`:
```sql
|
SELECT MIN("number_of_households") FROM "alabama_counties_ranked_by_per_capita_in" WHERE "median_family_income"='$41,778' AND "population">'38,319'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of households for the entry with a median income of $41,778 and a population greater than 38,319?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "alabama_counties_ranked_by_per_capita_in" (
"county" text,
"per_capita_income" text,
"median_household_income_1_000_000" text,
"median_family_income" text,
"population" real,
"number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest number of households for the entry with a median income of $41,778 and a population greater than 38,319?`:
```sql
|
SELECT "church" FROM "ahrend_brunzema_1954_1971" WHERE "stops"='27'; |
## Task
Generate a SQL query to answer the following question:
`Which Church has 27 stops?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ahrend_brunzema_1954_1971" (
"year" text,
"opus" real,
"town" text,
"church" text,
"kind" text,
"manuals" text,
"stops" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Church has 27 stops?`:
```sql
|
SELECT "opponents" FROM "fa_cup" WHERE "round"='round 6'; |
## Task
Generate a SQL query to answer the following question:
`Who is the opponent(s) in round 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fa_cup" (
"date" text,
"round" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the opponent(s) in round 6?`:
```sql
|
SELECT SUM("year") FROM "female_athlete_of_the_year" WHERE "sport"='soccer' AND "college"='virginia'; |
## Task
Generate a SQL query to answer the following question:
`In what year was the winner a soccer player from Virginia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "female_athlete_of_the_year" (
"year" real,
"winner" text,
"sport" text,
"hometown" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what year was the winner a soccer player from Virginia?`:
```sql
|
SELECT AVG("year") FROM "female_athlete_of_the_year" WHERE "winner"='morgan brian'; |
## Task
Generate a SQL query to answer the following question:
`In what year did Morgan Brian win?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "female_athlete_of_the_year" (
"year" real,
"winner" text,
"sport" text,
"hometown" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what year did Morgan Brian win?`:
```sql
|
SELECT "winner" FROM "female_athlete_of_the_year" WHERE "college"='connecticut' AND "hometown"='north syracuse, ny'; |
## Task
Generate a SQL query to answer the following question:
`Who is the winner who attended college at Connecticut and is from North Syracuse, NY?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "female_athlete_of_the_year" (
"year" real,
"winner" text,
"sport" text,
"hometown" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the winner who attended college at Connecticut and is from North Syracuse, NY?`:
```sql
|
SELECT "hometown" FROM "female_athlete_of_the_year" WHERE "college"='usc'; |
## Task
Generate a SQL query to answer the following question:
`What is the hometown of the player who went to college at USC?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "female_athlete_of_the_year" (
"year" real,
"winner" text,
"sport" text,
"hometown" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the hometown of the player who went to college at USC?`:
```sql
|
SELECT MIN("draws") FROM "2010_ladder" WHERE "against"=1547 AND "wins">3; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Draws, when Against is "1547", and when Wins is greater than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2010_ladder" (
"golden_rivers" 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 lowest Draws, when Against is "1547", and when Wins is greater than 3?`:
```sql
|
SELECT COUNT("wins") FROM "2010_ladder" WHERE "losses"=6 AND "draws">0; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Wins, when Losses is "6", and when Draws is greater than "0"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2010_ladder" (
"golden_rivers" 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 number of Wins, when Losses is "6", and when Draws is greater than "0"?`:
```sql
|
SELECT MIN("draws") FROM "2010_ladder" WHERE "byes"<2; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Draws, when Byes is less than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2010_ladder" (
"golden_rivers" 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 lowest Draws, when Byes is less than 2?`:
```sql
|
SELECT COUNT("draws") FROM "2010_ladder" WHERE "against"=1134 AND "byes"<2; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Draws, when Against is "1134", and when Byes is less than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2010_ladder" (
"golden_rivers" 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 number of Draws, when Against is "1134", and when Byes is less than 2?`:
```sql
|
SELECT SUM("wins") FROM "2010_ladder" WHERE "against"<1033 AND "golden_rivers"='nullawil' AND "byes"<2; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Wins, when Against is less than 1033, when Golden Rivers is "Nullawil", and when Byes is less than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2010_ladder" (
"golden_rivers" 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 sum of Wins, when Against is less than 1033, when Golden Rivers is "Nullawil", and when Byes is less than 2?`:
```sql
|
SELECT "7_00_am" FROM "spring_1999" WHERE "7_30_am"='good morning america'; |
## Task
Generate a SQL query to answer the following question:
`What is 7:00 am, when 7:30 am is "Good Morning America"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "spring_1999" (
"7_00_am" text,
"7_30_am" text,
"8_00_am" text,
"9_00_am" text,
"11_00_am" text,
"noon" text,
"12_30_pm" text,
"1_00_pm" text,
"1_30_pm" text,
"2_00_pm" text,
"3_00_pm" text,
"3_30_pm" text,
"4_00_pm" text,
"4_30_pm" text,
"5_00_pm" text,
"6_30_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 7:00 am, when 7:30 am is "Good Morning America"?`:
```sql
|
SELECT "1_30_pm" FROM "spring_1999" WHERE "7_00_am"='tiny toon adventures'; |
## Task
Generate a SQL query to answer the following question:
`What is 1:30 pm, when 7:00 am is "Tiny Toon Adventures"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "spring_1999" (
"7_00_am" text,
"7_30_am" text,
"8_00_am" text,
"9_00_am" text,
"11_00_am" text,
"noon" text,
"12_30_pm" text,
"1_00_pm" text,
"1_30_pm" text,
"2_00_pm" text,
"3_00_pm" text,
"3_30_pm" text,
"4_00_pm" text,
"4_30_pm" text,
"5_00_pm" text,
"6_30_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 1:30 pm, when 7:00 am is "Tiny Toon Adventures"?`:
```sql
|
SELECT "8_00_am" FROM "spring_1999" WHERE "11_00_am"='local programs'; |
## Task
Generate a SQL query to answer the following question:
`What is 8:00 am, when 11:00 am is "Local Programs"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "spring_1999" (
"7_00_am" text,
"7_30_am" text,
"8_00_am" text,
"9_00_am" text,
"11_00_am" text,
"noon" text,
"12_30_pm" text,
"1_00_pm" text,
"1_30_pm" text,
"2_00_pm" text,
"3_00_pm" text,
"3_30_pm" text,
"4_00_pm" text,
"4_30_pm" text,
"5_00_pm" text,
"6_30_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 8:00 am, when 11:00 am is "Local Programs"?`:
```sql
|
SELECT "1_30_pm" FROM "spring_1999" WHERE "3_30_pm"='young hercules'; |
## Task
Generate a SQL query to answer the following question:
`What is 1:30 pm, when 3:30 pm is "Young Hercules"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "spring_1999" (
"7_00_am" text,
"7_30_am" text,
"8_00_am" text,
"9_00_am" text,
"11_00_am" text,
"noon" text,
"12_30_pm" text,
"1_00_pm" text,
"1_30_pm" text,
"2_00_pm" text,
"3_00_pm" text,
"3_30_pm" text,
"4_00_pm" text,
"4_30_pm" text,
"5_00_pm" text,
"6_30_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 1:30 pm, when 3:30 pm is "Young Hercules"?`:
```sql
|
SELECT "4_30_pm" FROM "spring_1999" WHERE "noon"='local programs' AND "11_00_am"='local programs'; |
## Task
Generate a SQL query to answer the following question:
`What is 4:30 pm, when Noon is "Local Programs", and when 11:00 am is "Local Programs"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "spring_1999" (
"7_00_am" text,
"7_30_am" text,
"8_00_am" text,
"9_00_am" text,
"11_00_am" text,
"noon" text,
"12_30_pm" text,
"1_00_pm" text,
"1_30_pm" text,
"2_00_pm" text,
"3_00_pm" text,
"3_30_pm" text,
"4_00_pm" text,
"4_30_pm" text,
"5_00_pm" text,
"6_30_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 4:30 pm, when Noon is "Local Programs", and when 11:00 am is "Local Programs"?`:
```sql
|
SELECT SUM("year") FROM "achievements" WHERE "competition"='european championships' AND "notes"='66.81 m'; |
## Task
Generate a SQL query to answer the following question:
`Which Year has a Competition of european championships, and Notes of 66.81 m?`
### 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 `Which Year has a Competition of european championships, and Notes of 66.81 m?`:
```sql
|
SELECT "position" FROM "achievements" WHERE "venue"='berlin, germany'; |
## Task
Generate a SQL query to answer the following question:
`Which Position has a Venue of berlin, germany?`
### 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 `Which Position has a Venue of berlin, germany?`:
```sql
|
SELECT "competition" FROM "achievements" WHERE "venue"='arles, france'; |
## Task
Generate a SQL query to answer the following question:
`Which competition was held in Arles, France?`
### 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 `Which competition was held in Arles, France?`:
```sql
|
SELECT "m1_a1_abrams" FROM "comparison_to_the_alternatives" WHERE "m60_a3_patton"='t (short tons)'; |
## Task
Generate a SQL query to answer the following question:
`What is the M1A1 when the M60A3 was T (Short Tons)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison_to_the_alternatives" (
"lince" text,
"leopard_2_a4" text,
"leclerc" text,
"m1_a1_abrams" text,
"m60_a3_patton" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the M1A1 when the M60A3 was T (Short Tons)?`:
```sql
|
SELECT "m60_a3_patton" FROM "comparison_to_the_alternatives" WHERE "m1_a1_abrams"='t (short tons)'; |
## Task
Generate a SQL query to answer the following question:
`What is the M60A3 when the M1A1 is T (Short Tons)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison_to_the_alternatives" (
"lince" text,
"leopard_2_a4" text,
"leclerc" text,
"m1_a1_abrams" text,
"m60_a3_patton" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the M60A3 when the M1A1 is T (Short Tons)?`:
```sql
|
SELECT "m60_a3_patton" FROM "comparison_to_the_alternatives" WHERE "m1_a1_abrams"='km (mi)'; |
## Task
Generate a SQL query to answer the following question:
`What is the M60A3 that has an M1A1 of Km (mi)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison_to_the_alternatives" (
"lince" text,
"leopard_2_a4" text,
"leclerc" text,
"m1_a1_abrams" text,
"m60_a3_patton" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the M60A3 that has an M1A1 of Km (mi)?`:
```sql
|
SELECT "m60_a3_patton" FROM "comparison_to_the_alternatives" WHERE "leclerc"='40 rounds'; |
## Task
Generate a SQL query to answer the following question:
`What is the M60A3 that has 40 rounds as Leclerc?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison_to_the_alternatives" (
"lince" text,
"leopard_2_a4" text,
"leclerc" text,
"m1_a1_abrams" text,
"m60_a3_patton" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the M60A3 that has 40 rounds as Leclerc?`:
```sql
|
SELECT "lince" FROM "comparison_to_the_alternatives" WHERE "leclerc"='hp (kw)'; |
## Task
Generate a SQL query to answer the following question:
`What's the lince when Leclerc was Hp (kw)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison_to_the_alternatives" (
"lince" text,
"leopard_2_a4" text,
"leclerc" text,
"m1_a1_abrams" text,
"m60_a3_patton" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the lince when Leclerc was Hp (kw)?`:
```sql
|
SELECT "m1_a1_abrams" FROM "comparison_to_the_alternatives" WHERE "lince"='t (short tons)'; |
## Task
Generate a SQL query to answer the following question:
`What is the M1A1 when the Lince was T (Short Tons)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison_to_the_alternatives" (
"lince" text,
"leopard_2_a4" text,
"leclerc" text,
"m1_a1_abrams" text,
"m60_a3_patton" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the M1A1 when the Lince was T (Short Tons)?`:
```sql
|
SELECT "distance" FROM "world_records" WHERE "time"='2:20.00'; |
## Task
Generate a SQL query to answer the following question:
`Which Distance has a Time of 2:20.00?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_records" (
"distance" text,
"event" text,
"time" text,
"meet" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Distance has a Time of 2:20.00?`:
```sql
|
SELECT "distance" FROM "world_records" WHERE "event"='breaststroke' AND "location"='beijing, chn'; |
## Task
Generate a SQL query to answer the following question:
`Which Distance has an Event of breaststroke, and a Location of beijing, chn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_records" (
"distance" text,
"event" text,
"time" text,
"meet" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Distance has an Event of breaststroke, and a Location of beijing, chn?`:
```sql
|
SELECT "meet" FROM "world_records" WHERE "time"='1:04.84'; |
## Task
Generate a SQL query to answer the following question:
`What Meet has a Time of 1:04.84?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_records" (
"distance" text,
"event" text,
"time" text,
"meet" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Meet has a Time of 1:04.84?`:
```sql
|
SELECT COUNT("season") FROM "ratings" WHERE "viewer_rank_num"='#4'; |
## Task
Generate a SQL query to answer the following question:
`What season had a viewer rank of #4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ratings" (
"season" real,
"season_premiere" text,
"season_finale" text,
"tv_season" text,
"viewer_rank_num" text,
"households_viewers_in_millions" real
);
### SQL
Given the database schema, here is the SQL query that answers `What season had a viewer rank of #4?`:
```sql
|
SELECT MIN("season") FROM "ratings" WHERE "households_viewers_in_millions"<25.4 AND "viewer_rank_num"='#6'; |
## Task
Generate a SQL query to answer the following question:
`Which season had less than 25.4 viewers and had a viewer rank of #6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ratings" (
"season" real,
"season_premiere" text,
"season_finale" text,
"tv_season" text,
"viewer_rank_num" text,
"households_viewers_in_millions" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which season had less than 25.4 viewers and had a viewer rank of #6?`:
```sql
|
SELECT "season_premiere" FROM "ratings" WHERE "viewer_rank_num"='#6'; |
## Task
Generate a SQL query to answer the following question:
`When did the season premiere that had a viewer rank of #6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ratings" (
"season" real,
"season_premiere" text,
"season_finale" text,
"tv_season" text,
"viewer_rank_num" text,
"households_viewers_in_millions" real
);
### SQL
Given the database schema, here is the SQL query that answers `When did the season premiere that had a viewer rank of #6?`:
```sql
|
SELECT COUNT("gold") FROM "medal_table" WHERE "rank"='2' AND "silver"<2; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of gold medals of the ranked 2nd nation, which has less than 2 silvers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of gold medals of the ranked 2nd nation, which has less than 2 silvers?`:
```sql
|
SELECT COUNT("gold") FROM "medal_table" WHERE "silver"=0 AND "bronze">1; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of gold medals of the nation with 0 silver and more than 1 bronze?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of gold medals of the nation with 0 silver and more than 1 bronze?`:
```sql
|
SELECT MIN("bronze") FROM "medal_table" WHERE "total">13 AND "gold">10 AND "silver"<22; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of bronze of the nation with more than 13 total medals, more than 10 gold medals, and less than 22 silvers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest number of bronze of the nation with more than 13 total medals, more than 10 gold medals, and less than 22 silvers?`:
```sql
|
SELECT "main_date" FROM "calendar" WHERE "number_of_fixtures"=20; |
## Task
Generate a SQL query to answer the following question:
`What was the main date of the round with 20 fixtures?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "calendar" (
"round" text,
"main_date" text,
"number_of_fixtures" real,
"clubs" text,
"new_entries_this_round" text,
"prize_money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the main date of the round with 20 fixtures?`:
```sql
|
SELECT "new_entries_this_round" FROM "calendar" WHERE "number_of_fixtures"<8 AND "round"='semi-finals'; |
## Task
Generate a SQL query to answer the following question:
`What were the new entries for the Semi-Finals round with fewer than 8 fixtures?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "calendar" (
"round" text,
"main_date" text,
"number_of_fixtures" real,
"clubs" text,
"new_entries_this_round" text,
"prize_money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the new entries for the Semi-Finals round with fewer than 8 fixtures?`:
```sql
|
SELECT "club" FROM "current" WHERE "home_ground"='central reserve'; |
## Task
Generate a SQL query to answer the following question:
`What was the club when home ground was Central Reserve?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current" (
"club" text,
"nickname" text,
"location" text,
"home_ground" text,
"gfl_premierships" text,
"years_in_gfl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the club when home ground was Central Reserve?`:
```sql
|
SELECT "gfl_premierships" FROM "current" WHERE "home_ground"='leopold memorial park'; |
## Task
Generate a SQL query to answer the following question:
`What's the GFL Premiership when the home ground was Leopold Memorial Park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current" (
"club" text,
"nickname" text,
"location" text,
"home_ground" text,
"gfl_premierships" text,
"years_in_gfl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the GFL Premiership when the home ground was Leopold Memorial Park?`:
```sql
|
SELECT "location" FROM "current" WHERE "years_in_gfl"='1988-'; |
## Task
Generate a SQL query to answer the following question:
`What's the location where the Years in GFL was 1988-?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current" (
"club" text,
"nickname" text,
"location" text,
"home_ground" text,
"gfl_premierships" text,
"years_in_gfl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the location where the Years in GFL was 1988-?`:
```sql
|
SELECT "home_ground" FROM "current" WHERE "nickname"='lions'; |
## Task
Generate a SQL query to answer the following question:
`What's the home ground of the Lions?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current" (
"club" text,
"nickname" text,
"location" text,
"home_ground" text,
"gfl_premierships" text,
"years_in_gfl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the home ground of the Lions?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.