output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "home_team_score" FROM "round_12" WHERE "away_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What did the team score at home in north melbourne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_12" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What did the team score at home in north melbourne?`:
```sql
|
SELECT AVG("comppct") FROM "quarterback" WHERE "td_s"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the computation for 5 or less TD's?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "quarterback" (
"player" text,
"comp" real,
"att" real,
"comppct" real,
"yards" real,
"td_s" real,
"int_s" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the computation for 5 or less TD's?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "grid"<2; |
## Task
Generate a SQL query to answer the following question:
`What was the time of the driver in grid 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the time of the driver in grid 2?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "grid"<14 AND "driver"='carroll shelby'; |
## Task
Generate a SQL query to answer the following question:
`What time did Carroll Shelby have in Grid 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What time did Carroll Shelby have in Grid 14?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "laps"<62 AND "constructor"='ferrari'; |
## Task
Generate a SQL query to answer the following question:
`What time did the ferrari car that finished 62 laps have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What time did the ferrari car that finished 62 laps have?`:
```sql
|
SELECT "date" FROM "april" WHERE "visitor"='knicks' AND "attendance">'18,165'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the game where the vistor team was the Knicks and more than 18,165 were in attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "april" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the game where the vistor team was the Knicks and more than 18,165 were in attendance?`:
```sql
|
SELECT AVG("laps") FROM "race" WHERE "driver"='teo fabi' AND "grid"<9; |
## Task
Generate a SQL query to answer the following question:
`Whats teo fabi average lap time while having less than 9 grids?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Whats teo fabi average lap time while having less than 9 grids?`:
```sql
|
SELECT "driver" FROM "race" WHERE "grid"=19; |
## Task
Generate a SQL query to answer the following question:
`Which driver drove in grid 19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which driver drove in grid 19?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "date"='april 29'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent on April 29?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent on April 29?`:
```sql
|
SELECT SUM("attendance") FROM "game_log" WHERE "date"='april 17'; |
## Task
Generate a SQL query to answer the following question:
`How many attended the game on April 17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many attended the game on April 17?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "date"='april 3'; |
## Task
Generate a SQL query to answer the following question:
`What is the record on April 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record on April 3?`:
```sql
|
SELECT "weight" FROM "non_electronic_paper_displays" WHERE "internal_storage"='16-64 gb' AND "wireless_network"='wi-fi, 3g'; |
## Task
Generate a SQL query to answer the following question:
`What is the weight of the display that has an internal storage of 16-64 GB and uses a wi-fi, 3G wireless network?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_electronic_paper_displays" (
"maker" text,
"model" text,
"intro_year" text,
"screen_size_inch" text,
"screen_type" text,
"weight" text,
"screen_pixels" text,
"hours_reading" text,
"touch_screen" text,
"wireless_network" text,
"internal_storage" text,
"card_reader_slot" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the weight of the display that has an internal storage of 16-64 GB and uses a wi-fi, 3G wireless network?`:
```sql
|
SELECT "wireless_network" FROM "non_electronic_paper_displays" WHERE "screen_type"='lcd' AND "internal_storage"='4 gb'; |
## Task
Generate a SQL query to answer the following question:
`Which wireless network did LCD displays with 4 GB of internal storage use?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_electronic_paper_displays" (
"maker" text,
"model" text,
"intro_year" text,
"screen_size_inch" text,
"screen_type" text,
"weight" text,
"screen_pixels" text,
"hours_reading" text,
"touch_screen" text,
"wireless_network" text,
"internal_storage" text,
"card_reader_slot" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which wireless network did LCD displays with 4 GB of internal storage use?`:
```sql
|
SELECT MIN("draws") FROM "2012_ladder" WHERE "wins"<15 AND "against"=1228; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest number of draws when the wins are less than 15, and against is 1228?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2012_ladder" (
"mid_gippsland_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the lowest number of draws when the wins are less than 15, and against is 1228?`:
```sql
|
SELECT SUM("draws") FROM "2012_ladder" WHERE "against">1228 AND "wins"<1; |
## Task
Generate a SQL query to answer the following question:
`What's the sum of draws for against larger than 1228 with fewer than 1 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2012_ladder" (
"mid_gippsland_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the sum of draws for against larger than 1228 with fewer than 1 wins?`:
```sql
|
SELECT "dates" FROM "riff_awards" WHERE "lifetime_achievement"='jim jarmusch'; |
## Task
Generate a SQL query to answer the following question:
`On what dates did Jim Jarmusch win the Lifetime Achievement?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "riff_awards" (
"year" real,
"dates" text,
"discovery_of_the_year_golden_puffin" text,
"lifetime_achievement" text,
"creative_excellency" text,
"audience_award" text,
"fipresci_award" text,
"church_of_iceland_award" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what dates did Jim Jarmusch win the Lifetime Achievement?`:
```sql
|
SELECT "home" FROM "game_log" WHERE "visitor"='colorado' AND "record"='26–15–9'; |
## Task
Generate a SQL query to answer the following question:
`Which team was the home team when Colorado was the visitor and the record became 26–15–9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team was the home team when Colorado was the visitor and the record became 26–15–9?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "record"='25–14–9'; |
## Task
Generate a SQL query to answer the following question:
`What was the score when the record became 25–14–9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score when the record became 25–14–9?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "record"='26–14–9'; |
## Task
Generate a SQL query to answer the following question:
`What was the date the record became 26–14–9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date the record became 26–14–9?`:
```sql
|
SELECT "home" FROM "game_log" WHERE "visitor"='colorado' AND "record"='22–13–6'; |
## Task
Generate a SQL query to answer the following question:
`What team was the home team when Colorado was the visitor and the record became 22–13–6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the home team when Colorado was the visitor and the record became 22–13–6?`:
```sql
|
SELECT "venue" FROM "achievements" WHERE "tournament"='asian games'; |
## Task
Generate a SQL query to answer the following question:
`What's the venue for the asian games tournament?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the venue for the asian games tournament?`:
```sql
|
SELECT "tournament" FROM "achievements" WHERE "result"='6th'; |
## Task
Generate a SQL query to answer the following question:
`Which tournament resulted in 6th place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which tournament resulted in 6th place?`:
```sql
|
SELECT MAX("year") FROM "achievements" WHERE "venue"='doha, qatar'; |
## Task
Generate a SQL query to answer the following question:
`What's the latest year that Doha, Qatar hosted a tournament?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the latest year that Doha, Qatar hosted a tournament?`:
```sql
|
SELECT AVG("year") FROM "achievements" WHERE "venue"='doha, qatar'; |
## Task
Generate a SQL query to answer the following question:
`What's the average of all years tournaments were hosted in Doha, Qatar?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the average of all years tournaments were hosted in Doha, Qatar?`:
```sql
|
SELECT SUM("overall") FROM "1994_chiefs_draft_selections" WHERE "position"='running back' AND "round">1 AND "college"='fresno state'; |
## Task
Generate a SQL query to answer the following question:
`What is the overall draft number for the running back drafted after round 1 from fresno state?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1994_chiefs_draft_selections" (
"round" real,
"overall" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the overall draft number for the running back drafted after round 1 from fresno state?`:
```sql
|
SELECT SUM("overall") FROM "1994_chiefs_draft_selections" WHERE "college"='notre dame'; |
## Task
Generate a SQL query to answer the following question:
`What is the overall total for players drafted from notre dame?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1994_chiefs_draft_selections" (
"round" real,
"overall" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the overall total for players drafted from notre dame?`:
```sql
|
SELECT SUM("gold") FROM "medal_table" WHERE "silver">1; |
## Task
Generate a SQL query to answer the following question:
`Name the sum of gold which has a silver more than 1`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sum of gold which has a silver more than 1`:
```sql
|
SELECT AVG("rank") FROM "medal_table" WHERE "nation"='west germany' AND "gold">1; |
## Task
Generate a SQL query to answer the following question:
`Name the average rank for west germany when gold is more than 1`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average rank for west germany when gold is more than 1`:
```sql
|
SELECT AVG("rank") FROM "medal_table" WHERE "bronze">1; |
## Task
Generate a SQL query to answer the following question:
`Name the average rank for when bronze is more than 1`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average rank for when bronze is more than 1`:
```sql
|
SELECT SUM("gold") FROM "medal_table" WHERE "silver"<0; |
## Task
Generate a SQL query to answer the following question:
`I want the sum of gold for silver being less than 0`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `I want the sum of gold for silver being less than 0`:
```sql
|
SELECT AVG("2011_12") FROM "uefa_team_ranking" WHERE "2010_11"<26.016 AND "rank_2013">20 AND "club"='rubin kazan'; |
## Task
Generate a SQL query to answer the following question:
`Which 2011–12 has a 2010–11 smaller than 26.016, and a Rank 2013 larger than 20, and a Club of rubin kazan?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "uefa_team_ranking" (
"rank_2014" real,
"rank_2013" real,
"mvmt" text,
"club" text,
"country" text,
"2009_10" real,
"2010_11" real,
"2011_12" real,
"2012_13" real,
"2013_14" real,
"coeff" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which 2011–12 has a 2010–11 smaller than 26.016, and a Rank 2013 larger than 20, and a Club of rubin kazan?`:
```sql
|
SELECT AVG("rank_2014") FROM "uefa_team_ranking" WHERE "2009_10"=21.233; |
## Task
Generate a SQL query to answer the following question:
`Which Rank 2014 has a 2009–10 of 21.233?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "uefa_team_ranking" (
"rank_2014" real,
"rank_2013" real,
"mvmt" text,
"club" text,
"country" text,
"2009_10" real,
"2010_11" real,
"2011_12" real,
"2012_13" real,
"2013_14" real,
"coeff" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank 2014 has a 2009–10 of 21.233?`:
```sql
|
SELECT AVG("2013_14") FROM "uefa_team_ranking" WHERE "rank_2014"<23 AND "2011_12">19.1 AND "rank_2013"=14; |
## Task
Generate a SQL query to answer the following question:
`Which 2013–14 has a Rank 2014 smaller than 23, and a 2011–12 larger than 19.1, and a Rank 2013 of 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "uefa_team_ranking" (
"rank_2014" real,
"rank_2013" real,
"mvmt" text,
"club" text,
"country" text,
"2009_10" real,
"2010_11" real,
"2011_12" real,
"2012_13" real,
"2013_14" real,
"coeff" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which 2013–14 has a Rank 2014 smaller than 23, and a 2011–12 larger than 19.1, and a Rank 2013 of 14?`:
```sql
|
SELECT "polling_dates" FROM "poll_results" WHERE "larry_o_brien"='37%'; |
## Task
Generate a SQL query to answer the following question:
`What are the polling dates when Larry O'Brien has 37%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "poll_results" (
"polling_firm" text,
"polling_dates" text,
"bob_chiarelli" text,
"alex_munter" text,
"larry_o_brien" text,
"terry_kilrea_dropped_out" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the polling dates when Larry O'Brien has 37%?`:
```sql
|
SELECT "terry_kilrea_dropped_out" FROM "poll_results" WHERE "larry_o_brien"='18%'; |
## Task
Generate a SQL query to answer the following question:
`What dates and firm does Larry O'Brien have 18% when Terry Kilrea dropped out?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "poll_results" (
"polling_firm" text,
"polling_dates" text,
"bob_chiarelli" text,
"alex_munter" text,
"larry_o_brien" text,
"terry_kilrea_dropped_out" text
);
### SQL
Given the database schema, here is the SQL query that answers `What dates and firm does Larry O'Brien have 18% when Terry Kilrea dropped out?`:
```sql
|
SELECT "polling_dates" FROM "poll_results" WHERE "alex_munter"='25%' AND "polling_firm"='decima'; |
## Task
Generate a SQL query to answer the following question:
`What dates does Alex Munter have 25% and the polling firm of Decima?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "poll_results" (
"polling_firm" text,
"polling_dates" text,
"bob_chiarelli" text,
"alex_munter" text,
"larry_o_brien" text,
"terry_kilrea_dropped_out" text
);
### SQL
Given the database schema, here is the SQL query that answers `What dates does Alex Munter have 25% and the polling firm of Decima?`:
```sql
|
SELECT "polling_dates" FROM "poll_results" WHERE "polling_firm"='decima' AND "larry_o_brien"='37%'; |
## Task
Generate a SQL query to answer the following question:
`What are the Decima polling dates when Larry O'Brien has 37%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "poll_results" (
"polling_firm" text,
"polling_dates" text,
"bob_chiarelli" text,
"alex_munter" text,
"larry_o_brien" text,
"terry_kilrea_dropped_out" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the Decima polling dates when Larry O'Brien has 37%?`:
```sql
|
SELECT "terry_kilrea_dropped_out" FROM "poll_results" WHERE "polling_firm"='holinshed' AND "bob_chiarelli"='22.5%'; |
## Task
Generate a SQL query to answer the following question:
`What are the polling dates for polling firm Holinshed when Terry Kilrea dropped out and Bob Chiarelli has 22.5%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "poll_results" (
"polling_firm" text,
"polling_dates" text,
"bob_chiarelli" text,
"alex_munter" text,
"larry_o_brien" text,
"terry_kilrea_dropped_out" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the polling dates for polling firm Holinshed when Terry Kilrea dropped out and Bob Chiarelli has 22.5%?`:
```sql
|
SELECT "date" FROM "singles_4_7" WHERE "outcome"='runner up' AND "opponent"='lu jiaxiang'; |
## Task
Generate a SQL query to answer the following question:
`What is Date, when Outcome is "Runner Up", and when Opponent is "Lu Jiaxiang"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_4_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Date, when Outcome is "Runner Up", and when Opponent is "Lu Jiaxiang"?`:
```sql
|
SELECT "opponent" FROM "singles_4_7" WHERE "tournament"='phuket , thailand'; |
## Task
Generate a SQL query to answer the following question:
`What is Opponent, when Tournament is "Phuket , Thailand"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_4_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Opponent, when Tournament is "Phuket , Thailand"?`:
```sql
|
SELECT "surface" FROM "singles_4_7" WHERE "tournament"='saint joseph , united states'; |
## Task
Generate a SQL query to answer the following question:
`What is Surface, when Tournament is "Saint Joseph , United States"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_4_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Surface, when Tournament is "Saint Joseph , United States"?`:
```sql
|
SELECT "tournament" FROM "singles_4_7" WHERE "opponent"='lu jiaxiang'; |
## Task
Generate a SQL query to answer the following question:
`What is Tournament, when Opponent is "Lu Jiaxiang"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_4_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Tournament, when Opponent is "Lu Jiaxiang"?`:
```sql
|
SELECT "outcome" FROM "singles_4_7" WHERE "tournament"='chiang mai , thailand'; |
## Task
Generate a SQL query to answer the following question:
`What is Outcome, when Tournament is "Chiang Mai , Thailand"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_4_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Outcome, when Tournament is "Chiang Mai , Thailand"?`:
```sql
|
SELECT "outcome" FROM "singles_4_7" WHERE "date"='19 september 2012'; |
## Task
Generate a SQL query to answer the following question:
`What is Outcome, when Date is "19 September 2012"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_4_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Outcome, when Date is "19 September 2012"?`:
```sql
|
SELECT AVG("poles") FROM "career_summary" WHERE "races"<4; |
## Task
Generate a SQL query to answer the following question:
`What Poles have Races smaller than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team" text,
"races" real,
"wins" real,
"poles" real,
"podiums" real,
"points" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Poles have Races smaller than 4?`:
```sql
|
SELECT COUNT("points") FROM "career_summary" WHERE "series"='italian formula renault 2.0' AND "poles"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Points with a Series of italian formula renault 2.0, and Poles smaller than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team" text,
"races" real,
"wins" real,
"poles" real,
"podiums" real,
"points" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Points with a Series of italian formula renault 2.0, and Poles smaller than 0?`:
```sql
|
SELECT SUM("points") FROM "career_summary" WHERE "wins">0 AND "position"='12th' AND "poles">0; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Points with Wins larger than 0, a Position of 12th, and Poles larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team" text,
"races" real,
"wins" real,
"poles" real,
"podiums" real,
"points" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Points with Wins larger than 0, a Position of 12th, and Poles larger than 0?`:
```sql
|
SELECT MIN("wins") FROM "career_summary" WHERE "position"='20th' AND "poles"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest Wins with a Position of 20th, and Poles smaller than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team" text,
"races" real,
"wins" real,
"poles" real,
"podiums" real,
"points" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest Wins with a Position of 20th, and Poles smaller than 0?`:
```sql
|
SELECT "date" FROM "professional_boxing_record" WHERE "location"='madrid, esp'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the match located in Madrid, Esp?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "professional_boxing_record" (
"result" text,
"opponent" text,
"type" text,
"rd_time" text,
"date" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the match located in Madrid, Esp?`:
```sql
|
SELECT "miss_maja_pilipinas" FROM "title_holders_from_1964_until_1972" WHERE "second_runner_up"='maria penson'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Miss Pilipinas that has the Second runner-up of maria penson?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "title_holders_from_1964_until_1972" (
"year" real,
"binibining_pilipinas_universe" text,
"binibining_pilipinas_international" text,
"miss_maja_pilipinas" text,
"first_runner_up" text,
"second_runner_up" text,
"third_runner_up" text,
"fourth_runner_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Miss Pilipinas that has the Second runner-up of maria penson?`:
```sql
|
SELECT "miss_maja_pilipinas" FROM "title_holders_from_1964_until_1972" WHERE "year"=1969; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Miss Maja Pilipinas that has the Year of 1969?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "title_holders_from_1964_until_1972" (
"year" real,
"binibining_pilipinas_universe" text,
"binibining_pilipinas_international" text,
"miss_maja_pilipinas" text,
"first_runner_up" text,
"second_runner_up" text,
"third_runner_up" text,
"fourth_runner_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Miss Maja Pilipinas that has the Year of 1969?`:
```sql
|
SELECT "third_runner_up" FROM "title_holders_from_1964_until_1972" WHERE "year"=1969; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Third runner-up that has the Year of 1969?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "title_holders_from_1964_until_1972" (
"year" real,
"binibining_pilipinas_universe" text,
"binibining_pilipinas_international" text,
"miss_maja_pilipinas" text,
"first_runner_up" text,
"second_runner_up" text,
"third_runner_up" text,
"fourth_runner_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Third runner-up that has the Year of 1969?`:
```sql
|
SELECT "7_s_wen" FROM "numerals" WHERE "3_dree"='3d dredda'; |
## Task
Generate a SQL query to answer the following question:
`What is 7 säwen if 3 dree is 3d dredda?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "numerals" (
"2_twee" text,
"3_dree" text,
"4_vea" text,
"5_fiew" text,
"6_sas" text,
"7_s_wen" text,
"8_acht" text,
"9_n_ajen" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 7 säwen if 3 dree is 3d dredda?`:
```sql
|
SELECT "3_dree" FROM "numerals" WHERE "8_acht"='8th achta'; |
## Task
Generate a SQL query to answer the following question:
`What is 3 dree if 8 acht is 8th achta?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "numerals" (
"2_twee" text,
"3_dree" text,
"4_vea" text,
"5_fiew" text,
"6_sas" text,
"7_s_wen" text,
"8_acht" text,
"9_n_ajen" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 3 dree if 8 acht is 8th achta?`:
```sql
|
SELECT "5_fiew" FROM "numerals" WHERE "7_s_wen"='17 säwentieen'; |
## Task
Generate a SQL query to answer the following question:
`What is 5 fiew when 7 säwen equals 17 säwentieen?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "numerals" (
"2_twee" text,
"3_dree" text,
"4_vea" text,
"5_fiew" text,
"6_sas" text,
"7_s_wen" text,
"8_acht" text,
"9_n_ajen" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 5 fiew when 7 säwen equals 17 säwentieen?`:
```sql
|
SELECT "5_fiew" FROM "numerals" WHERE "7_s_wen"='7th säwenda'; |
## Task
Generate a SQL query to answer the following question:
`What is 5 fiew if 7 säwen is 7th säwenda?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "numerals" (
"2_twee" text,
"3_dree" text,
"4_vea" text,
"5_fiew" text,
"6_sas" text,
"7_s_wen" text,
"8_acht" text,
"9_n_ajen" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 5 fiew if 7 säwen is 7th säwenda?`:
```sql
|
SELECT "4_vea" FROM "numerals" WHERE "6_sas"='60 zastich'; |
## Task
Generate a SQL query to answer the following question:
`Name the 4 vea for 6 sas at 60 zastich?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "numerals" (
"2_twee" text,
"3_dree" text,
"4_vea" text,
"5_fiew" text,
"6_sas" text,
"7_s_wen" text,
"8_acht" text,
"9_n_ajen" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 4 vea for 6 sas at 60 zastich?`:
```sql
|
SELECT "byes" FROM "2009_ladder" WHERE "against"<1466 AND "losses"<6; |
## Task
Generate a SQL query to answer the following question:
`Which Byes have an Against smaller than 1466, and Losses smaller than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009_ladder" (
"geelong_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Byes have an Against smaller than 1466, and Losses smaller than 6?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "week"=2; |
## Task
Generate a SQL query to answer the following question:
`What was week 2's opponent?`
### 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,
"venue" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was week 2's opponent?`:
```sql
|
SELECT MAX("week") FROM "schedule" WHERE "attendance"='20,112'; |
## Task
Generate a SQL query to answer the following question:
`Which Week has an Attendance of 20,112?`
### 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,
"venue" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Week has an Attendance of 20,112?`:
```sql
|
SELECT "margin_of_victory" FROM "nascar_sprint_cup_series_race_winners" WHERE "make"='dodge intrepid'; |
## Task
Generate a SQL query to answer the following question:
`What is the margin of victory of the Dodge Intrepid?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_sprint_cup_series_race_winners" (
"season" real,
"date" text,
"winning_driver" text,
"car_num" real,
"sponsor" text,
"make" text,
"distance" text,
"avg_speed" text,
"margin_of_victory" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the margin of victory of the Dodge Intrepid?`:
```sql
|
SELECT MIN("car_num") FROM "nascar_sprint_cup_series_race_winners" WHERE "sponsor"='ups' AND "season"<2001; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest car number sponsored by UPS before 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_sprint_cup_series_race_winners" (
"season" real,
"date" text,
"winning_driver" text,
"car_num" real,
"sponsor" text,
"make" text,
"distance" text,
"avg_speed" text,
"margin_of_victory" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest car number sponsored by UPS before 2001?`:
```sql
|
SELECT "sponsor" FROM "nascar_sprint_cup_series_race_winners" WHERE "winning_driver"='greg biffle' AND "date"='april 14'; |
## Task
Generate a SQL query to answer the following question:
`Who sponsored Greg Biffle's win on April 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_sprint_cup_series_race_winners" (
"season" real,
"date" text,
"winning_driver" text,
"car_num" real,
"sponsor" text,
"make" text,
"distance" text,
"avg_speed" text,
"margin_of_victory" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who sponsored Greg Biffle's win on April 14?`:
```sql
|
SELECT MAX("car_num") FROM "nascar_sprint_cup_series_race_winners" WHERE "sponsor"='post-it / national guard'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest car number sponsored by Post-It / National Guard?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_sprint_cup_series_race_winners" (
"season" real,
"date" text,
"winning_driver" text,
"car_num" real,
"sponsor" text,
"make" text,
"distance" text,
"avg_speed" text,
"margin_of_victory" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest car number sponsored by Post-It / National Guard?`:
```sql
|
SELECT COUNT("season") FROM "nascar_sprint_cup_series_race_winners" WHERE "car_num">17 AND "sponsor"='ups'; |
## Task
Generate a SQL query to answer the following question:
`How many seasons has UPS sponsored a car with a number larger than 17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_sprint_cup_series_race_winners" (
"season" real,
"date" text,
"winning_driver" text,
"car_num" real,
"sponsor" text,
"make" text,
"distance" text,
"avg_speed" text,
"margin_of_victory" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many seasons has UPS sponsored a car with a number larger than 17?`:
```sql
|
SELECT "set_2" FROM "pool_b" WHERE "set_1"='29–27'; |
## Task
Generate a SQL query to answer the following question:
`What shows for set 2 when Set 1 is 29–27?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_b" (
"date" text,
"time" text,
"score" text,
"set_1" text,
"set_2" text,
"set_3" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What shows for set 2 when Set 1 is 29–27?`:
```sql
|
SELECT "time" FROM "pool_b" WHERE "set_1"='21–25'; |
## Task
Generate a SQL query to answer the following question:
`What is the time when the set 1 is 21–25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_b" (
"date" text,
"time" text,
"score" text,
"set_1" text,
"set_2" text,
"set_3" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time when the set 1 is 21–25?`:
```sql
|
SELECT "score" FROM "pool_b" WHERE "set_3"='26–28'; |
## Task
Generate a SQL query to answer the following question:
`What is the score when the set 3 is 26–28?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_b" (
"date" text,
"time" text,
"score" text,
"set_1" text,
"set_2" text,
"set_3" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score when the set 3 is 26–28?`:
```sql
|
SELECT "score" FROM "pool_b" WHERE "set_3"='26–28'; |
## Task
Generate a SQL query to answer the following question:
`What is the Score when the set 3 is 26–28?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_b" (
"date" text,
"time" text,
"score" text,
"set_1" text,
"set_2" text,
"set_3" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Score when the set 3 is 26–28?`:
```sql
|
SELECT "set_3" FROM "pool_b" WHERE "total"='78–92'; |
## Task
Generate a SQL query to answer the following question:
`What is the set 3 when the total is 78–92?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_b" (
"date" text,
"time" text,
"score" text,
"set_1" text,
"set_2" text,
"set_3" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the set 3 when the total is 78–92?`:
```sql
|
SELECT "total" FROM "pool_b" WHERE "set_1"='21–25'; |
## Task
Generate a SQL query to answer the following question:
`What is the total when the set 1 is 21–25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_b" (
"date" text,
"time" text,
"score" text,
"set_1" text,
"set_2" text,
"set_3" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total when the set 1 is 21–25?`:
```sql
|
SELECT COUNT("losses") FROM "s_s_lazio" WHERE "draw"<51 AND "wins">6; |
## Task
Generate a SQL query to answer the following question:
`How many total losses were with less than 51 draws but more than 6 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_s_lazio" (
"matches" real,
"wins" real,
"draw" real,
"losses" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many total losses were with less than 51 draws but more than 6 wins?`:
```sql
|
SELECT SUM("matches") FROM "s_s_lazio" WHERE "against">6 AND "draw"=51; |
## Task
Generate a SQL query to answer the following question:
`How many matches has 51 draws and more than 6 against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_s_lazio" (
"matches" real,
"wins" real,
"draw" real,
"losses" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many matches has 51 draws and more than 6 against?`:
```sql
|
SELECT MAX("wins") FROM "s_s_lazio" WHERE "against">165; |
## Task
Generate a SQL query to answer the following question:
`How many wins has more than 165 against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_s_lazio" (
"matches" real,
"wins" real,
"draw" real,
"losses" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins has more than 165 against?`:
```sql
|
SELECT AVG("draw") FROM "s_s_lazio" WHERE "losses"<35 AND "matches"=136 AND "against"<146; |
## Task
Generate a SQL query to answer the following question:
`How many draws have less than 35 losses with 136 matches and less than 146 against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_s_lazio" (
"matches" real,
"wins" real,
"draw" real,
"losses" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many draws have less than 35 losses with 136 matches and less than 146 against?`:
```sql
|
SELECT COUNT("against") FROM "2012_ladder" WHERE "wins">15; |
## Task
Generate a SQL query to answer the following question:
`How many Againsts have more than 15 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2012_ladder" (
"mininera_dfl" 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 Againsts have more than 15 wins?`:
```sql
|
SELECT AVG("byes") FROM "2012_ladder" WHERE "losses">0 AND "against">3049; |
## Task
Generate a SQL query to answer the following question:
`Which Byes have Losses larger than 0, and an Against larger than 3049?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2012_ladder" (
"mininera_dfl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Byes have Losses larger than 0, and an Against larger than 3049?`:
```sql
|
SELECT COUNT("points_1") FROM "second_division_final_table" WHERE "position"=7 AND "drawn">6; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Points 1, when Position is "7", and when Drawn is greater than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_division_final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Points 1, when Position is "7", and when Drawn is greater than 6?`:
```sql
|
SELECT MAX("goals_for") FROM "second_division_final_table" WHERE "team"='cheadle town' AND "drawn">7; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Goals For, when Team is "Cheadle Town", and when Drawn is greater than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_division_final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Goals For, when Team is "Cheadle Town", and when Drawn is greater than 7?`:
```sql
|
SELECT SUM("position") FROM "second_division_final_table" WHERE "points_1">23 AND "goals_for"=77; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Position, when Points 1 is greater than 23, and when Goals For is "77"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_division_final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Position, when Points 1 is greater than 23, and when Goals For is "77"?`:
```sql
|
SELECT "played" FROM "second_division_final_table" WHERE "goal_difference"='+51'; |
## Task
Generate a SQL query to answer the following question:
`What is Played, when Goal Difference is "+51"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_division_final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Played, when Goal Difference is "+51"?`:
```sql
|
SELECT "date" FROM "runners_up_12" WHERE "surface"='carpet'; |
## Task
Generate a SQL query to answer the following question:
`What is Date, when Surface is "Carpet"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "runners_up_12" (
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Date, when Surface is "Carpet"?`:
```sql
|
SELECT "tournament" FROM "runners_up_12" WHERE "date"='6 october 2008'; |
## Task
Generate a SQL query to answer the following question:
`What is Tournament, when Date is "6 October 2008"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "runners_up_12" (
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Tournament, when Date is "6 October 2008"?`:
```sql
|
SELECT "surface" FROM "runners_up_12" WHERE "tournament"='sunderland , united kingdom'; |
## Task
Generate a SQL query to answer the following question:
`What is Surface, when Tournament is "Sunderland , United Kingdom"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "runners_up_12" (
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Surface, when Tournament is "Sunderland , United Kingdom"?`:
```sql
|
SELECT "replaced_by" FROM "managerial_changes" WHERE "outgoing_manager"='istván sándor'; |
## Task
Generate a SQL query to answer the following question:
`Who replaced István Sándor?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "managerial_changes" (
"team" text,
"outgoing_manager" text,
"manner_of_departure" text,
"date_of_vacancy" text,
"position_in_table" text,
"replaced_by" text,
"date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who replaced István Sándor?`:
```sql
|
SELECT "position_in_table" FROM "managerial_changes" WHERE "outgoing_manager"='lászló dajka'; |
## Task
Generate a SQL query to answer the following question:
`What is the position that has the outgoing manager lászló Dajka?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "managerial_changes" (
"team" text,
"outgoing_manager" text,
"manner_of_departure" text,
"date_of_vacancy" text,
"position_in_table" text,
"replaced_by" text,
"date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the position that has the outgoing manager lászló Dajka?`:
```sql
|
SELECT "date_of_appointment" FROM "managerial_changes" WHERE "outgoing_manager"='zoltán varga'; |
## Task
Generate a SQL query to answer the following question:
`When was outgoing manager Zoltán Varga appointed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "managerial_changes" (
"team" text,
"outgoing_manager" text,
"manner_of_departure" text,
"date_of_vacancy" text,
"position_in_table" text,
"replaced_by" text,
"date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was outgoing manager Zoltán Varga appointed?`:
```sql
|
SELECT "score" FROM "pool_a" WHERE "date"='05 dec'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Score that has the Date of 05 dec?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_a" (
"date" text,
"time" text,
"score" text,
"set_1" text,
"set_2" text,
"set_3" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Score that has the Date of 05 dec?`:
```sql
|
SELECT AVG("points_pts") FROM "anaprof_2008_relegation_table" WHERE "won_pg">17; |
## Task
Generate a SQL query to answer the following question:
`What is the average number of points of the team with more than 17 pg won?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "anaprof_2008_relegation_table" (
"place_posici_n" real,
"team_equipo" text,
"played_pj" real,
"won_pg" real,
"draw_pe" real,
"lost_pp" real,
"goals_scored_gf" real,
"goals_conceded_gc" real,
"dif" real,
"points_pts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of points of the team with more than 17 pg won?`:
```sql
|
SELECT COUNT("won_pg") FROM "anaprof_2008_relegation_table" WHERE "goals_conceded_gc"=64 AND "goals_scored_gf">33; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of pg won of the team with 64 goals conceded and more than 33 goals scored?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "anaprof_2008_relegation_table" (
"place_posici_n" real,
"team_equipo" text,
"played_pj" real,
"won_pg" real,
"draw_pe" real,
"lost_pp" real,
"goals_scored_gf" real,
"goals_conceded_gc" real,
"dif" real,
"points_pts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of pg won of the team with 64 goals conceded and more than 33 goals scored?`:
```sql
|
SELECT SUM("draw_pe") FROM "anaprof_2008_relegation_table" WHERE "team_equipo"='plaza amador' AND "won_pg"<6; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the pe draw of team plaza amador, who has less than 6 pg won?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "anaprof_2008_relegation_table" (
"place_posici_n" real,
"team_equipo" text,
"played_pj" real,
"won_pg" real,
"draw_pe" real,
"lost_pp" real,
"goals_scored_gf" real,
"goals_conceded_gc" real,
"dif" real,
"points_pts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the pe draw of team plaza amador, who has less than 6 pg won?`:
```sql
|
SELECT SUM("place_posici_n") FROM "anaprof_2008_relegation_table" WHERE "points_pts">49 AND "goals_scored_gf"<54; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the places of the team with more than 49 points and less than 54 goals scored?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "anaprof_2008_relegation_table" (
"place_posici_n" real,
"team_equipo" text,
"played_pj" real,
"won_pg" real,
"draw_pe" real,
"lost_pp" real,
"goals_scored_gf" real,
"goals_conceded_gc" real,
"dif" real,
"points_pts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the places of the team with more than 49 points and less than 54 goals scored?`:
```sql
|
SELECT "away" FROM "1_fc_nuremberg_versus_sp_vgg_greuther_f_" WHERE "home"='2-2'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE AWAY WITH HOME AT 2-2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1_fc_nuremberg_versus_sp_vgg_greuther_f_" (
"season" text,
"league" text,
"teams" text,
"home" text,
"away" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE AWAY WITH HOME AT 2-2?`:
```sql
|
SELECT "league" FROM "1_fc_nuremberg_versus_sp_vgg_greuther_f_" WHERE "home"='1-1'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE LEAGUE WITH HOME 1-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1_fc_nuremberg_versus_sp_vgg_greuther_f_" (
"season" text,
"league" text,
"teams" text,
"home" text,
"away" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE LEAGUE WITH HOME 1-1?`:
```sql
|
SELECT "weight" FROM "russia" WHERE "club"='uralochka zlatoust' AND "date_of_birth"='1981-02-24'; |
## Task
Generate a SQL query to answer the following question:
`What is the Weight of the person born 1981-02-24 from the Uralochka Zlatoust club ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "russia" (
"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 `What is the Weight of the person born 1981-02-24 from the Uralochka Zlatoust club ?`:
```sql
|
SELECT COUNT("number_of_households") FROM "michigan_counties_by_per_capita_income" WHERE "population">'25,692' AND "median_household_income"='$51,914'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of households with a population larger than 25,692 and a median household income of $51,914?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "michigan_counties_by_per_capita_income" (
"county" text,
"per_capita_income" text,
"median_household_income" text,
"median_family_income" text,
"population" real,
"number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of households with a population larger than 25,692 and a median household income of $51,914?`:
```sql
|
SELECT SUM("number_of_households") FROM "michigan_counties_by_per_capita_income" WHERE "median_household_income"='$44,718'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of households that makes a median household income of $44,718?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "michigan_counties_by_per_capita_income" (
"county" text,
"per_capita_income" text,
"median_household_income" text,
"median_family_income" text,
"population" real,
"number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of households that makes a median household income of $44,718?`:
```sql
|
SELECT MAX("population") FROM "michigan_counties_by_per_capita_income" WHERE "county"='baraga' AND "number_of_households"<'3,444'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest population for Baraga County with less than 3,444 households?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "michigan_counties_by_per_capita_income" (
"county" text,
"per_capita_income" text,
"median_household_income" text,
"median_family_income" text,
"population" real,
"number_of_households" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest population for Baraga County with less than 3,444 households?`:
```sql
|
SELECT "player" FROM "final_round" WHERE "score"='68-70-68-66=272'; |
## Task
Generate a SQL query to answer the following question:
`Which golfer had a score of 68-70-68-66=272?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money_s" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which golfer had a score of 68-70-68-66=272?`:
```sql
|
SELECT "place" FROM "final_round" WHERE "score"='67-67-66-68=268'; |
## Task
Generate a SQL query to answer the following question:
`What place was the golfer with a score of 67-67-66-68=268 ranked in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money_s" real
);
### SQL
Given the database schema, here is the SQL query that answers `What place was the golfer with a score of 67-67-66-68=268 ranked in?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.