output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT MAX("asian_american_population_2010") FROM "metropolitan_statistical_areas_of_the_un" WHERE "combined_statistical_area"='Kansas City-Overland Park-Kansas City, MO-KS CSA'; |
## Task
Generate a SQL query to answer the following question:
`Name the asian american population 2010 for kansas city-overland park-kansas city, mo-ks csa`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "metropolitan_statistical_areas_of_the_un" (
"rank" real,
"metropolitan_statistical_area" text,
"total_population_2010" real,
"indian_american_population_2010" real,
"pct_indian_american" text,
"asian_american_population_2010" real,
"pct_asian_american" text,
"combined_statistical_area" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the asian american population 2010 for kansas city-overland park-kansas city, mo-ks csa`:
```sql
|
SELECT "pct_indian_american" FROM "metropolitan_statistical_areas_of_the_un" WHERE "asian_american_population_2010"=126965; |
## Task
Generate a SQL query to answer the following question:
`Name the % indian american for asian population 126965`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "metropolitan_statistical_areas_of_the_un" (
"rank" real,
"metropolitan_statistical_area" text,
"total_population_2010" real,
"indian_american_population_2010" real,
"pct_indian_american" text,
"asian_american_population_2010" real,
"pct_asian_american" text,
"combined_statistical_area" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the % indian american for asian population 126965`:
```sql
|
SELECT "pct_asian_american" FROM "metropolitan_statistical_areas_of_the_un" WHERE "indian_american_population_2010"=23526; |
## Task
Generate a SQL query to answer the following question:
`Name the % asian american for 23526`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "metropolitan_statistical_areas_of_the_un" (
"rank" real,
"metropolitan_statistical_area" text,
"total_population_2010" real,
"indian_american_population_2010" real,
"pct_indian_american" text,
"asian_american_population_2010" real,
"pct_asian_american" text,
"combined_statistical_area" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the % asian american for 23526`:
```sql
|
SELECT COUNT("population_density_per_km") FROM "northern_villages" WHERE "name"='Buffalo Narrows'; |
## Task
Generate a SQL query to answer the following question:
`When buffalo narrows is the name how many measurements of population density per kilometer squared are there?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "northern_villages" (
"name" text,
"population_2011" real,
"population_2006" real,
"change_pct" text,
"land_area_km" text,
"population_density_per_km" text
);
### SQL
Given the database schema, here is the SQL query that answers `When buffalo narrows is the name how many measurements of population density per kilometer squared are there?`:
```sql
|
SELECT "land_area_km" FROM "northern_villages" WHERE "population_2011"=1233; |
## Task
Generate a SQL query to answer the following question:
`When 1233 is the population of 2011 what is the land area in kilometers squared?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "northern_villages" (
"name" text,
"population_2011" real,
"population_2006" real,
"change_pct" text,
"land_area_km" text,
"population_density_per_km" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 1233 is the population of 2011 what is the land area in kilometers squared?`:
```sql
|
SELECT MAX("population_2011") FROM "northern_villages" WHERE "land_area_km"='6.00'; |
## Task
Generate a SQL query to answer the following question:
`When 6.00 is the land area in kilometers squared what is the highest population of 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "northern_villages" (
"name" text,
"population_2011" real,
"population_2006" real,
"change_pct" text,
"land_area_km" text,
"population_density_per_km" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 6.00 is the land area in kilometers squared what is the highest population of 2011?`:
```sql
|
SELECT MIN("population_2011") FROM "northern_villages" WHERE "name"='Beauval'; |
## Task
Generate a SQL query to answer the following question:
`When beauval is the name what is the lowest population of 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "northern_villages" (
"name" text,
"population_2011" real,
"population_2006" real,
"change_pct" text,
"land_area_km" text,
"population_density_per_km" text
);
### SQL
Given the database schema, here is the SQL query that answers `When beauval is the name what is the lowest population of 2011?`:
```sql
|
SELECT COUNT("population_2011") FROM "northern_villages" WHERE "change_pct"='4.5'; |
## Task
Generate a SQL query to answer the following question:
`When 4.5 is the percentage of change how many population counts were made for 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "northern_villages" (
"name" text,
"population_2011" real,
"population_2006" real,
"change_pct" text,
"land_area_km" text,
"population_density_per_km" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 4.5 is the percentage of change how many population counts were made for 2011?`:
```sql
|
SELECT "name" FROM "northern_villages" WHERE "land_area_km"='14.85'; |
## Task
Generate a SQL query to answer the following question:
`When 14.85 kilometers squared is the land area what is the name?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "northern_villages" (
"name" text,
"population_2011" real,
"population_2006" real,
"change_pct" text,
"land_area_km" text,
"population_density_per_km" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 14.85 kilometers squared is the land area what is the name?`:
```sql
|
SELECT "state_and_district_of_columbia" FROM "prevalence_by_state" WHERE "overweight_incl_obese_adults"='60.0%'; |
## Task
Generate a SQL query to answer the following question:
`What is every state and District of Columbia with 60.0% overweight or obese adults?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "prevalence_by_state" (
"state_and_district_of_columbia" text,
"obese_adults" text,
"overweight_incl_obese_adults" text,
"obese_children_and_adolescents" text,
"obesity_rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is every state and District of Columbia with 60.0% overweight or obese adults?`:
```sql
|
SELECT "overweight_incl_obese_adults" FROM "prevalence_by_state" WHERE "obesity_rank"=21; |
## Task
Generate a SQL query to answer the following question:
`What are all percentages of overweight or obese adults for obesity rank of 21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "prevalence_by_state" (
"state_and_district_of_columbia" text,
"obese_adults" text,
"overweight_incl_obese_adults" text,
"obese_children_and_adolescents" text,
"obesity_rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are all percentages of overweight or obese adults for obesity rank of 21?`:
```sql
|
SELECT MIN("obesity_rank") FROM "prevalence_by_state" WHERE "state_and_district_of_columbia"='Utah'; |
## Task
Generate a SQL query to answer the following question:
`What is the least obesity rank for the state of Utah?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "prevalence_by_state" (
"state_and_district_of_columbia" text,
"obese_adults" text,
"overweight_incl_obese_adults" text,
"obese_children_and_adolescents" text,
"obesity_rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least obesity rank for the state of Utah?`:
```sql
|
SELECT COUNT("state_and_district_of_columbia") FROM "prevalence_by_state" WHERE "overweight_incl_obese_adults"='65.4%'; |
## Task
Generate a SQL query to answer the following question:
`How many states or District of Columbia have 65.4% overweight or obese adults?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "prevalence_by_state" (
"state_and_district_of_columbia" text,
"obese_adults" text,
"overweight_incl_obese_adults" text,
"obese_children_and_adolescents" text,
"obesity_rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many states or District of Columbia have 65.4% overweight or obese adults?`:
```sql
|
SELECT "overweight_incl_obese_adults" FROM "prevalence_by_state" WHERE "obese_children_and_adolescents"='12.4%'; |
## Task
Generate a SQL query to answer the following question:
`What is every percentage of overweight or obese adults when 12.4% of children and adolescents are obese?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "prevalence_by_state" (
"state_and_district_of_columbia" text,
"obese_adults" text,
"overweight_incl_obese_adults" text,
"obese_children_and_adolescents" text,
"obesity_rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is every percentage of overweight or obese adults when 12.4% of children and adolescents are obese?`:
```sql
|
SELECT "director_s" FROM "table1_18994724_1" WHERE "film_title_used_in_nomination"='Gomorra'; |
## Task
Generate a SQL query to answer the following question:
`Who directed the film Gomorra?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18994724_1" (
"submitting_country" text,
"film_title_used_in_nomination" text,
"original_title" text,
"language_s" text,
"director_s" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed the film Gomorra?`:
```sql
|
SELECT "language_s" FROM "table1_18994724_1" WHERE "film_title_used_in_nomination"='Everlasting Moments'; |
## Task
Generate a SQL query to answer the following question:
`What language was spoken in Everlasting Moments?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18994724_1" (
"submitting_country" text,
"film_title_used_in_nomination" text,
"original_title" text,
"language_s" text,
"director_s" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What language was spoken in Everlasting Moments?`:
```sql
|
SELECT "original_title" FROM "table1_18994724_1" WHERE "submitting_country"='Greece'; |
## Task
Generate a SQL query to answer the following question:
`What is the original title of the film submitted by Greece?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18994724_1" (
"submitting_country" text,
"film_title_used_in_nomination" text,
"original_title" text,
"language_s" text,
"director_s" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the original title of the film submitted by Greece?`:
```sql
|
SELECT "director_s" FROM "table1_18994724_1" WHERE "film_title_used_in_nomination"='Nuits d''Arabie'; |
## Task
Generate a SQL query to answer the following question:
`Who directed the film Nuits d'arabie?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18994724_1" (
"submitting_country" text,
"film_title_used_in_nomination" text,
"original_title" text,
"language_s" text,
"director_s" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed the film Nuits d'arabie?`:
```sql
|
SELECT "population_2006" FROM "mother_tongue_language_2006_and_2011" WHERE "mother_tongue"='Romanian'; |
## Task
Generate a SQL query to answer the following question:
`What is every value for population (2006) with a Romanian mother tongue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mother_tongue_language_2006_and_2011" (
"mother_tongue" text,
"population_2006" real,
"percentage_2006" text,
"population_2011" real,
"percentage_2011" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is every value for population (2006) with a Romanian mother tongue?`:
```sql
|
SELECT MIN("population_2011") FROM "mother_tongue_language_2006_and_2011"; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest population(2011)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mother_tongue_language_2006_and_2011" (
"mother_tongue" text,
"population_2006" real,
"percentage_2006" text,
"population_2011" real,
"percentage_2011" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest population(2011)?`:
```sql
|
SELECT MIN("population_2006") FROM "mother_tongue_language_2006_and_2011" WHERE "percentage_2011"='1.06%'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest population(2006) when there is a 1.06% in 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mother_tongue_language_2006_and_2011" (
"mother_tongue" text,
"population_2006" real,
"percentage_2006" text,
"population_2011" real,
"percentage_2011" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest population(2006) when there is a 1.06% in 2011?`:
```sql
|
SELECT COUNT("population_2011") FROM "mother_tongue_language_2006_and_2011" WHERE "percentage_2006"='1.40%'; |
## Task
Generate a SQL query to answer the following question:
`How many values for population(2011) correspond to a 1.40% in 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mother_tongue_language_2006_and_2011" (
"mother_tongue" text,
"population_2006" real,
"percentage_2006" text,
"population_2011" real,
"percentage_2011" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many values for population(2011) correspond to a 1.40% in 2006?`:
```sql
|
SELECT "percentage_2006" FROM "mother_tongue_language_2006_and_2011" WHERE "mother_tongue"='Polish'; |
## Task
Generate a SQL query to answer the following question:
`What is every value for percentage(2006) with a Polish mother tongue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mother_tongue_language_2006_and_2011" (
"mother_tongue" text,
"population_2006" real,
"percentage_2006" text,
"population_2011" real,
"percentage_2011" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is every value for percentage(2006) with a Polish mother tongue?`:
```sql
|
SELECT "club" FROM "alumni" WHERE "goals"=48; |
## Task
Generate a SQL query to answer the following question:
`Which team/s have 48 goals total?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "alumni" (
"name" text,
"nationality" text,
"position" text,
"year_of_birth" real,
"career" text,
"appearances" real,
"goals" real,
"club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team/s have 48 goals total?`:
```sql
|
SELECT "player" FROM "cast" WHERE "original_season"='RW: Key West' AND "eliminated"='Episode 8'; |
## Task
Generate a SQL query to answer the following question:
`Who was the contestant eliminated on episode 8 of RW: Key West season?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cast" (
"player" text,
"original_season" text,
"gender" text,
"eliminated" text,
"placing" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the contestant eliminated on episode 8 of RW: Key West season?`:
```sql
|
SELECT "player" FROM "cast" WHERE "original_season"='Fresh Meat' AND "gender"='Female'; |
## Task
Generate a SQL query to answer the following question:
`Who was the female contestant on the Original season of Fresh Meat?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cast" (
"player" text,
"original_season" text,
"gender" text,
"eliminated" text,
"placing" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the female contestant on the Original season of Fresh Meat?`:
```sql
|
SELECT "gender" FROM "cast" WHERE "original_season"='RR: South Pacific'; |
## Task
Generate a SQL query to answer the following question:
`What was the gender of the contestant on RR: South Pacific season?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cast" (
"player" text,
"original_season" text,
"gender" text,
"eliminated" text,
"placing" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the gender of the contestant on RR: South Pacific season?`:
```sql
|
SELECT "original_season" FROM "cast" WHERE "player"='Evelyn Smith'; |
## Task
Generate a SQL query to answer the following question:
`What was the season where Evelyn Smith was on?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cast" (
"player" text,
"original_season" text,
"gender" text,
"eliminated" text,
"placing" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the season where Evelyn Smith was on?`:
```sql
|
SELECT COUNT("original_australian_performer") FROM "characters_casts_and_recordings" WHERE "original_west_end_performer"='Jordan Dunne'; |
## Task
Generate a SQL query to answer the following question:
`How many original Australian performers are there when the Original West End Performer is Jordan Dunne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "characters_casts_and_recordings" (
"character" text,
"original_broadway_performer" text,
"original_australian_performer" text,
"original_west_end_performer" text,
"2005_world_aids_day_benefit_dream_cast" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many original Australian performers are there when the Original West End Performer is Jordan Dunne?`:
```sql
|
SELECT "original_west_end_performer" FROM "characters_casts_and_recordings" WHERE "character"='Martha'; |
## Task
Generate a SQL query to answer the following question:
`Who is the Original west end performer for the character Martha?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "characters_casts_and_recordings" (
"character" text,
"original_broadway_performer" text,
"original_australian_performer" text,
"original_west_end_performer" text,
"2005_world_aids_day_benefit_dream_cast" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the Original west end performer for the character Martha?`:
```sql
|
SELECT "original_broadway_performer" FROM "characters_casts_and_recordings" WHERE "character"='Colin Craven'; |
## Task
Generate a SQL query to answer the following question:
`Who is the original broadway performer for the character Colin Craven?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "characters_casts_and_recordings" (
"character" text,
"original_broadway_performer" text,
"original_australian_performer" text,
"original_west_end_performer" text,
"2005_world_aids_day_benefit_dream_cast" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the original broadway performer for the character Colin Craven?`:
```sql
|
SELECT "original_west_end_performer" FROM "characters_casts_and_recordings" WHERE "character"='Neville Craven'; |
## Task
Generate a SQL query to answer the following question:
`Who is the original west end performer for the character Neville Craven?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "characters_casts_and_recordings" (
"character" text,
"original_broadway_performer" text,
"original_australian_performer" text,
"original_west_end_performer" text,
"2005_world_aids_day_benefit_dream_cast" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the original west end performer for the character Neville Craven?`:
```sql
|
SELECT "2005_world_aids_day_benefit_dream_cast" FROM "characters_casts_and_recordings" WHERE "original_australian_performer"='Susan-Ann Walker'; |
## Task
Generate a SQL query to answer the following question:
`Who is the 2005 World AIDS Day Benefit "Dream" Cast when the Original Australian performer is Susan-Ann Walker?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "characters_casts_and_recordings" (
"character" text,
"original_broadway_performer" text,
"original_australian_performer" text,
"original_west_end_performer" text,
"2005_world_aids_day_benefit_dream_cast" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the 2005 World AIDS Day Benefit "Dream" Cast when the Original Australian performer is Susan-Ann Walker?`:
```sql
|
SELECT "original_australian_performer" FROM "characters_casts_and_recordings" WHERE "original_west_end_performer"='Linzi Hateley'; |
## Task
Generate a SQL query to answer the following question:
`Who is the Original Australian performer when the Original West End Performer is Linzi Hateley?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "characters_casts_and_recordings" (
"character" text,
"original_broadway_performer" text,
"original_australian_performer" text,
"original_west_end_performer" text,
"2005_world_aids_day_benefit_dream_cast" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the Original Australian performer when the Original West End Performer is Linzi Hateley?`:
```sql
|
SELECT MIN("wins") FROM "by_name"; |
## Task
Generate a SQL query to answer the following question:
`Name the minimum wins`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_name" (
"name" text,
"country" text,
"seasons" text,
"championship_titles" text,
"race_entries_starts" text,
"poles" real,
"wins" real,
"podiums" real,
"fastest_laps" real,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the minimum wins`:
```sql
|
SELECT "country" FROM "by_name" WHERE "name"='Hideki Noda Category:Articles with hCards'; |
## Task
Generate a SQL query to answer the following question:
`Name the country for hideki noda category:articles with hcards`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_name" (
"name" text,
"country" text,
"seasons" text,
"championship_titles" text,
"race_entries_starts" text,
"poles" real,
"wins" real,
"podiums" real,
"fastest_laps" real,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the country for hideki noda category:articles with hcards`:
```sql
|
SELECT COUNT("poles") FROM "by_name" WHERE "name"='Stefano Livio Category:Articles with hCards'; |
## Task
Generate a SQL query to answer the following question:
`Name the number of poles for stefano livio category:articles with hcards`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_name" (
"name" text,
"country" text,
"seasons" text,
"championship_titles" text,
"race_entries_starts" text,
"poles" real,
"wins" real,
"podiums" real,
"fastest_laps" real,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the number of poles for stefano livio category:articles with hcards`:
```sql
|
SELECT "points" FROM "by_name" WHERE "name"='Thierry Tassin Category:Articles with hCards'; |
## Task
Generate a SQL query to answer the following question:
`Name the points for thierry tassin category:articles with hcards`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_name" (
"name" text,
"country" text,
"seasons" text,
"championship_titles" text,
"race_entries_starts" text,
"poles" real,
"wins" real,
"podiums" real,
"fastest_laps" real,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the points for thierry tassin category:articles with hcards`:
```sql
|
SELECT COUNT("wins") FROM "by_name" WHERE "name"='Michele Rugolo Category:Articles with hCards'; |
## Task
Generate a SQL query to answer the following question:
`Name the number of wins for michele rugolo category:articles with hcards`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_name" (
"name" text,
"country" text,
"seasons" text,
"championship_titles" text,
"race_entries_starts" text,
"poles" real,
"wins" real,
"podiums" real,
"fastest_laps" real,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the number of wins for michele rugolo category:articles with hcards`:
```sql
|
SELECT "l_g" FROM "squad_stats" WHERE "player"='Ermengol'; |
## Task
Generate a SQL query to answer the following question:
`Name the lg for ermengol`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_stats" (
"player" text,
"nat" text,
"pos" text,
"l_apps" real,
"l_g" real,
"c_apps" real,
"total_apps" real,
"total_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the lg for ermengol`:
```sql
|
SELECT "nat" FROM "squad_stats" WHERE "total_apps"=27; |
## Task
Generate a SQL query to answer the following question:
`Name the nat for total apps for 27`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_stats" (
"player" text,
"nat" text,
"pos" text,
"l_apps" real,
"l_g" real,
"c_apps" real,
"total_apps" real,
"total_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the nat for total apps for 27`:
```sql
|
SELECT COUNT("l_apps") FROM "squad_stats" WHERE "total_g"=8; |
## Task
Generate a SQL query to answer the following question:
`Name the number of apps for total g is 8`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_stats" (
"player" text,
"nat" text,
"pos" text,
"l_apps" real,
"l_g" real,
"c_apps" real,
"total_apps" real,
"total_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the number of apps for total g is 8`:
```sql
|
SELECT "player" FROM "squad_stats" WHERE "l_apps"=27; |
## Task
Generate a SQL query to answer the following question:
`Name the player for l apps is 27`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_stats" (
"player" text,
"nat" text,
"pos" text,
"l_apps" real,
"l_g" real,
"c_apps" real,
"total_apps" real,
"total_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the player for l apps is 27`:
```sql
|
SELECT "country" FROM "demand" WHERE "entities"='EBISA'; |
## Task
Generate a SQL query to answer the following question:
`What are all the countries where the electric company Ebisa has a presence?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demand" (
"entities" text,
"country" text,
"supply_point" text,
"voltage_k_v" real,
"power_mw" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are all the countries where the electric company Ebisa has a presence?`:
```sql
|
SELECT COUNT("country") FROM "demand" WHERE "supply_point"='Itaipu'; |
## Task
Generate a SQL query to answer the following question:
`In how many countries is Itaipu a supply point for electricity?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demand" (
"entities" text,
"country" text,
"supply_point" text,
"voltage_k_v" real,
"power_mw" real
);
### SQL
Given the database schema, here is the SQL query that answers `In how many countries is Itaipu a supply point for electricity?`:
```sql
|
SELECT "entities" FROM "demand" WHERE "supply_point"='Itaipu'; |
## Task
Generate a SQL query to answer the following question:
`What are the electric companies drawing power from Itaipu?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demand" (
"entities" text,
"country" text,
"supply_point" text,
"voltage_k_v" real,
"power_mw" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are the electric companies drawing power from Itaipu?`:
```sql
|
SELECT "asia" FROM "un_2012_estimates_and_medium_variant_pro" WHERE "latin_america_caribbean"='783 (7.5%)'; |
## Task
Generate a SQL query to answer the following question:
`what will the population of Asia be when Latin America/Caribbean is 783 (7.5%)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "un_2012_estimates_and_medium_variant_pro" (
"year" real,
"world" real,
"asia" text,
"africa" text,
"europe" text,
"latin_america_caribbean" text,
"northern_america" text,
"oceania" text
);
### SQL
Given the database schema, here is the SQL query that answers `what will the population of Asia be when Latin America/Caribbean is 783 (7.5%)?`:
```sql
|
SELECT "europe" FROM "un_2012_estimates_and_medium_variant_pro" WHERE "northern_america"='482 (4.7%)'; |
## Task
Generate a SQL query to answer the following question:
`what will be the population of Europe when Northern America is 482 (4.7%)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "un_2012_estimates_and_medium_variant_pro" (
"year" real,
"world" real,
"asia" text,
"africa" text,
"europe" text,
"latin_america_caribbean" text,
"northern_america" text,
"oceania" text
);
### SQL
Given the database schema, here is the SQL query that answers `what will be the population of Europe when Northern America is 482 (4.7%)?`:
```sql
|
SELECT COUNT("latin_america_caribbean") FROM "un_2012_estimates_and_medium_variant_pro" WHERE "asia"='4,894 (46.1%)'; |
## Task
Generate a SQL query to answer the following question:
`what row is the population of Latin America/Caribbean when Asia is 4,894 (46.1%)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "un_2012_estimates_and_medium_variant_pro" (
"year" real,
"world" real,
"asia" text,
"africa" text,
"europe" text,
"latin_america_caribbean" text,
"northern_america" text,
"oceania" text
);
### SQL
Given the database schema, here is the SQL query that answers `what row is the population of Latin America/Caribbean when Asia is 4,894 (46.1%)?`:
```sql
|
SELECT "africa" FROM "un_2012_estimates_and_medium_variant_pro" WHERE "oceania"='67 (0.6%)'; |
## Task
Generate a SQL query to answer the following question:
`what will be the population of Africa when Oceania is 67 (0.6%)`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "un_2012_estimates_and_medium_variant_pro" (
"year" real,
"world" real,
"asia" text,
"africa" text,
"europe" text,
"latin_america_caribbean" text,
"northern_america" text,
"oceania" text
);
### SQL
Given the database schema, here is the SQL query that answers `what will be the population of Africa when Oceania is 67 (0.6%)`:
```sql
|
SELECT MIN("world") FROM "un_2012_estimates_and_medium_variant_pro" WHERE "latin_america_caribbean"='788 (8.1%)'; |
## Task
Generate a SQL query to answer the following question:
`What is population in the world when 788 (8.1%)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "un_2012_estimates_and_medium_variant_pro" (
"year" real,
"world" real,
"asia" text,
"africa" text,
"europe" text,
"latin_america_caribbean" text,
"northern_america" text,
"oceania" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is population in the world when 788 (8.1%)?`:
```sql
|
SELECT MIN("world") FROM "un_2012_estimates_and_medium_variant_pro"; |
## Task
Generate a SQL query to answer the following question:
`what is the worlds smallest population?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "un_2012_estimates_and_medium_variant_pro" (
"year" real,
"world" real,
"asia" text,
"africa" text,
"europe" text,
"latin_america_caribbean" text,
"northern_america" text,
"oceania" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the worlds smallest population?`:
```sql
|
SELECT MIN("year") FROM "grand_slam_singles_finals"; |
## Task
Generate a SQL query to answer the following question:
`What is the first year in the competition?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_slam_singles_finals" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"opponent_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the first year in the competition?`:
```sql
|
SELECT "outcome" FROM "grand_slam_singles_finals" WHERE "opponent_in_the_final"='Jennifer Capriati'; |
## Task
Generate a SQL query to answer the following question:
`What is the result in the final versos Jennifer Capriati?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_slam_singles_finals" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"opponent_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result in the final versos Jennifer Capriati?`:
```sql
|
SELECT MIN("year") FROM "grand_slam_singles_finals"; |
## Task
Generate a SQL query to answer the following question:
`What is the first year that she competed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_slam_singles_finals" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"opponent_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the first year that she competed?`:
```sql
|
SELECT "championship" FROM "grand_slam_singles_finals" WHERE "score_in_the_final"='4–6, 7–5, 6–2'; |
## Task
Generate a SQL query to answer the following question:
`What tournament did she win with a final score of 4–6, 7–5, 6–2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_slam_singles_finals" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"opponent_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What tournament did she win with a final score of 4–6, 7–5, 6–2?`:
```sql
|
SELECT COUNT("duration") FROM "teen_edition_housemates" WHERE "name"='Joj Agpangan*'; |
## Task
Generate a SQL query to answer the following question:
`When joj agpangan* is the name how many duration's are there?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teen_edition_housemates" (
"name" text,
"home_or_representative_town_or_province" text,
"age" real,
"edition" text,
"total_days_in_pbb_house" real,
"duration" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `When joj agpangan* is the name how many duration's are there?`:
```sql
|
SELECT COUNT("age") FROM "teen_edition_housemates" WHERE "edition"='Clash 2010' AND "home_or_representative_town_or_province"='Davao City'; |
## Task
Generate a SQL query to answer the following question:
`When davao city is the home or representative town or province and clash 2010 is the edition how many ages are there?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teen_edition_housemates" (
"name" text,
"home_or_representative_town_or_province" text,
"age" real,
"edition" text,
"total_days_in_pbb_house" real,
"duration" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `When davao city is the home or representative town or province and clash 2010 is the edition how many ages are there?`:
```sql
|
SELECT "edition" FROM "teen_edition_housemates" WHERE "total_days_in_pbb_house"=77 AND "status"='Winner'; |
## Task
Generate a SQL query to answer the following question:
`When winner is the status and 77 is the total days in pbb house what is the edition?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teen_edition_housemates" (
"name" text,
"home_or_representative_town_or_province" text,
"age" real,
"edition" text,
"total_days_in_pbb_house" real,
"duration" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `When winner is the status and 77 is the total days in pbb house what is the edition?`:
```sql
|
SELECT COUNT("name") FROM "teen_edition_housemates" WHERE "duration"='Days 1-86'; |
## Task
Generate a SQL query to answer the following question:
`When days 1-86 is the duration how many names are there?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teen_edition_housemates" (
"name" text,
"home_or_representative_town_or_province" text,
"age" real,
"edition" text,
"total_days_in_pbb_house" real,
"duration" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `When days 1-86 is the duration how many names are there?`:
```sql
|
SELECT "duration" FROM "teen_edition_housemates" WHERE "name"='Joaqui Mendoza'; |
## Task
Generate a SQL query to answer the following question:
`WHen joaqui mendoza is the name how long is the duration?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teen_edition_housemates" (
"name" text,
"home_or_representative_town_or_province" text,
"age" real,
"edition" text,
"total_days_in_pbb_house" real,
"duration" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHen joaqui mendoza is the name how long is the duration?`:
```sql
|
SELECT COUNT("name") FROM "teen_edition_housemates" WHERE "home_or_representative_town_or_province"='Guiguinto, Bulacan'; |
## Task
Generate a SQL query to answer the following question:
`When guiguinto, bulacan is the home or representative town or province how many names are there?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teen_edition_housemates" (
"name" text,
"home_or_representative_town_or_province" text,
"age" real,
"edition" text,
"total_days_in_pbb_house" real,
"duration" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `When guiguinto, bulacan is the home or representative town or province how many names are there?`:
```sql
|
SELECT "written_by" FROM "table1_19068566_1" WHERE "production_code"='3T7458'; |
## Task
Generate a SQL query to answer the following question:
`When 3t7458 is the production code who are the writers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_19068566_1" (
"no" real,
"num" real,
"title" text,
"directed_by" text,
"written_by" text,
"u_s_air_date" text,
"production_code" text,
"u_s_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 3t7458 is the production code who are the writers?`:
```sql
|
SELECT "production_code" FROM "table1_19068566_1" WHERE "u_s_viewers_million"='3.39'; |
## Task
Generate a SQL query to answer the following question:
`When there are 3.39 million u.s viewers what is the production code?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_19068566_1" (
"no" real,
"num" real,
"title" text,
"directed_by" text,
"written_by" text,
"u_s_air_date" text,
"production_code" text,
"u_s_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `When there are 3.39 million u.s viewers what is the production code?`:
```sql
|
SELECT "directed_by" FROM "table1_19068566_1" WHERE "production_code"='3T7461'; |
## Task
Generate a SQL query to answer the following question:
`When 3t7461 is the production code who is the director?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_19068566_1" (
"no" real,
"num" real,
"title" text,
"directed_by" text,
"written_by" text,
"u_s_air_date" text,
"production_code" text,
"u_s_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 3t7461 is the production code who is the director?`:
```sql
|
SELECT "score" FROM "day_1_evening_session" WHERE "match_no"=4; |
## Task
Generate a SQL query to answer the following question:
`What was the score at the end of the match number 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "day_1_evening_session" (
"match_no" real,
"match_type" text,
"team_europe" text,
"score" text,
"team_usa" text,
"progressive_total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score at the end of the match number 4?`:
```sql
|
SELECT MIN("match_no") FROM "day_1_evening_session" WHERE "team_usa"='Bill Hoffman'; |
## Task
Generate a SQL query to answer the following question:
`What's the match number where Bill Hoffman plays for Team USA?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "day_1_evening_session" (
"match_no" real,
"match_type" text,
"team_europe" text,
"score" text,
"team_usa" text,
"progressive_total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the match number where Bill Hoffman plays for Team USA?`:
```sql
|
SELECT COUNT("score") FROM "day_1_evening_session" WHERE "team_europe"='Mika Koivuniemi'; |
## Task
Generate a SQL query to answer the following question:
`How many different scores did Team Europe get when Mika Koivuniemi played for them?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "day_1_evening_session" (
"match_no" real,
"match_type" text,
"team_europe" text,
"score" text,
"team_usa" text,
"progressive_total" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many different scores did Team Europe get when Mika Koivuniemi played for them?`:
```sql
|
SELECT "score" FROM "day_1_evening_session" WHERE "team_europe"='Tore Torgersen'; |
## Task
Generate a SQL query to answer the following question:
`What was the score when Tore Torgersen played for Team Europe?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "day_1_evening_session" (
"match_no" real,
"match_type" text,
"team_europe" text,
"score" text,
"team_usa" text,
"progressive_total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score when Tore Torgersen played for Team Europe?`:
```sql
|
SELECT "launch_date" FROM "see_also" WHERE "duration_days"='174.14'; |
## Task
Generate a SQL query to answer the following question:
`Name the launch date for duration days 174.14`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"expedition" text,
"crew" text,
"launch_date" text,
"flight_up" text,
"landing_date" text,
"flight_down" text,
"duration_days" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the launch date for duration days 174.14`:
```sql
|
SELECT "1st_place" FROM "results" WHERE "2nd_place"='Pennsylvania'; |
## Task
Generate a SQL query to answer the following question:
`What is the 1st place when Pennsylvania finished 2nd place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"year" real,
"host" text,
"1st_place" text,
"2nd_place" text,
"3rd_place" text,
"4th_place" text,
"5th_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 1st place when Pennsylvania finished 2nd place?`:
```sql
|
SELECT "2nd_place" FROM "results" WHERE "1st_place"='Virginia'; |
## Task
Generate a SQL query to answer the following question:
`What is the 2nd place when Virginia finished in 1st place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"year" real,
"host" text,
"1st_place" text,
"2nd_place" text,
"3rd_place" text,
"4th_place" text,
"5th_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 2nd place when Virginia finished in 1st place?`:
```sql
|
SELECT COUNT("year") FROM "results" WHERE "4th_place"='Florida'; |
## Task
Generate a SQL query to answer the following question:
`How many years did Florida finish in 4th place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"year" real,
"host" text,
"1st_place" text,
"2nd_place" text,
"3rd_place" text,
"4th_place" text,
"5th_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years did Florida finish in 4th place?`:
```sql
|
SELECT COUNT("3rd_place") FROM "results" WHERE "host"='University of Manitoba, Winnipeg, Manitoba'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of 3rd placed teams when the host is University of Manitoba, Winnipeg, Manitoba?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"year" real,
"host" text,
"1st_place" text,
"2nd_place" text,
"3rd_place" text,
"4th_place" text,
"5th_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of 3rd placed teams when the host is University of Manitoba, Winnipeg, Manitoba?`:
```sql
|
SELECT "4th_place" FROM "results" WHERE "3rd_place"='Missouri'; |
## Task
Generate a SQL query to answer the following question:
`Who was in 4th place when Missouri finished in 3rd place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"year" real,
"host" text,
"1st_place" text,
"2nd_place" text,
"3rd_place" text,
"4th_place" text,
"5th_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was in 4th place when Missouri finished in 3rd place?`:
```sql
|
SELECT "progressive_total" FROM "day_2_evening_session" WHERE "team_usa"='Tim Mack'; |
## Task
Generate a SQL query to answer the following question:
`When tim mack is on team usa what is the progressive total?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "day_2_evening_session" (
"match_no" real,
"match_type" text,
"team_europe" text,
"score" text,
"team_usa" text,
"progressive_total" text
);
### SQL
Given the database schema, here is the SQL query that answers `When tim mack is on team usa what is the progressive total?`:
```sql
|
SELECT COUNT("team_usa") FROM "day_2_evening_session" WHERE "match_no"=14; |
## Task
Generate a SQL query to answer the following question:
`When 14 is the match number how many usa teams are there?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "day_2_evening_session" (
"match_no" real,
"match_type" text,
"team_europe" text,
"score" text,
"team_usa" text,
"progressive_total" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 14 is the match number how many usa teams are there?`:
```sql
|
SELECT COUNT("team_europe") FROM "day_2_evening_session" WHERE "team_usa"='Chris Barnes'; |
## Task
Generate a SQL query to answer the following question:
`When chris barnes is on team usa how many europe teams are there?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "day_2_evening_session" (
"match_no" real,
"match_type" text,
"team_europe" text,
"score" text,
"team_usa" text,
"progressive_total" text
);
### SQL
Given the database schema, here is the SQL query that answers `When chris barnes is on team usa how many europe teams are there?`:
```sql
|
SELECT "league" FROM "year_by_year" WHERE "year"='1998/99'; |
## Task
Generate a SQL query to answer the following question:
`in the year 1998/99 what was the league`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year" (
"year" text,
"league" text,
"reg_season" text,
"playoffs" text,
"owner_s" text,
"avg_attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `in the year 1998/99 what was the league`:
```sql
|
SELECT "reg_season" FROM "year_by_year" WHERE "year"='1995/96'; |
## Task
Generate a SQL query to answer the following question:
`in the year 1995/96 what was the reg. season`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year" (
"year" text,
"league" text,
"reg_season" text,
"playoffs" text,
"owner_s" text,
"avg_attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `in the year 1995/96 what was the reg. season`:
```sql
|
SELECT "league" FROM "year_by_year" WHERE "playoffs"='Semifinals'; |
## Task
Generate a SQL query to answer the following question:
`in what playoffs the league was in the semifinals`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year" (
"year" text,
"league" text,
"reg_season" text,
"playoffs" text,
"owner_s" text,
"avg_attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `in what playoffs the league was in the semifinals`:
```sql
|
SELECT "year" FROM "year_by_year" WHERE "playoffs"='Champions'; |
## Task
Generate a SQL query to answer the following question:
`what was the year where in the playoffs was champions`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year" (
"year" text,
"league" text,
"reg_season" text,
"playoffs" text,
"owner_s" text,
"avg_attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `what was the year where in the playoffs was champions`:
```sql
|
SELECT "playoffs" FROM "year_by_year" WHERE "avg_attendance"=3416; |
## Task
Generate a SQL query to answer the following question:
`what where the playoffs where the avg attendance of the team was 3416`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year" (
"year" text,
"league" text,
"reg_season" text,
"playoffs" text,
"owner_s" text,
"avg_attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `what where the playoffs where the avg attendance of the team was 3416`:
```sql
|
SELECT "last_top_division_title" FROM "2013_14_season" WHERE "club"='Citizen'; |
## Task
Generate a SQL query to answer the following question:
`when did the club Citizen achieve its last top division title?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2013_14_season" (
"club" text,
"position_in_2012_13" text,
"first_season_in_top_division" text,
"number_of_seasons_in_top_division" real,
"first_season_of_current_spell_in_top_division" text,
"top_division_titles" real,
"last_top_division_title" text
);
### SQL
Given the database schema, here is the SQL query that answers `when did the club Citizen achieve its last top division title?`:
```sql
|
SELECT COUNT("top_division_titles") FROM "2013_14_season" WHERE "position_in_2012_13"='5th'; |
## Task
Generate a SQL query to answer the following question:
`How many clubs achieved the 5th position in 2012-13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2013_14_season" (
"club" text,
"position_in_2012_13" text,
"first_season_in_top_division" text,
"number_of_seasons_in_top_division" real,
"first_season_of_current_spell_in_top_division" text,
"top_division_titles" real,
"last_top_division_title" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many clubs achieved the 5th position in 2012-13?`:
```sql
|
SELECT "music_by" FROM "table1_191105_3" WHERE "episode_title"='Interplanet Janet'; |
## Task
Generate a SQL query to answer the following question:
`When interplanet janet is the episode title who is the music by?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_191105_3" (
"episode_title" text,
"subject" text,
"music_by" text,
"performed_by" text,
"first_aired" real
);
### SQL
Given the database schema, here is the SQL query that answers `When interplanet janet is the episode title who is the music by?`:
```sql
|
SELECT "subject" FROM "table1_191105_3" WHERE "performed_by"='Jaime Aff and Christine Langner'; |
## Task
Generate a SQL query to answer the following question:
`WHen jaime aff and christine langner are the performers what is the subject?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_191105_3" (
"episode_title" text,
"subject" text,
"music_by" text,
"performed_by" text,
"first_aired" real
);
### SQL
Given the database schema, here is the SQL query that answers `WHen jaime aff and christine langner are the performers what is the subject?`:
```sql
|
SELECT "first_aired" FROM "table1_191105_3" WHERE "subject"='Skeletal system'; |
## Task
Generate a SQL query to answer the following question:
`If skeletal system is the subject when was it first aired?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_191105_3" (
"episode_title" text,
"subject" text,
"music_by" text,
"performed_by" text,
"first_aired" real
);
### SQL
Given the database schema, here is the SQL query that answers `If skeletal system is the subject when was it first aired?`:
```sql
|
SELECT MIN("first_aired") FROM "table1_191105_3" WHERE "performed_by"='Zachary Sanders'; |
## Task
Generate a SQL query to answer the following question:
`When zachary sanders is the performer what is the lowerst first aired?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_191105_3" (
"episode_title" text,
"subject" text,
"music_by" text,
"performed_by" text,
"first_aired" real
);
### SQL
Given the database schema, here is the SQL query that answers `When zachary sanders is the performer what is the lowerst first aired?`:
```sql
|
SELECT "winnings" FROM "nascar_nationwide_series" WHERE "wins"=2; |
## Task
Generate a SQL query to answer the following question:
`What's the amount of winnings (in $) in the year with 2 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_nationwide_series" (
"year" real,
"starts" real,
"wins" real,
"top_5" real,
"top_10" real,
"poles" real,
"avg_start" text,
"avg_finish" text,
"winnings" text,
"position" text,
"team_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the amount of winnings (in $) in the year with 2 wins?`:
```sql
|
SELECT MIN("starts") FROM "nascar_nationwide_series" WHERE "avg_finish"='19.3'; |
## Task
Generate a SQL query to answer the following question:
`What's the number of starts in the year with 19.3 average finish?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_nationwide_series" (
"year" real,
"starts" real,
"wins" real,
"top_5" real,
"top_10" real,
"poles" real,
"avg_start" text,
"avg_finish" text,
"winnings" text,
"position" text,
"team_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the number of starts in the year with 19.3 average finish?`:
```sql
|
SELECT "year" FROM "nascar_nationwide_series" WHERE "team_s"='#14 FitzBradshaw Racing'; |
## Task
Generate a SQL query to answer the following question:
`In what year did the #14 FitzBradshaw Racing compete?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_nationwide_series" (
"year" real,
"starts" real,
"wins" real,
"top_5" real,
"top_10" real,
"poles" real,
"avg_start" text,
"avg_finish" text,
"winnings" text,
"position" text,
"team_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what year did the #14 FitzBradshaw Racing compete?`:
```sql
|
SELECT "avg_finish" FROM "nascar_nationwide_series" WHERE "year"=2008; |
## Task
Generate a SQL query to answer the following question:
`What's the average finish in 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_nationwide_series" (
"year" real,
"starts" real,
"wins" real,
"top_5" real,
"top_10" real,
"poles" real,
"avg_start" text,
"avg_finish" text,
"winnings" text,
"position" text,
"team_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the average finish in 2008?`:
```sql
|
SELECT MAX("top_5") FROM "nascar_nationwide_series" WHERE "team_s"='#14 FitzBradshaw Racing'; |
## Task
Generate a SQL query to answer the following question:
`What's #14 FitzBradshaw Racing's top 5 result?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_nationwide_series" (
"year" real,
"starts" real,
"wins" real,
"top_5" real,
"top_10" real,
"poles" real,
"avg_start" text,
"avg_finish" text,
"winnings" text,
"position" text,
"team_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's #14 FitzBradshaw Racing's top 5 result?`:
```sql
|
SELECT "first_aired" FROM "america_rock" WHERE "performed_by"='Sue Manchester'; |
## Task
Generate a SQL query to answer the following question:
`What is the date for the episode performed by Sue Manchester?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "america_rock" (
"episode_title" text,
"subject" text,
"music_by" text,
"lyrics_by" text,
"performed_by" text,
"first_aired" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date for the episode performed by Sue Manchester?`:
```sql
|
SELECT "music_by" FROM "america_rock" WHERE "episode_title"='Elbow Room'; |
## Task
Generate a SQL query to answer the following question:
`Who is the music by for episode the Elbow Room?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "america_rock" (
"episode_title" text,
"subject" text,
"music_by" text,
"lyrics_by" text,
"performed_by" text,
"first_aired" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the music by for episode the Elbow Room?`:
```sql
|
SELECT "episode_title" FROM "america_rock" WHERE "performed_by"='Essra Mohawk'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the episode performed by Essra Mohawk`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "america_rock" (
"episode_title" text,
"subject" text,
"music_by" text,
"lyrics_by" text,
"performed_by" text,
"first_aired" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the episode performed by Essra Mohawk`:
```sql
|
SELECT "date_s_of_original_removal" FROM "returning_this_year_after_a_break_of_one" WHERE "new_channel_s"='Five'; |
## Task
Generate a SQL query to answer the following question:
`When five is the new channel what is the date of original removal?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "returning_this_year_after_a_break_of_one" (
"programme" text,
"date_s_of_original_removal" text,
"original_channel" text,
"date_of_return" text,
"new_channel_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `When five is the new channel what is the date of original removal?`:
```sql
|
SELECT "date_s_of_original_removal" FROM "returning_this_year_after_a_break_of_one" WHERE "original_channel"='BBC Two'; |
## Task
Generate a SQL query to answer the following question:
`When bbc two is the original channel what is the date of original removal?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "returning_this_year_after_a_break_of_one" (
"programme" text,
"date_s_of_original_removal" text,
"original_channel" text,
"date_of_return" text,
"new_channel_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `When bbc two is the original channel what is the date of original removal?`:
```sql
|
SELECT "date_of_return" FROM "returning_this_year_after_a_break_of_one" WHERE "new_channel_s"='BBC Two'; |
## Task
Generate a SQL query to answer the following question:
`When bbc two is the new channel what is the date of return?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "returning_this_year_after_a_break_of_one" (
"programme" text,
"date_s_of_original_removal" text,
"original_channel" text,
"date_of_return" text,
"new_channel_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `When bbc two is the new channel what is the date of return?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.