output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT MIN("january") FROM "regular_season" WHERE "opponent"='florida panthers' AND "points"<59; |
## Task
Generate a SQL query to answer the following question:
`Which January is the lowest one that has an Opponent of florida panthers, and Points smaller than 59?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"january" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which January is the lowest one that has an Opponent of florida panthers, and Points smaller than 59?`:
```sql
|
SELECT "record" FROM "regular_season" WHERE "game"=41; |
## Task
Generate a SQL query to answer the following question:
`Which Record has a Game of 41?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"january" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Record has a Game of 41?`:
```sql
|
SELECT "score" FROM "regular_season" WHERE "january">21 AND "points"=63; |
## Task
Generate a SQL query to answer the following question:
`Which Score has a January larger than 21, and Points of 63?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"january" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Score has a January larger than 21, and Points of 63?`:
```sql
|
SELECT COUNT("points") FROM "regular_season" WHERE "record"='25–10–11' AND "january">28; |
## Task
Generate a SQL query to answer the following question:
`How many Points have a Record of 25–10–11, and a January larger than 28?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"january" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Points have a Record of 25–10–11, and a January larger than 28?`:
```sql
|
SELECT "province" FROM "former_medical_schools" WHERE "established"=1870; |
## Task
Generate a SQL query to answer the following question:
`what province was established in 1870`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "former_medical_schools" (
"province" text,
"school" text,
"city" text,
"degree" text,
"established" real,
"closed" text
);
### SQL
Given the database schema, here is the SQL query that answers `what province was established in 1870`:
```sql
|
SELECT "incumbent" FROM "ohio" WHERE "district"='ohio 13'; |
## Task
Generate a SQL query to answer the following question:
`Who is the Incumbent that has a District of ohio 13 in Democratic Party?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ohio" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the Incumbent that has a District of ohio 13 in Democratic Party?`:
```sql
|
SELECT "score" FROM "champions" WHERE "champion"='ken rosewall' AND "year"='1957'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of champion Ken Rosewall in 1957?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions" (
"year" text,
"champion" text,
"runner_up" text,
"score" text,
"surface" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of champion Ken Rosewall in 1957?`:
```sql
|
SELECT "surface" FROM "champions" WHERE "runner_up"='brian gottfried'; |
## Task
Generate a SQL query to answer the following question:
`What is the surface of the match with Brian Gottfried as the runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions" (
"year" text,
"champion" text,
"runner_up" text,
"score" text,
"surface" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the surface of the match with Brian Gottfried as the runner-up?`:
```sql
|
SELECT "score" FROM "champions" WHERE "runner_up"='anders järryd'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the match with anders järryd as the runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions" (
"year" text,
"champion" text,
"runner_up" text,
"score" text,
"surface" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the match with anders järryd as the runner-up?`:
```sql
|
SELECT MIN("bronze") FROM "medal_table" WHERE "total"=4 AND "gold"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the low bronze total for the team with 4 total and under 1 gold?`
### 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 low bronze total for the team with 4 total and under 1 gold?`:
```sql
|
SELECT AVG("total") FROM "medal_table" WHERE "bronze">3 AND "gold">8; |
## Task
Generate a SQL query to answer the following question:
`What is the average total for teams with over 3 bronzes and over 8 golds?`
### 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 average total for teams with over 3 bronzes and over 8 golds?`:
```sql
|
SELECT MIN("silver") FROM "medal_table" WHERE "total"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the low silver total associated with under 1 total?`
### 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 low silver total associated with under 1 total?`:
```sql
|
SELECT "points" FROM "top_singles_of_1959" WHERE "highest_position"<9 AND "position"=22; |
## Task
Generate a SQL query to answer the following question:
`What is the number of points associated with the highest position under 9 and a current position of 22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_singles_of_1959" (
"position" real,
"artist" text,
"song_title" text,
"highest_position" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of points associated with the highest position under 9 and a current position of 22?`:
```sql
|
SELECT "performer_1" FROM "series_2" WHERE "performer_3"='paul merton' AND "performer_4"='sandi toksvig'; |
## Task
Generate a SQL query to answer the following question:
`Performer 3 of paul merton, and a Performer 4 of sandi toksvig is which performer 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_2" (
"date" text,
"episode" real,
"performer_1" text,
"performer_2" text,
"performer_3" text,
"performer_4" text
);
### SQL
Given the database schema, here is the SQL query that answers `Performer 3 of paul merton, and a Performer 4 of sandi toksvig is which performer 1?`:
```sql
|
SELECT "performer_1" FROM "series_2" WHERE "episode"=16; |
## Task
Generate a SQL query to answer the following question:
`Episode of 16 involves which performer 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_2" (
"date" text,
"episode" real,
"performer_1" text,
"performer_2" text,
"performer_3" text,
"performer_4" text
);
### SQL
Given the database schema, here is the SQL query that answers `Episode of 16 involves which performer 1?`:
```sql
|
SELECT "performer_1" FROM "series_2" WHERE "performer_2"='compilation 1'; |
## Task
Generate a SQL query to answer the following question:
`Performer 2 of compilation 1 had what performer 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_2" (
"date" text,
"episode" real,
"performer_1" text,
"performer_2" text,
"performer_3" text,
"performer_4" text
);
### SQL
Given the database schema, here is the SQL query that answers `Performer 2 of compilation 1 had what performer 1?`:
```sql
|
SELECT "schwaben" FROM "bavarian_cup_era" WHERE "oberbayern"='fc ingolstadt 04' AND "mittelfranken"='sv seligenporten'; |
## Task
Generate a SQL query to answer the following question:
`Which Schwaben has an Oberbayern of fc ingolstadt 04 and a Mittelfranken of sv seligenporten`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bavarian_cup_era" (
"season" real,
"oberbayern" text,
"niederbayern" text,
"schwaben" text,
"mittelfranken" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Schwaben has an Oberbayern of fc ingolstadt 04 and a Mittelfranken of sv seligenporten`:
```sql
|
SELECT "schwaben" FROM "bavarian_cup_era" WHERE "oberbayern"='fc bayern munich ii' AND "mittelfranken"='1. fc nuremberg ii'; |
## Task
Generate a SQL query to answer the following question:
`Which Schwaben has a Oberbayern of fc bayern munich ii and a Mittelfranken of 1. fc nuremberg ii?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bavarian_cup_era" (
"season" real,
"oberbayern" text,
"niederbayern" text,
"schwaben" text,
"mittelfranken" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Schwaben has a Oberbayern of fc bayern munich ii and a Mittelfranken of 1. fc nuremberg ii?`:
```sql
|
SELECT "incumbent" FROM "south_carolina" WHERE "district"='south carolina 3'; |
## Task
Generate a SQL query to answer the following question:
`Who was the incumbent for south carolina 3 district?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the incumbent for south carolina 3 district?`:
```sql
|
SELECT "first_elected" FROM "south_carolina" WHERE "district"='south carolina 1'; |
## Task
Generate a SQL query to answer the following question:
`When was the incumbent from the south carolina 1 district first elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the incumbent from the south carolina 1 district first elected?`:
```sql
|
SELECT "incumbent" FROM "south_carolina" WHERE "first_elected"='1892' AND "result"='retired to run for the senate democratic hold'; |
## Task
Generate a SQL query to answer the following question:
`Who was the incumbent that was first elected in 1892 and retired to run for the senate democratic hold?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the incumbent that was first elected in 1892 and retired to run for the senate democratic hold?`:
```sql
|
SELECT "incumbent" FROM "south_carolina" WHERE "result"='retired to run for the senate democratic hold'; |
## Task
Generate a SQL query to answer the following question:
`Who was the incumbent that retired to run for the senate democratic hold?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the incumbent that retired to run for the senate democratic hold?`:
```sql
|
SELECT "result" FROM "south_carolina" WHERE "first_elected"='1892' AND "incumbent"='w. jasper talbert'; |
## Task
Generate a SQL query to answer the following question:
`What was the result of W. Jasper Talbert who was first elected in 1892?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of W. Jasper Talbert who was first elected in 1892?`:
```sql
|
SELECT "nationality" FROM "final" WHERE "2_24"='xo' AND "2_20"='xo'; |
## Task
Generate a SQL query to answer the following question:
`Which Nationality has a 2.24 of xo, and a 2.20 of xo?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"athlete" text,
"nationality" text,
"2_15" text,
"2_20" text,
"2_24" text,
"2_27" text,
"result" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Nationality has a 2.24 of xo, and a 2.20 of xo?`:
```sql
|
SELECT "athlete" FROM "final" WHERE "2_24"='xo' AND "2_20"='o' AND "2_15"='o'; |
## Task
Generate a SQL query to answer the following question:
`Which Athlete has a 2.24 of xo, and a 2.20 of o, and a 2.15 of o?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"athlete" text,
"nationality" text,
"2_15" text,
"2_20" text,
"2_24" text,
"2_27" text,
"result" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Athlete has a 2.24 of xo, and a 2.20 of o, and a 2.15 of o?`:
```sql
|
SELECT MIN("election") FROM "election_results" WHERE "num_of_candidates_nominated">7 AND "pct_of_popular_vote"='2.75%' AND "num_of_seats_won"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest election with more than 7 candidates nominated, a percentage of the popular vote of 2.75%, and 0 seats won?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "election_results" (
"election" real,
"num_of_candidates_nominated" real,
"num_of_seats_won" real,
"num_of_total_votes" real,
"pct_of_popular_vote" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest election with more than 7 candidates nominated, a percentage of the popular vote of 2.75%, and 0 seats won?`:
```sql
|
SELECT SUM("played") FROM "campeonato_brasileiro_s_rie_a" WHERE "lost">14 AND "drawn"=8 AND "team"='ipatinga'; |
## Task
Generate a SQL query to answer the following question:
`How much Played has a Lost larger than 14, and Drawn of 8, and a Team of ipatinga?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campeonato_brasileiro_s_rie_a" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `How much Played has a Lost larger than 14, and Drawn of 8, and a Team of ipatinga?`:
```sql
|
SELECT COUNT("drawn") FROM "campeonato_brasileiro_s_rie_a" WHERE "difference"='3' AND "points"<52; |
## Task
Generate a SQL query to answer the following question:
`How many Drawn have a Difference of 3, and Points smaller than 52?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campeonato_brasileiro_s_rie_a" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Drawn have a Difference of 3, and Points smaller than 52?`:
```sql
|
SELECT MAX("points") FROM "campeonato_brasileiro_s_rie_a" WHERE "position"<4 AND "team"='são paulo' AND "drawn">12; |
## Task
Generate a SQL query to answer the following question:
`Which Points is the highest one that has a Position smaller than 4, and a Team of são paulo, and Drawn larger than 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campeonato_brasileiro_s_rie_a" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Points is the highest one that has a Position smaller than 4, and a Team of são paulo, and Drawn larger than 12?`:
```sql
|
SELECT SUM("lost") FROM "campeonato_brasileiro_s_rie_a" WHERE "points">40 AND "position"=11 AND "played"<38; |
## Task
Generate a SQL query to answer the following question:
`How many Lost have Points larger than 40, and a Position of 11, and a Played smaller than 38?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campeonato_brasileiro_s_rie_a" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Lost have Points larger than 40, and a Position of 11, and a Played smaller than 38?`:
```sql
|
SELECT MIN("lost") FROM "world_championship_group_c_bulgaria" WHERE "points_difference"='40 - 17' AND "games">6; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of games loss with a Points difference of 40 - 17, and over 6 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_group_c_bulgaria" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest number of games loss with a Points difference of 40 - 17, and over 6 games?`:
```sql
|
SELECT MIN("lost") FROM "world_championship_group_c_bulgaria" WHERE "games">6; |
## Task
Generate a SQL query to answer the following question:
`How many games lost for teams with over 6 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_group_c_bulgaria" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many games lost for teams with over 6 games?`:
```sql
|
SELECT MAX("drawn") FROM "world_championship_group_c_bulgaria" WHERE "games"<6; |
## Task
Generate a SQL query to answer the following question:
`What are the highest number of games drawn for games numbered under 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_group_c_bulgaria" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are the highest number of games drawn for games numbered under 6?`:
```sql
|
SELECT SUM("drawn") FROM "world_championship_group_c_bulgaria" WHERE "points_difference"='31 - 33' AND "lost"<4; |
## Task
Generate a SQL query to answer the following question:
`How many games drawn with a Points difference of 31 - 33, and under 4 games lost?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_group_c_bulgaria" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many games drawn with a Points difference of 31 - 33, and under 4 games lost?`:
```sql
|
SELECT "outcome" FROM "itf_singles_finals" WHERE "surface"='hard (i)' AND "date"='28 january 2003'; |
## Task
Generate a SQL query to answer the following question:
`Which Outcome has a Surface of hard (i), and a Date of 28 january 2003?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "itf_singles_finals" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Outcome has a Surface of hard (i), and a Date of 28 january 2003?`:
```sql
|
SELECT "tournament" FROM "itf_singles_finals" WHERE "outcome"='winner' AND "surface"='hard (i)'; |
## Task
Generate a SQL query to answer the following question:
`Which Tournament has an Outcome of winner, and a Surface of hard (i)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "itf_singles_finals" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Tournament has an Outcome of winner, and a Surface of hard (i)?`:
```sql
|
SELECT "date" FROM "itf_singles_finals" WHERE "score"='6–1, 6–2'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has a Score of 6–1, 6–2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "itf_singles_finals" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date has a Score of 6–1, 6–2?`:
```sql
|
SELECT "surface" FROM "itf_singles_finals" WHERE "opponent"='oleksandra kravets'; |
## Task
Generate a SQL query to answer the following question:
`Which Surface has an Opponent of oleksandra kravets?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "itf_singles_finals" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Surface has an Opponent of oleksandra kravets?`:
```sql
|
SELECT "surface" FROM "itf_singles_finals" WHERE "date"='3 october 2003'; |
## Task
Generate a SQL query to answer the following question:
`Which Surface has a Date of 3 october 2003?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "itf_singles_finals" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Surface has a Date of 3 october 2003?`:
```sql
|
SELECT "surface" FROM "itf_singles_finals" WHERE "score"='6–4, 6–2'; |
## Task
Generate a SQL query to answer the following question:
`Which Surface has a Score of 6–4, 6–2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "itf_singles_finals" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Surface has a Score of 6–4, 6–2?`:
```sql
|
SELECT MIN("rank") FROM "2012_preliminary_statistics" WHERE "pct_change"='3.3%' AND "total_cargo_metric_tonnes"<'2,456,724'; |
## Task
Generate a SQL query to answer the following question:
`Which Rank is the lowest one that has a % Change of 3.3%, and a Total Cargo (Metric Tonnes) smaller than 2,456,724?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2012_preliminary_statistics" (
"rank" real,
"airport" text,
"code_iata_icao" text,
"total_cargo_metric_tonnes" real,
"pct_change" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank is the lowest one that has a % Change of 3.3%, and a Total Cargo (Metric Tonnes) smaller than 2,456,724?`:
```sql
|
SELECT COUNT("rank") FROM "2012_preliminary_statistics" WHERE "code_iata_icao"='ord/kord'; |
## Task
Generate a SQL query to answer the following question:
`How many ranks have a Code (IATA/ICAO) of ord/kord?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2012_preliminary_statistics" (
"rank" real,
"airport" text,
"code_iata_icao" text,
"total_cargo_metric_tonnes" real,
"pct_change" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many ranks have a Code (IATA/ICAO) of ord/kord?`:
```sql
|
SELECT MAX("total_cargo_metric_tonnes") FROM "2012_preliminary_statistics" WHERE "rank"<4 AND "airport"='shanghai pudong international airport'; |
## Task
Generate a SQL query to answer the following question:
`Which Total Cargo (Metric Tonnes) is the highest one that has a Rank smaller than 4, and an Airport of shanghai pudong international airport?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2012_preliminary_statistics" (
"rank" real,
"airport" text,
"code_iata_icao" text,
"total_cargo_metric_tonnes" real,
"pct_change" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Total Cargo (Metric Tonnes) is the highest one that has a Rank smaller than 4, and an Airport of shanghai pudong international airport?`:
```sql
|
SELECT AVG("rank") FROM "2012_preliminary_statistics" WHERE "pct_change"='0.7%' AND "total_cargo_metric_tonnes"<'1,556,203'; |
## Task
Generate a SQL query to answer the following question:
`Which Rank is the average one that has a % Change of 0.7%, and a Total Cargo (Metric Tonnes) smaller than 1,556,203?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2012_preliminary_statistics" (
"rank" real,
"airport" text,
"code_iata_icao" text,
"total_cargo_metric_tonnes" real,
"pct_change" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank is the average one that has a % Change of 0.7%, and a Total Cargo (Metric Tonnes) smaller than 1,556,203?`:
```sql
|
SELECT "per_capita_income" FROM "louisiana_parishes_ranked_by_per_capita_" WHERE "median_family_income"='$72,288'; |
## Task
Generate a SQL query to answer the following question:
`What is the Per capita income where Median family income is $72,288?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "louisiana_parishes_ranked_by_per_capita_" (
"parish" text,
"per_capita_income" text,
"median_household_income" text,
"median_family_income" text,
"population" real,
"number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Per capita income where Median family income is $72,288?`:
```sql
|
SELECT AVG("grid") FROM "race" WHERE "time_retired"='+2.2 secs'; |
## Task
Generate a SQL query to answer the following question:
`What is the average grid for the +2.2 secs time/retired?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average grid for the +2.2 secs time/retired?`:
```sql
|
SELECT MAX("facility_id") FROM "stations" WHERE "city_of_license"='springfield, ma' AND "erp_power_w"<230; |
## Task
Generate a SQL query to answer the following question:
`Which Facility ID has a City of license of springfield, ma, and a ERP / Power W smaller than 230?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stations" (
"call_sign" text,
"frequency" text,
"city_of_license" text,
"facility_id" real,
"erp_power_w" real,
"height_m_ft" text,
"class" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Facility ID has a City of license of springfield, ma, and a ERP / Power W smaller than 230?`:
```sql
|
SELECT "frequency" FROM "stations" WHERE "facility_id"=13598; |
## Task
Generate a SQL query to answer the following question:
`Which Frequency has a Facility ID of 13598?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stations" (
"call_sign" text,
"frequency" text,
"city_of_license" text,
"facility_id" real,
"erp_power_w" real,
"height_m_ft" text,
"class" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Frequency has a Facility ID of 13598?`:
```sql
|
SELECT AVG("facility_id") FROM "stations" WHERE "call_sign"='wnpr'; |
## Task
Generate a SQL query to answer the following question:
`WHich Facility ID has a Call sign of wnpr?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stations" (
"call_sign" text,
"frequency" text,
"city_of_license" text,
"facility_id" real,
"erp_power_w" real,
"height_m_ft" text,
"class" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHich Facility ID has a Call sign of wnpr?`:
```sql
|
SELECT "frequency" FROM "stations" WHERE "facility_id"=13598; |
## Task
Generate a SQL query to answer the following question:
`Which Frequency has a Facility ID of 13598?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stations" (
"call_sign" text,
"frequency" text,
"city_of_license" text,
"facility_id" real,
"erp_power_w" real,
"height_m_ft" text,
"class" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Frequency has a Facility ID of 13598?`:
```sql
|
SELECT "overall_wc_points_rank" FROM "bischofshofen_6_january" WHERE "1st_m"<132.5 AND "nationality"='fin'; |
## Task
Generate a SQL query to answer the following question:
`What is the rank that has a 1st less than 132.5 and a Fin nationality.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bischofshofen_6_january" (
"rank" real,
"name" text,
"nationality" text,
"1st_m" real,
"2nd_m" real,
"points" real,
"overall_fht_points" text,
"overall_wc_points_rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank that has a 1st less than 132.5 and a Fin nationality.`:
```sql
|
SELECT MAX("points") FROM "bischofshofen_6_january" WHERE "1st_m"=121.5; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number of points that has a 1st of 121.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bischofshofen_6_january" (
"rank" real,
"name" text,
"nationality" text,
"1st_m" real,
"2nd_m" real,
"points" real,
"overall_fht_points" text,
"overall_wc_points_rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of points that has a 1st of 121.5?`:
```sql
|
SELECT COUNT("1st_m") FROM "bischofshofen_6_january" WHERE "name"='martin schmitt' AND "points"<235.7; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of 1sts that Martin Schmitt had where he less than 235.7 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bischofshofen_6_january" (
"rank" real,
"name" text,
"nationality" text,
"1st_m" real,
"2nd_m" real,
"points" real,
"overall_fht_points" text,
"overall_wc_points_rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of 1sts that Martin Schmitt had where he less than 235.7 points?`:
```sql
|
SELECT COUNT("attendance") FROM "playoffs" WHERE "home"='buffalo'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of attendance for games where buffalo was the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of attendance for games where buffalo was the home team?`:
```sql
|
SELECT "score" FROM "playoffs" WHERE "visitor"='buffalo' AND "date"='april 28'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game on April 28 where Buffalo were the visiting team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game on April 28 where Buffalo were the visiting team?`:
```sql
|
SELECT "date" FROM "playoffs" WHERE "visitor"='philadelphia'; |
## Task
Generate a SQL query to answer the following question:
`What date was the game where the visiting team was philadelphia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the game where the visiting team was philadelphia?`:
```sql
|
SELECT "gold" FROM "individual" WHERE "year"<2002 AND "location"='seoul'; |
## Task
Generate a SQL query to answer the following question:
`Who got the gold in seoul before 2002?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual" (
"year" real,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who got the gold in seoul before 2002?`:
```sql
|
SELECT "location" FROM "individual" WHERE "silver"='sohn bong-gak'; |
## Task
Generate a SQL query to answer the following question:
`Where did sohn bong-gak win silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual" (
"year" real,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did sohn bong-gak win silver?`:
```sql
|
SELECT "bronze" FROM "individual" WHERE "gold"='jin kanno'; |
## Task
Generate a SQL query to answer the following question:
`Who won the bronze when jin kanno won the gold?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual" (
"year" real,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won the bronze when jin kanno won the gold?`:
```sql
|
SELECT "score" FROM "singles_30_15_15" WHERE "outcome"='runner-up' AND "tournament"='johannesburg'; |
## Task
Generate a SQL query to answer the following question:
`Which Score has an Outcome of runner-up, and a Tournament of johannesburg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_30_15_15" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Score has an Outcome of runner-up, and a Tournament of johannesburg?`:
```sql
|
SELECT "surface" FROM "singles_30_15_15" WHERE "opponent"='kerry melville reid' AND "score"='6–3, 2–6, 3–6'; |
## Task
Generate a SQL query to answer the following question:
`Which Surface has an Opponent of kerry melville reid, and a Score of 6–3, 2–6, 3–6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_30_15_15" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Surface has an Opponent of kerry melville reid, and a Score of 6–3, 2–6, 3–6?`:
```sql
|
SELECT "outcome" FROM "singles_30_15_15" WHERE "opponent"='wendy turnbull' AND "surface"='grass'; |
## Task
Generate a SQL query to answer the following question:
`Which Outcome has an Opponent of wendy turnbull, and a Surface of grass?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_30_15_15" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Outcome has an Opponent of wendy turnbull, and a Surface of grass?`:
```sql
|
SELECT "tournament" FROM "singles_30_15_15" WHERE "date"='22 january 1979'; |
## Task
Generate a SQL query to answer the following question:
`Which Tournament has a Date of 22 january 1979?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_30_15_15" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Tournament has a Date of 22 january 1979?`:
```sql
|
SELECT "outcome" FROM "singles_30_15_15" WHERE "score"='6–4, 2–6, 6–3'; |
## Task
Generate a SQL query to answer the following question:
`Which Outcome has a Score of 6–4, 2–6, 6–3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_30_15_15" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Outcome has a Score of 6–4, 2–6, 6–3?`:
```sql
|
SELECT "nation" FROM "medal_table" WHERE "total"<63 AND "silver"<2 AND "bronze">2 AND "rank"='8'; |
## Task
Generate a SQL query to answer the following question:
`Which nation has total medals under 63, less than 2 silver, more than 2 bronze, and a rank of 8?`
### 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 `Which nation has total medals under 63, less than 2 silver, more than 2 bronze, and a rank of 8?`:
```sql
|
SELECT COUNT("gold") FROM "medal_table" WHERE "bronze"=4 AND "silver">2; |
## Task
Generate a SQL query to answer the following question:
`How many golds have bronze values of 4 and silver values over 2?`
### 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 golds have bronze values of 4 and silver values over 2?`:
```sql
|
SELECT SUM("silver") FROM "medal_table" WHERE "bronze"<4 AND "rank"='3' AND "gold">2; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of silver values that have bronze values under 4, golds over 2, and a rank of 3?`
### 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 is the sum of silver values that have bronze values under 4, golds over 2, and a rank of 3?`:
```sql
|
SELECT SUM("gold") FROM "medal_table" WHERE "bronze">0 AND "total"<2; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of gold values that have bronze values over 0 and totals under 2?`
### 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 is the sum of gold values that have bronze values over 0 and totals under 2?`:
```sql
|
SELECT MIN("gold") FROM "medal_table" WHERE "total">15 AND "bronze"<31; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest gold value that has a total over 15 and bronze values under 31?`
### 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 is the smallest gold value that has a total over 15 and bronze values under 31?`:
```sql
|
SELECT "equatorial_diameter" FROM "other_celestial_bodies" WHERE "body"='mars'; |
## Task
Generate a SQL query to answer the following question:
`What is the Equatorial diameter of the Body: Mars?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_celestial_bodies" (
"body" text,
"equatorial_diameter" text,
"polar_diameter" text,
"equatorial_bulge" text,
"flattening_ratio" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Equatorial diameter of the Body: Mars?`:
```sql
|
SELECT "equatorial_diameter" FROM "other_celestial_bodies" WHERE "body"='ceres'; |
## Task
Generate a SQL query to answer the following question:
`What is the Equatorial diameter of the Body: ceres?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_celestial_bodies" (
"body" text,
"equatorial_diameter" text,
"polar_diameter" text,
"equatorial_bulge" text,
"flattening_ratio" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Equatorial diameter of the Body: ceres?`:
```sql
|
SELECT "flattening_ratio" FROM "other_celestial_bodies" WHERE "equatorial_diameter"='49,528km'; |
## Task
Generate a SQL query to answer the following question:
`What is the Flattening ratio associated with the Equatorial diameter of 49,528km?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_celestial_bodies" (
"body" text,
"equatorial_diameter" text,
"polar_diameter" text,
"equatorial_bulge" text,
"flattening_ratio" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Flattening ratio associated with the Equatorial diameter of 49,528km?`:
```sql
|
SELECT "equatorial_bulge" FROM "other_celestial_bodies" WHERE "body"='earth'; |
## Task
Generate a SQL query to answer the following question:
`What is the Equatorial bulge of the Body: Earth?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_celestial_bodies" (
"body" text,
"equatorial_diameter" text,
"polar_diameter" text,
"equatorial_bulge" text,
"flattening_ratio" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Equatorial bulge of the Body: Earth?`:
```sql
|
SELECT "flattening_ratio" FROM "other_celestial_bodies" WHERE "equatorial_diameter"='120,536km'; |
## Task
Generate a SQL query to answer the following question:
`What is the Flattening ratio associated with the Equatorial diameter of 120,536km?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_celestial_bodies" (
"body" text,
"equatorial_diameter" text,
"polar_diameter" text,
"equatorial_bulge" text,
"flattening_ratio" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Flattening ratio associated with the Equatorial diameter of 120,536km?`:
```sql
|
SELECT "flattening_ratio" FROM "other_celestial_bodies" WHERE "equatorial_diameter"='12,756.28km'; |
## Task
Generate a SQL query to answer the following question:
`What is the Flattening ratio associated with the Equatorial diameter of 12,756.28km?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_celestial_bodies" (
"body" text,
"equatorial_diameter" text,
"polar_diameter" text,
"equatorial_bulge" text,
"flattening_ratio" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Flattening ratio associated with the Equatorial diameter of 12,756.28km?`:
```sql
|
SELECT AVG("yards") FROM "rushing" WHERE "average"<4 AND "long"=12 AND "attempts"<29; |
## Task
Generate a SQL query to answer the following question:
`What is the average Yards with an average of less than 4 and the long is 12 with less than 29 attempts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rushing" (
"player" text,
"attempts" real,
"yards" real,
"average" real,
"long" real,
"touchdowns" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Yards with an average of less than 4 and the long is 12 with less than 29 attempts?`:
```sql
|
SELECT MIN("yards") FROM "rushing" WHERE "average"<2.6; |
## Task
Generate a SQL query to answer the following question:
`What is the least amount of yards when the average is less than 2.6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rushing" (
"player" text,
"attempts" real,
"yards" real,
"average" real,
"long" real,
"touchdowns" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least amount of yards when the average is less than 2.6?`:
```sql
|
SELECT MIN("touchdowns") FROM "rushing" WHERE "yards"=1318; |
## Task
Generate a SQL query to answer the following question:
`What is the lease amount of touchdowns with 1318 yards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rushing" (
"player" text,
"attempts" real,
"yards" real,
"average" real,
"long" real,
"touchdowns" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lease amount of touchdowns with 1318 yards?`:
```sql
|
SELECT COUNT("touchdowns") FROM "rushing" WHERE "average"<2.6; |
## Task
Generate a SQL query to answer the following question:
`What is the number of touchdowns with the average is less than 2.6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rushing" (
"player" text,
"attempts" real,
"yards" real,
"average" real,
"long" real,
"touchdowns" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of touchdowns with the average is less than 2.6?`:
```sql
|
SELECT COUNT("long") FROM "rushing" WHERE "attempts"=19; |
## Task
Generate a SQL query to answer the following question:
`What is the total number for long when there are 19 attempts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rushing" (
"player" text,
"attempts" real,
"yards" real,
"average" real,
"long" real,
"touchdowns" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number for long when there are 19 attempts?`:
```sql
|
SELECT "margin_of_victory" FROM "european_tour_wins_23" WHERE "tournament"='german masters'; |
## Task
Generate a SQL query to answer the following question:
`What was the margin of victory for Olazabal in the German Masters?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_23" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the margin of victory for Olazabal in the German Masters?`:
```sql
|
SELECT "winning_score" FROM "european_tour_wins_23" WHERE "runner_s_up"='phillip price'; |
## Task
Generate a SQL query to answer the following question:
`What was Olazabal's winning score in the event in which Phillip Price finished 2nd?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_23" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Olazabal's winning score in the event in which Phillip Price finished 2nd?`:
```sql
|
SELECT "winning_score" FROM "european_tour_wins_23" WHERE "tournament"='german masters'; |
## Task
Generate a SQL query to answer the following question:
`What was Olazabal's winning score in the German Masters?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_23" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Olazabal's winning score in the German Masters?`:
```sql
|
SELECT "margin_of_victory" FROM "european_tour_wins_23" WHERE "tournament"='ebel european masters swiss open'; |
## Task
Generate a SQL query to answer the following question:
`What was Olazabal's margin of victory int he Ebel European Masters Swiss Open?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_23" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Olazabal's margin of victory int he Ebel European Masters Swiss Open?`:
```sql
|
SELECT "series_ep" FROM "season_16_2010_2011" WHERE "netflix"='s08e18'; |
## Task
Generate a SQL query to answer the following question:
`Which Series Ep has a Netflix of s08e18?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_16_2010_2011" (
"series_ep" text,
"episode" real,
"netflix" text,
"segment_a" text,
"segment_b" text,
"segment_c" text,
"segment_d" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Series Ep has a Netflix of s08e18?`:
```sql
|
SELECT "segment_b" FROM "season_16_2010_2011" WHERE "segment_d"='stone wool insulation'; |
## Task
Generate a SQL query to answer the following question:
`Which Segment B has a Segment D of stone wool insulation?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_16_2010_2011" (
"series_ep" text,
"episode" real,
"netflix" text,
"segment_a" text,
"segment_b" text,
"segment_c" text,
"segment_d" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Segment B has a Segment D of stone wool insulation?`:
```sql
|
SELECT "segment_a" FROM "season_16_2010_2011" WHERE "segment_c"='poster restoration'; |
## Task
Generate a SQL query to answer the following question:
`Which Segment A has a Segment C of poster restoration?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_16_2010_2011" (
"series_ep" text,
"episode" real,
"netflix" text,
"segment_a" text,
"segment_b" text,
"segment_c" text,
"segment_d" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Segment A has a Segment C of poster restoration?`:
```sql
|
SELECT "segment_c" FROM "season_16_2010_2011" WHERE "segment_b"='fish food'; |
## Task
Generate a SQL query to answer the following question:
`Which Segment C has a Segment B of fish food?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_16_2010_2011" (
"series_ep" text,
"episode" real,
"netflix" text,
"segment_a" text,
"segment_b" text,
"segment_c" text,
"segment_d" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Segment C has a Segment B of fish food?`:
```sql
|
SELECT "segment_c" FROM "season_16_2010_2011" WHERE "netflix"='s08e16'; |
## Task
Generate a SQL query to answer the following question:
`Which Segment C has a Netflix of s08e16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_16_2010_2011" (
"series_ep" text,
"episode" real,
"netflix" text,
"segment_a" text,
"segment_b" text,
"segment_c" text,
"segment_d" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Segment C has a Netflix of s08e16?`:
```sql
|
SELECT "competition" FROM "december" WHERE "opponent"='peterborough phantoms' AND "date"=2; |
## Task
Generate a SQL query to answer the following question:
`What was the name of the competition that had Peterborough Phantoms as an opponent and a date of 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "december" (
"date" real,
"opponent" text,
"venue" text,
"result" text,
"attendance" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the name of the competition that had Peterborough Phantoms as an opponent and a date of 2?`:
```sql
|
SELECT "tally" FROM "single_game" WHERE "county"='kerry'; |
## Task
Generate a SQL query to answer the following question:
`What is the Tally in Kerry County?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "single_game" (
"player" text,
"county" text,
"tally" text,
"total" real,
"matches" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Tally in Kerry County?`:
```sql
|
SELECT MAX("matches") FROM "single_game" WHERE "player"='ian ryan' AND "total"<29; |
## Task
Generate a SQL query to answer the following question:
`With a Total of less than 29, what is Ian Ryan's most Matches?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "single_game" (
"player" text,
"county" text,
"tally" text,
"total" real,
"matches" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `With a Total of less than 29, what is Ian Ryan's most Matches?`:
```sql
|
SELECT "lema_sublema" FROM "results" WHERE "votes"<218656 AND "ch_of_deputies"='0'; |
## Task
Generate a SQL query to answer the following question:
`Which LEMA/SUBLEMA that has Votes smaller than 218656, and a Ch of Deputies of 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"lema_sublema" text,
"candidates" text,
"votes" real,
"ch_of_senators" text,
"ch_of_deputies" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which LEMA/SUBLEMA that has Votes smaller than 218656, and a Ch of Deputies of 0?`:
```sql
|
SELECT "lema_sublema" FROM "results" WHERE "ch_of_senators"='2'; |
## Task
Generate a SQL query to answer the following question:
`Which LEMA/SUBLEMA has a Ch of Senators of 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"lema_sublema" text,
"candidates" text,
"votes" real,
"ch_of_senators" text,
"ch_of_deputies" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which LEMA/SUBLEMA has a Ch of Senators of 2?`:
```sql
|
SELECT "ch_of_senators" FROM "results" WHERE "lema_sublema"='lema'; |
## Task
Generate a SQL query to answer the following question:
`Which Ch of Senators has a LEMA/SUBLEMA of lema?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"lema_sublema" text,
"candidates" text,
"votes" real,
"ch_of_senators" text,
"ch_of_deputies" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Ch of Senators has a LEMA/SUBLEMA of lema?`:
```sql
|
SELECT "tournament" FROM "wins_22" WHERE "score_in_the_final"='6–7, 6–2, 6–4'; |
## Task
Generate a SQL query to answer the following question:
`what tornament had the scores 6–7, 6–2, 6–4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wins_22" (
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `what tornament had the scores 6–7, 6–2, 6–4?`:
```sql
|
SELECT "partner" FROM "wins_22" WHERE "score_in_the_final"='6–4, 6–1'; |
## Task
Generate a SQL query to answer the following question:
`what partner made the scores 6–4, 6–1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wins_22" (
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `what partner made the scores 6–4, 6–1?`:
```sql
|
SELECT "year" FROM "achievements" WHERE "notes"='6.62 m'; |
## Task
Generate a SQL query to answer the following question:
`What year had 6.62 m in the notes?`
### 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 year had 6.62 m in the notes?`:
```sql
|
SELECT "competition" FROM "achievements" WHERE "position"='8th' AND "venue"='budapest, hungary'; |
## Task
Generate a SQL query to answer the following question:
`Which competition in Budapest, Hungary gave a result of 8th?`
### 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 in Budapest, Hungary gave a result of 8th?`:
```sql
|
SELECT SUM("year") FROM "achievements" WHERE "competition"='world indoor championships' AND "position"='3rd'; |
## Task
Generate a SQL query to answer the following question:
`Which year did the World indoor championships gave a position of 3rd?`
### 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 did the World indoor championships gave a position of 3rd?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.