output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "losing_bonus" FROM "league_table" WHERE "points"='53'; |
## Task
Generate a SQL query to answer the following question:
`What was the losing bonus that had 53 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the losing bonus that had 53 points?`:
```sql
|
SELECT "points_against" FROM "league_table" WHERE "try_bonus"='0' AND "points_for"='150'; |
## Task
Generate a SQL query to answer the following question:
`List all points against with a 0 try bonus and points for of 150.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `List all points against with a 0 try bonus and points for of 150.`:
```sql
|
SELECT "tries_against" FROM "league_table" WHERE "tries_for"='30'; |
## Task
Generate a SQL query to answer the following question:
`Name the tries against when tries for is 30`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the tries against when tries for is 30`:
```sql
|
SELECT "points" FROM "league_table" WHERE "tries_for"='49'; |
## Task
Generate a SQL query to answer the following question:
`Name the points when tries for is 49`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the points when tries for is 49`:
```sql
|
SELECT "try_bonus" FROM "league_table" WHERE "lost"='11' AND "losing_bonus"='6'; |
## Task
Generate a SQL query to answer the following question:
`Name the try bonus for lost being 11 and losing bonus is 6`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the try bonus for lost being 11 and losing bonus is 6`:
```sql
|
SELECT "aggregate" FROM "knockout_stages" WHERE "2nd_leg"='1-3'; |
## Task
Generate a SQL query to answer the following question:
`What is the aggregate when the second leg is 1-3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "knockout_stages" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the aggregate when the second leg is 1-3?`:
```sql
|
SELECT "1st_leg" FROM "knockout_stages" WHERE "home_2nd_leg"='River Plate'; |
## Task
Generate a SQL query to answer the following question:
`For home of River Plate, what is the first leg listed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "knockout_stages" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `For home of River Plate, what is the first leg listed?`:
```sql
|
SELECT "home_2nd_leg" FROM "knockout_stages" WHERE "aggregate"='0-2'; |
## Task
Generate a SQL query to answer the following question:
`With an aggregate of 0-2, what is listed for home?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "knockout_stages" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `With an aggregate of 0-2, what is listed for home?`:
```sql
|
SELECT "1st_leg" FROM "knockout_stages" WHERE "home_2nd_leg"='Atlético Tucumán'; |
## Task
Generate a SQL query to answer the following question:
`If the home is Atlético Tucumán, what is the name of the first leg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "knockout_stages" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the home is Atlético Tucumán, what is the name of the first leg?`:
```sql
|
SELECT "1st_leg" FROM "knockout_stages" WHERE "home_2nd_leg"='Newell''s Old Boys'; |
## Task
Generate a SQL query to answer the following question:
`If second leg is Newell's Old Boys, what name is first leg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "knockout_stages" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `If second leg is Newell's Old Boys, what name is first leg?`:
```sql
|
SELECT "chinese_name" FROM "political_assistants" WHERE "romanised_name"='Chan Chi-yuen, Paul'; |
## Task
Generate a SQL query to answer the following question:
`What is the chinese name for whom chan chi-yuen, paul is listed as the romanised name?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "political_assistants" (
"romanised_name" text,
"chinese_name" text,
"age_at_appointment" real,
"foreign_nationality" text,
"portfolio_attachment" text,
"prior_occupation" text,
"govt_salary" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the chinese name for whom chan chi-yuen, paul is listed as the romanised name?`:
```sql
|
SELECT "foreign_nationality" FROM "political_assistants" WHERE "romanised_name"='Cheung, Raymond Man-to'; |
## Task
Generate a SQL query to answer the following question:
`The name cheung, raymond man-to is listed as a romanised name is cheung, raymond man-to?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "political_assistants" (
"romanised_name" text,
"chinese_name" text,
"age_at_appointment" real,
"foreign_nationality" text,
"portfolio_attachment" text,
"prior_occupation" text,
"govt_salary" text
);
### SQL
Given the database schema, here is the SQL query that answers `The name cheung, raymond man-to is listed as a romanised name is cheung, raymond man-to?`:
```sql
|
SELECT COUNT("govt_salary") FROM "political_assistants" WHERE "chinese_name"='盧奕基'; |
## Task
Generate a SQL query to answer the following question:
`For the chinese name 盧奕基 how many in total is the govt salary?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "political_assistants" (
"romanised_name" text,
"chinese_name" text,
"age_at_appointment" real,
"foreign_nationality" text,
"portfolio_attachment" text,
"prior_occupation" text,
"govt_salary" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the chinese name 盧奕基 how many in total is the govt salary?`:
```sql
|
SELECT COUNT("foreign_nationality") FROM "political_assistants" WHERE "romanised_name"='Lo Yik-kee, Victor'; |
## Task
Generate a SQL query to answer the following question:
`For the name romanised name is lo yik-kee, victor what is the total number foreign nationality that is listed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "political_assistants" (
"romanised_name" text,
"chinese_name" text,
"age_at_appointment" real,
"foreign_nationality" text,
"portfolio_attachment" text,
"prior_occupation" text,
"govt_salary" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the name romanised name is lo yik-kee, victor what is the total number foreign nationality that is listed?`:
```sql
|
SELECT "romanised_name" FROM "political_assistants" WHERE "prior_occupation"='Assistant Police Commissioner (ret''d)'; |
## Task
Generate a SQL query to answer the following question:
`For the prior occupation listed as assistant police commissioner (ret'd) what are the entire list of romanised name. `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "political_assistants" (
"romanised_name" text,
"chinese_name" text,
"age_at_appointment" real,
"foreign_nationality" text,
"portfolio_attachment" text,
"prior_occupation" text,
"govt_salary" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the prior occupation listed as assistant police commissioner (ret'd) what are the entire list of romanised name. `:
```sql
|
SELECT MAX("played") FROM "relegation" WHERE "points"=105; |
## Task
Generate a SQL query to answer the following question:
`Name the most played when points is 105`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation" (
"team" text,
"average" text,
"points" real,
"played" real,
"1991_92" text,
"1992_93" text,
"1993_94" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most played when points is 105`:
```sql
|
SELECT COUNT("points") FROM "relegation" WHERE "team"='Newell''s Old Boys'; |
## Task
Generate a SQL query to answer the following question:
`Name the total number of points for newell's old boys`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation" (
"team" text,
"average" text,
"points" real,
"played" real,
"1991_92" text,
"1992_93" text,
"1993_94" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of points for newell's old boys`:
```sql
|
SELECT "points" FROM "relegation" WHERE "1992_93"='42'; |
## Task
Generate a SQL query to answer the following question:
`Name the points for 1992-93 for 42`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation" (
"team" text,
"average" text,
"points" real,
"played" real,
"1991_92" text,
"1992_93" text,
"1993_94" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the points for 1992-93 for 42`:
```sql
|
SELECT "home_1st_leg" FROM "losers_knockout" WHERE "aggregate"='3-4'; |
## Task
Generate a SQL query to answer the following question:
`If the aggregate is 3-4, what is the first leg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the aggregate is 3-4, what is the first leg?`:
```sql
|
SELECT COUNT("aggregate") FROM "losers_knockout" WHERE "home_2nd_leg"='Instituto'; |
## Task
Generate a SQL query to answer the following question:
`If the second leg is Instituto, what is the total number of aggregate?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the second leg is Instituto, what is the total number of aggregate?`:
```sql
|
SELECT "home_1st_leg" FROM "losers_knockout" WHERE "2nd_leg"='1-1'; |
## Task
Generate a SQL query to answer the following question:
`If the second leg is 1-1, what is the first leg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the second leg is 1-1, what is the first leg?`:
```sql
|
SELECT "home_1st_leg" FROM "losers_knockout" WHERE "2nd_leg"='3-2'; |
## Task
Generate a SQL query to answer the following question:
`If the second leg is 3-2, what is the first leg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the second leg is 3-2, what is the first leg?`:
```sql
|
SELECT "1st_leg" FROM "losers_knockout" WHERE "2nd_leg"='1-1'; |
## Task
Generate a SQL query to answer the following question:
`If the second leg is 1-1, what is the first leg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the second leg is 1-1, what is the first leg?`:
```sql
|
SELECT "1989_90" FROM "relegation" WHERE "team"='Vélez Sársfield'; |
## Task
Generate a SQL query to answer the following question:
`How many games were played by the Vélez Sársfield team from 1989-90?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation" (
"team" text,
"average" text,
"points" real,
"played" real,
"1988_89" text,
"1989_90" text,
"1990_1991" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many games were played by the Vélez Sársfield team from 1989-90?`:
```sql
|
SELECT "average" FROM "relegation" WHERE "1990_1991"=31; |
## Task
Generate a SQL query to answer the following question:
`What was the average of the team if they played 31 games from 1990-1991?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation" (
"team" text,
"average" text,
"points" real,
"played" real,
"1988_89" text,
"1989_90" text,
"1990_1991" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the average of the team if they played 31 games from 1990-1991?`:
```sql
|
SELECT "team" FROM "relegation" WHERE "points"=122; |
## Task
Generate a SQL query to answer the following question:
`What was the team that scored 122 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation" (
"team" text,
"average" text,
"points" real,
"played" real,
"1988_89" text,
"1989_90" text,
"1990_1991" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the team that scored 122 points?`:
```sql
|
SELECT "average" FROM "relegation" WHERE "1990_1991"=40 AND "points"<121.0; |
## Task
Generate a SQL query to answer the following question:
`What was the average if the game played during 1990-91 is 40 and the points are less than 121.0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation" (
"team" text,
"average" text,
"points" real,
"played" real,
"1988_89" text,
"1989_90" text,
"1990_1991" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the average if the game played during 1990-91 is 40 and the points are less than 121.0?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "date"='October 4'; |
## Task
Generate a SQL query to answer the following question:
`What is the opponent played on October 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the opponent played on October 4?`:
```sql
|
SELECT MIN("week") FROM "schedule" WHERE "game_site"='Riverfront Stadium'; |
## Task
Generate a SQL query to answer the following question:
`Where is riverfront stadium the game site for the week?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Where is riverfront stadium the game site for the week?`:
```sql
|
SELECT MIN("num_s_lake_and_gnis_query_link") FROM "table1_17978052_2" WHERE "borough_or_census_area"='Valdez-Cordova (CA)'; |
## Task
Generate a SQL query to answer the following question:
`How many number of lakes are there in the Valdez-Cordova (CA) area?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_17978052_2" (
"num_s_dam_and_gnis_query_link" real,
"num_s_lake_and_gnis_query_link" real,
"num_s_reservoir_and_gnis_query_link" real,
"borough_or_census_area" text,
"comment" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many number of lakes are there in the Valdez-Cordova (CA) area?`:
```sql
|
SELECT "comment" FROM "table1_17978052_2" WHERE "borough_or_census_area"='Denali'; |
## Task
Generate a SQL query to answer the following question:
`What was the comment on the Denali area?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_17978052_2" (
"num_s_dam_and_gnis_query_link" real,
"num_s_lake_and_gnis_query_link" real,
"num_s_reservoir_and_gnis_query_link" real,
"borough_or_census_area" text,
"comment" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the comment on the Denali area?`:
```sql
|
SELECT MAX("num_s_dam_and_gnis_query_link") FROM "table1_17978052_2" WHERE "borough_or_census_area"='Lake and Peninsula'; |
## Task
Generate a SQL query to answer the following question:
`How many dams are there in the Lake and Peninsula area?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_17978052_2" (
"num_s_dam_and_gnis_query_link" real,
"num_s_lake_and_gnis_query_link" real,
"num_s_reservoir_and_gnis_query_link" real,
"borough_or_census_area" text,
"comment" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many dams are there in the Lake and Peninsula area?`:
```sql
|
SELECT MIN("num_s_dam_and_gnis_query_link") FROM "table1_17978052_2" WHERE "borough_or_census_area"='Nome (CA)'; |
## Task
Generate a SQL query to answer the following question:
`How many dams are there in the Nome (CA) area?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_17978052_2" (
"num_s_dam_and_gnis_query_link" real,
"num_s_lake_and_gnis_query_link" real,
"num_s_reservoir_and_gnis_query_link" real,
"borough_or_census_area" text,
"comment" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many dams are there in the Nome (CA) area?`:
```sql
|
SELECT COUNT("comment") FROM "table1_17978052_2" WHERE "borough_or_census_area"='Bethel (CA)'; |
## Task
Generate a SQL query to answer the following question:
`How many comments are there in the Bethel (CA) Borough area?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_17978052_2" (
"num_s_dam_and_gnis_query_link" real,
"num_s_lake_and_gnis_query_link" real,
"num_s_reservoir_and_gnis_query_link" real,
"borough_or_census_area" text,
"comment" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many comments are there in the Bethel (CA) Borough area?`:
```sql
|
SELECT COUNT("attendance") FROM "schedule" WHERE "date"='October 27'; |
## Task
Generate a SQL query to answer the following question:
`How many total numbers of attendance are there during the game in October 27?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many total numbers of attendance are there during the game in October 27?`:
```sql
|
SELECT "record" FROM "schedule" WHERE "opponent"='at Los Angeles Raiders'; |
## Task
Generate a SQL query to answer the following question:
`What was the game record when the opponent was 'at Los Angeles Raiders'?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the game record when the opponent was 'at Los Angeles Raiders'?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "opponent"='at Los Angeles Rams'; |
## Task
Generate a SQL query to answer the following question:
`When was the game played when the opponent was 'at Los Angeles Rams'?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `When was the game played when the opponent was 'at Los Angeles Rams'?`:
```sql
|
SELECT COUNT("attendance") FROM "schedule" WHERE "game_site"='Anaheim Stadium'; |
## Task
Generate a SQL query to answer the following question:
`How many total number of attendance were there when the game was held in Anaheim Stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many total number of attendance were there when the game was held in Anaheim Stadium?`:
```sql
|
SELECT MIN("attendance") FROM "schedule" WHERE "game_site"='Arrowhead Stadium'; |
## Task
Generate a SQL query to answer the following question:
`How many were in attendance when the game was held in Arrowhead Stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many were in attendance when the game was held in Arrowhead Stadium?`:
```sql
|
SELECT MAX("position") FROM "a_lyga" WHERE "draws"=7; |
## Task
Generate a SQL query to answer the following question:
`What is the highest position a team with 7 draws earned?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "a_lyga" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest position a team with 7 draws earned?`:
```sql
|
SELECT "original_air_date" FROM "table1_18012738_1" WHERE "ai_pct"=83; |
## Task
Generate a SQL query to answer the following question:
`Name the original air date for ai% for 83`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18012738_1" (
"story_no" text,
"episode" real,
"title" text,
"directed_by" text,
"written_by" text,
"uk_viewers_million" text,
"ai_pct" real,
"original_air_date" text,
"production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the original air date for ai% for 83`:
```sql
|
SELECT "story_no" FROM "table1_18012738_1" WHERE "written_by"='Paul Cornell'; |
## Task
Generate a SQL query to answer the following question:
`Name the story number for paul cornell`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18012738_1" (
"story_no" text,
"episode" real,
"title" text,
"directed_by" text,
"written_by" text,
"uk_viewers_million" text,
"ai_pct" real,
"original_air_date" text,
"production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the story number for paul cornell`:
```sql
|
SELECT COUNT("directed_by") FROM "table1_18012738_1" WHERE "uk_viewers_million"='6.86'; |
## Task
Generate a SQL query to answer the following question:
`Name the total number directed by for uk viewers being 6.86`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18012738_1" (
"story_no" text,
"episode" real,
"title" text,
"directed_by" text,
"written_by" text,
"uk_viewers_million" text,
"ai_pct" real,
"original_air_date" text,
"production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number directed by for uk viewers being 6.86`:
```sql
|
SELECT MIN("ai_pct") FROM "table1_18012738_1"; |
## Task
Generate a SQL query to answer the following question:
`Name the least ai %`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18012738_1" (
"story_no" text,
"episode" real,
"title" text,
"directed_by" text,
"written_by" text,
"uk_viewers_million" text,
"ai_pct" real,
"original_air_date" text,
"production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least ai %`:
```sql
|
SELECT MAX("games_played") FROM "2_lyga_zone_south"; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number of games played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2_lyga_zone_south" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of games played?`:
```sql
|
SELECT COUNT("goals_conceded") FROM "2_lyga_zone_south" WHERE "points"=31; |
## Task
Generate a SQL query to answer the following question:
`In the game with 31 points, how many goals were conceded?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2_lyga_zone_south" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `In the game with 31 points, how many goals were conceded?`:
```sql
|
SELECT COUNT("games_played") FROM "2_lyga_zone_south" WHERE "points"=22; |
## Task
Generate a SQL query to answer the following question:
`How many games had 22 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2_lyga_zone_south" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many games had 22 points?`:
```sql
|
SELECT "wins" FROM "farm_team_league" WHERE "goals_scored"=58; |
## Task
Generate a SQL query to answer the following question:
`How many wins had 58 goals scored?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "farm_team_league" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins had 58 goals scored?`:
```sql
|
SELECT COUNT("club") FROM "farm_team_league" WHERE "points"=29; |
## Task
Generate a SQL query to answer the following question:
`How many clubs had 29 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "farm_team_league" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many clubs had 29 points?`:
```sql
|
SELECT "club" FROM "farm_team_league" WHERE "draws"=9; |
## Task
Generate a SQL query to answer the following question:
`Which clubs had draws of 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "farm_team_league" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which clubs had draws of 9?`:
```sql
|
SELECT COUNT("draws") FROM "farm_team_league" WHERE "goals_conceded"=45; |
## Task
Generate a SQL query to answer the following question:
`How many draws were there when the conceded goals was numbered at 45?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "farm_team_league" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many draws were there when the conceded goals was numbered at 45?`:
```sql
|
SELECT MIN("games_played") FROM "farm_team_league" WHERE "loses"=21; |
## Task
Generate a SQL query to answer the following question:
`What is the least amount of games played with 21 losses?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "farm_team_league" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least amount of games played with 21 losses?`:
```sql
|
SELECT MIN("games_played") FROM "2_lyga_zone_east"; |
## Task
Generate a SQL query to answer the following question:
`How many games did each team played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2_lyga_zone_east" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many games did each team played?`:
```sql
|
SELECT MAX("points") FROM "2_lyga_zone_east" WHERE "goals_scored"=47; |
## Task
Generate a SQL query to answer the following question:
`HOw many points where there when the number of goals scored was 47?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2_lyga_zone_east" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `HOw many points where there when the number of goals scored was 47?`:
```sql
|
SELECT "goals_scored" FROM "2_lyga_zone_east" WHERE "club"='FM (LOSC) Vilnius'; |
## Task
Generate a SQL query to answer the following question:
`How many goals were scored by club team fm (losc) vilnius`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2_lyga_zone_east" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many goals were scored by club team fm (losc) vilnius`:
```sql
|
SELECT MAX("loses") FROM "2_lyga_zone_east" WHERE "club"='Ekranas-2 Panevėžys'; |
## Task
Generate a SQL query to answer the following question:
`How many losses occurred when the club team was ekranas-2 panevėžys`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2_lyga_zone_east" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many losses occurred when the club team was ekranas-2 panevėžys`:
```sql
|
SELECT MAX("wins") FROM "2_lyga_zone_east"; |
## Task
Generate a SQL query to answer the following question:
`What was the highest number of wins for any team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2_lyga_zone_east" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the highest number of wins for any team?`:
```sql
|
SELECT "ncaat_record" FROM "schedule_results" WHERE "date"='June 22'; |
## Task
Generate a SQL query to answer the following question:
`What is the June 22 ncaat baseball record for Fresno State Bulldogs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_results" (
"num" real,
"date" text,
"opponent" text,
"score" text,
"site_stadium" text,
"win" text,
"loss" text,
"save" text,
"attendance" real,
"overall_record" text,
"ncaat_record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the June 22 ncaat baseball record for Fresno State Bulldogs?`:
```sql
|
SELECT "save" FROM "schedule_results" WHERE "score"='7-6'; |
## Task
Generate a SQL query to answer the following question:
`How many saves were in the Georgia game, versus the Bulldogs, with a score of 7-6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_results" (
"num" real,
"date" text,
"opponent" text,
"score" text,
"site_stadium" text,
"win" text,
"loss" text,
"save" text,
"attendance" real,
"overall_record" text,
"ncaat_record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many saves were in the Georgia game, versus the Bulldogs, with a score of 7-6?`:
```sql
|
SELECT "ncaat_record" FROM "schedule_results" WHERE "date"='June 21'; |
## Task
Generate a SQL query to answer the following question:
`What is the June 21 ncaat baseball record for Fresno State Bulldogs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_results" (
"num" real,
"date" text,
"opponent" text,
"score" text,
"site_stadium" text,
"win" text,
"loss" text,
"save" text,
"attendance" real,
"overall_record" text,
"ncaat_record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the June 21 ncaat baseball record for Fresno State Bulldogs?`:
```sql
|
SELECT "papal_name" FROM "actual_examples" WHERE "papal_name_as_announced_in_latin"='Ioannis Pauli primi'; |
## Task
Generate a SQL query to answer the following question:
`What is the Papal name of the Pope announced as Ioannis Pauli Primi?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "actual_examples" (
"birth_name" text,
"birth_name_as_announced_in_latin_accusative_case_forename_undeclined_surname" text,
"papal_name" text,
"papal_name_as_announced_in_latin" text,
"latin_declension_of_papal_name" text,
"numeral_in_papal_name" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Papal name of the Pope announced as Ioannis Pauli Primi?`:
```sql
|
SELECT "birth_name_as_announced_in_latin_accusative_case_forename_undeclined_surname" FROM "actual_examples" WHERE "numeral_in_papal_name"='not given' AND "latin_declension_of_papal_name"='genitive'; |
## Task
Generate a SQL query to answer the following question:
`What is the announced birth name of the pope whose numeral is not given and whose latin declension is genitive?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "actual_examples" (
"birth_name" text,
"birth_name_as_announced_in_latin_accusative_case_forename_undeclined_surname" text,
"papal_name" text,
"papal_name_as_announced_in_latin" text,
"latin_declension_of_papal_name" text,
"numeral_in_papal_name" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the announced birth name of the pope whose numeral is not given and whose latin declension is genitive?`:
```sql
|
SELECT "papal_name" FROM "actual_examples" WHERE "papal_name_as_announced_in_latin"='Pium'; |
## Task
Generate a SQL query to answer the following question:
`What pope was announced in latin as Pium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "actual_examples" (
"birth_name" text,
"birth_name_as_announced_in_latin_accusative_case_forename_undeclined_surname" text,
"papal_name" text,
"papal_name_as_announced_in_latin" text,
"latin_declension_of_papal_name" text,
"numeral_in_papal_name" text
);
### SQL
Given the database schema, here is the SQL query that answers `What pope was announced in latin as Pium?`:
```sql
|
SELECT "birth_name_as_announced_in_latin_accusative_case_forename_undeclined_surname" FROM "actual_examples" WHERE "papal_name_as_announced_in_latin"='Ioannis Pauli primi'; |
## Task
Generate a SQL query to answer the following question:
`What is the latin birth name of the pope announced as Ioannis Pauli Primi?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "actual_examples" (
"birth_name" text,
"birth_name_as_announced_in_latin_accusative_case_forename_undeclined_surname" text,
"papal_name" text,
"papal_name_as_announced_in_latin" text,
"latin_declension_of_papal_name" text,
"numeral_in_papal_name" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the latin birth name of the pope announced as Ioannis Pauli Primi?`:
```sql
|
SELECT COUNT("2008_suruga_bank_championship") FROM "table1_18027411_1" WHERE "team_competition"='Estudiantes de La Plata'; |
## Task
Generate a SQL query to answer the following question:
`how many times did estudiantes de la plata participate in 2008 suruga bank championship`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18027411_1" (
"team_competition" text,
"2008_suruga_bank_championship" text,
"2008_recopa_sudamericana" text,
"2008_copa_sudamericana" text,
"2009_copa_libertadores" text
);
### SQL
Given the database schema, here is the SQL query that answers `how many times did estudiantes de la plata participate in 2008 suruga bank championship`:
```sql
|
SELECT "2008_recopa_sudamericana" FROM "table1_18027411_1" WHERE "2008_copa_sudamericana"='First Round eliminated by Estudiantes'; |
## Task
Generate a SQL query to answer the following question:
`How did the team which was first round eliminated by estudiantes do in 2008 recopa sudamericana`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18027411_1" (
"team_competition" text,
"2008_suruga_bank_championship" text,
"2008_recopa_sudamericana" text,
"2008_copa_sudamericana" text,
"2009_copa_libertadores" text
);
### SQL
Given the database schema, here is the SQL query that answers `How did the team which was first round eliminated by estudiantes do in 2008 recopa sudamericana`:
```sql
|
SELECT COUNT("2008_suruga_bank_championship") FROM "table1_18027411_1" WHERE "2008_copa_sudamericana"='First Round eliminated by Estudiantes'; |
## Task
Generate a SQL query to answer the following question:
`how many teams were first round eliminated by estudiantes in 2008 copa sudamericana`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18027411_1" (
"team_competition" text,
"2008_suruga_bank_championship" text,
"2008_recopa_sudamericana" text,
"2008_copa_sudamericana" text,
"2009_copa_libertadores" text
);
### SQL
Given the database schema, here is the SQL query that answers `how many teams were first round eliminated by estudiantes in 2008 copa sudamericana`:
```sql
|
SELECT "date" FROM "doubles_17" WHERE "against"='Morocco'; |
## Task
Generate a SQL query to answer the following question:
`What date was the match against Morocco played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_17" (
"edition" text,
"round" text,
"date" text,
"partnering" text,
"against" text,
"surface" text,
"opponents" text,
"w_l" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the match against Morocco played?`:
```sql
|
SELECT "against" FROM "doubles_17" WHERE "date"='21–23 September 2007'; |
## Task
Generate a SQL query to answer the following question:
`What country did Gil play against on 21–23 september 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_17" (
"edition" text,
"round" text,
"date" text,
"partnering" text,
"against" text,
"surface" text,
"opponents" text,
"w_l" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country did Gil play against on 21–23 september 2007?`:
```sql
|
SELECT "partnering" FROM "doubles_17" WHERE "date"='10–12 July 2009'; |
## Task
Generate a SQL query to answer the following question:
`Who was Gil's partner on 10–12 july 2009`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_17" (
"edition" text,
"round" text,
"date" text,
"partnering" text,
"against" text,
"surface" text,
"opponents" text,
"w_l" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was Gil's partner on 10–12 july 2009`:
```sql
|
SELECT "state_class" FROM "table1_1802760_3" WHERE "date_of_successors_formal_installation"='December 3, 1858'; |
## Task
Generate a SQL query to answer the following question:
`Where was the successor formally installed on December 3, 1858?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1802760_3" (
"state_class" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_of_successors_formal_installation" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where was the successor formally installed on December 3, 1858?`:
```sql
|
SELECT "reason_for_change" FROM "table1_1802760_3" WHERE "date_of_successors_formal_installation"='February 14, 1859'; |
## Task
Generate a SQL query to answer the following question:
`Why did the change happen in the state where the formal installation happen on February 14, 1859?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1802760_3" (
"state_class" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_of_successors_formal_installation" text
);
### SQL
Given the database schema, here is the SQL query that answers `Why did the change happen in the state where the formal installation happen on February 14, 1859?`:
```sql
|
SELECT "vacator" FROM "table1_1802522_4" WHERE "district"='Tennessee 1st'; |
## Task
Generate a SQL query to answer the following question:
`Name the vacator for tennessee 1st`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1802522_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the vacator for tennessee 1st`:
```sql
|
SELECT "iata_code" FROM "table1_18047346_4" WHERE "passengers"='15,505,566'; |
## Task
Generate a SQL query to answer the following question:
`If the passengers are 15,505,566, what is the iata code?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18047346_4" (
"rank" real,
"airport_name" text,
"location" text,
"iata_code" text,
"passengers" text,
"pct_chg_2009_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the passengers are 15,505,566, what is the iata code?`:
```sql
|
SELECT "airport_name" FROM "table1_18047346_4" WHERE "location"='Chicago, Illinois'; |
## Task
Generate a SQL query to answer the following question:
`If the location is Chicago, Illinois, what is the airport name?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18047346_4" (
"rank" real,
"airport_name" text,
"location" text,
"iata_code" text,
"passengers" text,
"pct_chg_2009_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the location is Chicago, Illinois, what is the airport name?`:
```sql
|
SELECT "pct_chg_2009_10" FROM "table1_18047346_4" WHERE "passengers"='15,505,566'; |
## Task
Generate a SQL query to answer the following question:
`If the amount of passengers is 15,505,566, what is the %/chg. for 2009/10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18047346_4" (
"rank" real,
"airport_name" text,
"location" text,
"iata_code" text,
"passengers" text,
"pct_chg_2009_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the amount of passengers is 15,505,566, what is the %/chg. for 2009/10?`:
```sql
|
SELECT "alma_mater" FROM "table1_18042409_1" WHERE "player"='Steve Hoar'; |
## Task
Generate a SQL query to answer the following question:
`What university did Steve Hoar attend. `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18042409_1" (
"player" text,
"alma_mater" text,
"national_lacrosse_league" text,
"major_league_lacrosse" text,
"international_competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What university did Steve Hoar attend. `:
```sql
|
SELECT "player" FROM "table1_18042409_1" WHERE "alma_mater"='Wilfrid Laurier University'; |
## Task
Generate a SQL query to answer the following question:
`List the plats that attended Wilfrid Laurier University. `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18042409_1" (
"player" text,
"alma_mater" text,
"national_lacrosse_league" text,
"major_league_lacrosse" text,
"international_competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `List the plats that attended Wilfrid Laurier University. `:
```sql
|
SELECT "international_competition" FROM "table1_18042409_1" WHERE "national_lacrosse_league"='Toronto Rock'; |
## Task
Generate a SQL query to answer the following question:
`List all the international lacrosse league competitions for Toronto Rock.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18042409_1" (
"player" text,
"alma_mater" text,
"national_lacrosse_league" text,
"major_league_lacrosse" text,
"international_competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `List all the international lacrosse league competitions for Toronto Rock.`:
```sql
|
SELECT "player" FROM "table1_18042409_1" WHERE "national_lacrosse_league"='Toronto Rock'; |
## Task
Generate a SQL query to answer the following question:
`List all of the NLL Toronto Rock players. `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18042409_1" (
"player" text,
"alma_mater" text,
"national_lacrosse_league" text,
"major_league_lacrosse" text,
"international_competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `List all of the NLL Toronto Rock players. `:
```sql
|
SELECT "rank" FROM "table1_18047346_5" WHERE "iata_code"='JFK'; |
## Task
Generate a SQL query to answer the following question:
`What rank is the airport whose IATA Code is JFK?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18047346_5" (
"rank" real,
"airport_name" text,
"location" text,
"iata_code" text,
"tonnes" text,
"pct_chg_2010_11" text
);
### SQL
Given the database schema, here is the SQL query that answers `What rank is the airport whose IATA Code is JFK?`:
```sql
|
SELECT "airport_name" FROM "table1_18047346_5" WHERE "iata_code"='ORD'; |
## Task
Generate a SQL query to answer the following question:
`Which airport has an IATA Code of ORD?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18047346_5" (
"rank" real,
"airport_name" text,
"location" text,
"iata_code" text,
"tonnes" text,
"pct_chg_2010_11" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which airport has an IATA Code of ORD?`:
```sql
|
SELECT "tonnes" FROM "table1_18047346_5" WHERE "airport_name"='Louisville International Airport'; |
## Task
Generate a SQL query to answer the following question:
`Louisville International Airport had how many tonnes of cargo in 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18047346_5" (
"rank" real,
"airport_name" text,
"location" text,
"iata_code" text,
"tonnes" text,
"pct_chg_2010_11" text
);
### SQL
Given the database schema, here is the SQL query that answers `Louisville International Airport had how many tonnes of cargo in 2011?`:
```sql
|
SELECT "tonnes" FROM "table1_18047346_5" WHERE "iata_code"='IND'; |
## Task
Generate a SQL query to answer the following question:
`How many tonnes of cargo did the airport have with the IATA Code IND?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18047346_5" (
"rank" real,
"airport_name" text,
"location" text,
"iata_code" text,
"tonnes" text,
"pct_chg_2010_11" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many tonnes of cargo did the airport have with the IATA Code IND?`:
```sql
|
SELECT "incumbent" FROM "table1_1805191_10" WHERE "party"='Democratic' AND "district"='Florida 11'; |
## Task
Generate a SQL query to answer the following question:
`Who is the incumbent democratic party in district florida 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1805191_10" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the incumbent democratic party in district florida 11?`:
```sql
|
SELECT "district" FROM "table1_1805191_10" WHERE "first_elected"=2000; |
## Task
Generate a SQL query to answer the following question:
`In which district is the first elected 2000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1805191_10" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `In which district is the first elected 2000?`:
```sql
|
SELECT "first_elected" FROM "table1_1805191_10" WHERE "district"='Florida 19'; |
## Task
Generate a SQL query to answer the following question:
`When is the first elected in the Florida 19 district?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1805191_10" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `When is the first elected in the Florida 19 district?`:
```sql
|
SELECT COUNT("results") FROM "table1_1805191_10" WHERE "incumbent"='Dave Weldon'; |
## Task
Generate a SQL query to answer the following question:
`What are the results of incumbent dave weldon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1805191_10" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the results of incumbent dave weldon?`:
```sql
|
SELECT COUNT("district") FROM "new_york" WHERE "incumbent"='Charles Rangel'; |
## Task
Generate a SQL query to answer the following question:
`How many districts have the incumbent, Charles Rangel? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many districts have the incumbent, Charles Rangel? `:
```sql
|
SELECT "party" FROM "new_york" WHERE "district"='New York 26'; |
## Task
Generate a SQL query to answer the following question:
`What is the party affiliation of New York 26? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the party affiliation of New York 26? `:
```sql
|
SELECT COUNT("party") FROM "pennsylvania" WHERE "district"='Pennsylvania 1'; |
## Task
Generate a SQL query to answer the following question:
`In the district of Pennsylvania 1, what is the total number of political parties?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `In the district of Pennsylvania 1, what is the total number of political parties?`:
```sql
|
SELECT MIN("first_elected") FROM "pennsylvania" WHERE "incumbent"='Tim Holden'; |
## Task
Generate a SQL query to answer the following question:
`What year was Tim Holden first elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was Tim Holden first elected?`:
```sql
|
SELECT COUNT("party") FROM "pennsylvania" WHERE "first_elected"=1994; |
## Task
Generate a SQL query to answer the following question:
`How many parties were first elected in 1994?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many parties were first elected in 1994?`:
```sql
|
SELECT COUNT("results") FROM "pennsylvania" WHERE "district"='Pennsylvania 11'; |
## Task
Generate a SQL query to answer the following question:
`In district Pennsylvania 11, what was the total numbers of results?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `In district Pennsylvania 11, what was the total numbers of results?`:
```sql
|
SELECT COUNT("first_elected") FROM "alabama" WHERE "incumbent"='Spencer Bachus'; |
## Task
Generate a SQL query to answer the following question:
`During what year was Representative Spencer Bachus first elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "alabama" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `During what year was Representative Spencer Bachus first elected?`:
```sql
|
SELECT "party" FROM "alabama" WHERE "incumbent"='Robert Cramer'; |
## Task
Generate a SQL query to answer the following question:
`What is the party affiliation of the incumbent Robert Cramer?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "alabama" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the party affiliation of the incumbent Robert Cramer?`:
```sql
|
SELECT "incumbent" FROM "washington" WHERE "district"='Washington 1'; |
## Task
Generate a SQL query to answer the following question:
`Who is the incumbent in the Washington 1 district? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "washington" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the incumbent in the Washington 1 district? `:
```sql
|
SELECT COUNT("first_elected") FROM "washington" WHERE "district"='Washington 4'; |
## Task
Generate a SQL query to answer the following question:
`How many categories of first elected are in Washington 4 district? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "washington" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many categories of first elected are in Washington 4 district? `:
```sql
|
SELECT "results" FROM "washington" WHERE "first_elected"=2000; |
## Task
Generate a SQL query to answer the following question:
`What was the result in the election where the date of first elected was 2000? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "washington" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result in the election where the date of first elected was 2000? `:
```sql
|
SELECT "directed_by" FROM "table1_18054886_1" WHERE "title"='\"Smells Like Teen Sellout\"'; |
## Task
Generate a SQL query to answer the following question:
`Who directed the episode titled "Smells Like Teen Sellout"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_18054886_1" (
"no_in_series" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"prod_code" real,
"viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed the episode titled "Smells Like Teen Sellout"?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.