output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT COUNT("no") FROM "lpga_tour_wins_7" WHERE "tournament"='Sime Darby LPGA Malaysia'; |
## Task
Generate a SQL query to answer the following question:
`How many tournaments were at sime darby lpga malaysia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_wins_7" (
"no" real,
"date" text,
"tournament" text,
"winning_score" text,
"to_par" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many tournaments were at sime darby lpga malaysia?`:
```sql
|
SELECT "margin_of_victory" FROM "lpga_tour_wins_7" WHERE "no"=4; |
## Task
Generate a SQL query to answer the following question:
`Margin of victory on no. 4 was?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_wins_7" (
"no" real,
"date" text,
"tournament" text,
"winning_score" text,
"to_par" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Margin of victory on no. 4 was?`:
```sql
|
SELECT "runner_s_up" FROM "lpga_tour_wins_7" WHERE "margin_of_victory"='4 strokes'; |
## Task
Generate a SQL query to answer the following question:
`Who was the runner up when the won by 4 strokes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_wins_7" (
"no" real,
"date" text,
"tournament" text,
"winning_score" text,
"to_par" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the runner up when the won by 4 strokes?`:
```sql
|
SELECT "film_title_used_in_nomination" FROM "table1_21655290_1" WHERE "year_ceremony"='1990 (63rd)'; |
## Task
Generate a SQL query to answer the following question:
`Which film title used in nomination has the year (ceremony) 1990 (63rd)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21655290_1" (
"year_ceremony" text,
"film_title_used_in_nomination" text,
"original_title" text,
"director" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which film title used in nomination has the year (ceremony) 1990 (63rd)?`:
```sql
|
SELECT "director" FROM "table1_21655290_1" WHERE "original_title"='Kon-Tiki'; |
## Task
Generate a SQL query to answer the following question:
`Who is the director of kon-tiki original title?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21655290_1" (
"year_ceremony" text,
"film_title_used_in_nomination" text,
"original_title" text,
"director" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the director of kon-tiki original title?`:
```sql
|
SELECT "film_title_used_in_nomination" FROM "table1_21655290_1" WHERE "original_title"='Vinterkyss'; |
## Task
Generate a SQL query to answer the following question:
`Which film title used in nomination has vinterkyss as the original title?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21655290_1" (
"year_ceremony" text,
"film_title_used_in_nomination" text,
"original_title" text,
"director" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which film title used in nomination has vinterkyss as the original title?`:
```sql
|
SELECT "date" FROM "ladies_european_tour_wins_6" WHERE "tournament"='McDonald''s WPGA Championship'; |
## Task
Generate a SQL query to answer the following question:
`What is the date for the tournament McDonald's wpga championship?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ladies_european_tour_wins_6" (
"no" real,
"date" text,
"tournament" text,
"winning_score" text,
"to_par" text,
"margin_of_victory" text,
"runner_s_up" text,
"winners_share" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date for the tournament McDonald's wpga championship?`:
```sql
|
SELECT "winning_score" FROM "ladies_european_tour_wins_6" WHERE "margin_of_victory"='5 strokes'; |
## Task
Generate a SQL query to answer the following question:
`What is the winning score when 5 strokes is the margin of victory?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ladies_european_tour_wins_6" (
"no" real,
"date" text,
"tournament" text,
"winning_score" text,
"to_par" text,
"margin_of_victory" text,
"runner_s_up" text,
"winners_share" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the winning score when 5 strokes is the margin of victory?`:
```sql
|
SELECT "to_par" FROM "ladies_european_tour_wins_6" WHERE "winning_score"='74-67-71-73=285'; |
## Task
Generate a SQL query to answer the following question:
`What is the to par with the winning score of 74-67-71-73=285?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ladies_european_tour_wins_6" (
"no" real,
"date" text,
"tournament" text,
"winning_score" text,
"to_par" text,
"margin_of_victory" text,
"runner_s_up" text,
"winners_share" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the to par with the winning score of 74-67-71-73=285?`:
```sql
|
SELECT "date" FROM "ladies_european_tour_wins_6" WHERE "winning_score"='74-67-71-73=285'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the winning score 74-67-71-73=285?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ladies_european_tour_wins_6" (
"no" real,
"date" text,
"tournament" text,
"winning_score" text,
"to_par" text,
"margin_of_victory" text,
"runner_s_up" text,
"winners_share" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the winning score 74-67-71-73=285?`:
```sql
|
SELECT "no_in_series" FROM "table1_21666472_1" WHERE "title"='\"Diamonds\"'; |
## Task
Generate a SQL query to answer the following question:
`What number in series is "Diamonds"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21666472_1" (
"no_in_total" text,
"no_in_series" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What number in series is "Diamonds"?`:
```sql
|
SELECT "directed_by" FROM "table1_21666472_1" WHERE "title"='\"A Tale of Two Hitmen\"'; |
## Task
Generate a SQL query to answer the following question:
`Who directed "A Tale of Two Hitmen"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21666472_1" (
"no_in_total" text,
"no_in_series" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed "A Tale of Two Hitmen"?`:
```sql
|
SELECT COUNT("no_in_series") FROM "table1_21666472_1" WHERE "written_by"='Greg Haddrick'; |
## Task
Generate a SQL query to answer the following question:
`How many number in series's are written by Greg Haddrick?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21666472_1" (
"no_in_total" text,
"no_in_series" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many number in series's are written by Greg Haddrick?`:
```sql
|
SELECT "no_in_series" FROM "table1_21666472_1" WHERE "title"='\"Judas Kiss\"'; |
## Task
Generate a SQL query to answer the following question:
`What number in series is "Judas Kiss"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21666472_1" (
"no_in_total" text,
"no_in_series" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What number in series is "Judas Kiss"?`:
```sql
|
SELECT "original_air_date" FROM "table1_21666472_1" WHERE "title"='\"A Nice Little Earner\"'; |
## Task
Generate a SQL query to answer the following question:
`What was the original airdate of "A Nice Little Earner"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21666472_1" (
"no_in_total" text,
"no_in_series" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the original airdate of "A Nice Little Earner"?`:
```sql
|
SELECT MAX("first_establishment") FROM "table1_216655_1" WHERE "research_grants_2009_in_billion_sek"='4.027'; |
## Task
Generate a SQL query to answer the following question:
`whatis the year the first establishment had research grants in the amount of 4.027?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_216655_1" (
"university" text,
"established_as_a_university" real,
"first_establishment" real,
"student_population_fte_2009" real,
"research_grants_2009_in_billion_sek" text
);
### SQL
Given the database schema, here is the SQL query that answers `whatis the year the first establishment had research grants in the amount of 4.027?`:
```sql
|
SELECT COUNT("established_as_a_university") FROM "table1_216655_1" WHERE "research_grants_2009_in_billion_sek"='2.203'; |
## Task
Generate a SQL query to answer the following question:
`what is the total number of established univeristy receiving research grants in the amount of 2.203?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_216655_1" (
"university" text,
"established_as_a_university" real,
"first_establishment" real,
"student_population_fte_2009" real,
"research_grants_2009_in_billion_sek" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the total number of established univeristy receiving research grants in the amount of 2.203?`:
```sql
|
SELECT "student_population_fte_2009" FROM "table1_216655_1" WHERE "research_grants_2009_in_billion_sek"='1.812'; |
## Task
Generate a SQL query to answer the following question:
`what are the student population where research grants is 1.812?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_216655_1" (
"university" text,
"established_as_a_university" real,
"first_establishment" real,
"student_population_fte_2009" real,
"research_grants_2009_in_billion_sek" text
);
### SQL
Given the database schema, here is the SQL query that answers `what are the student population where research grants is 1.812?`:
```sql
|
SELECT "first_establishment" FROM "table1_216655_1" WHERE "research_grants_2009_in_billion_sek"='2.033'; |
## Task
Generate a SQL query to answer the following question:
`what is the first establishement where research grants is 2.033?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_216655_1" (
"university" text,
"established_as_a_university" real,
"first_establishment" real,
"student_population_fte_2009" real,
"research_grants_2009_in_billion_sek" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the first establishement where research grants is 2.033?`:
```sql
|
SELECT MIN("student_population_fte_2009") FROM "table1_216655_1" WHERE "research_grants_2009_in_billion_sek"='2.203'; |
## Task
Generate a SQL query to answer the following question:
`what is the minimum student population where the research grants is 2.203?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_216655_1" (
"university" text,
"established_as_a_university" real,
"first_establishment" real,
"student_population_fte_2009" real,
"research_grants_2009_in_billion_sek" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the minimum student population where the research grants is 2.203?`:
```sql
|
SELECT "year" FROM "all_winners_of_olympiatravet" WHERE "odds_of_winner"='16.66'; |
## Task
Generate a SQL query to answer the following question:
`When were the odds of winner 16.66?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_winners_of_olympiatravet" (
"year" real,
"horse" text,
"driver" text,
"trainer" text,
"country_of_owner" text,
"odds_of_winner" text,
"winning_time_km_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `When were the odds of winner 16.66?`:
```sql
|
SELECT "winning_time_km_rate" FROM "all_winners_of_olympiatravet" WHERE "odds_of_winner"='2.94'; |
## Task
Generate a SQL query to answer the following question:
`What was the winning time in the year when the odds of the winner were 2.94?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_winners_of_olympiatravet" (
"year" real,
"horse" text,
"driver" text,
"trainer" text,
"country_of_owner" text,
"odds_of_winner" text,
"winning_time_km_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the winning time in the year when the odds of the winner were 2.94?`:
```sql
|
SELECT "odds_of_winner" FROM "all_winners_of_olympiatravet" WHERE "horse"='Gentleman'; |
## Task
Generate a SQL query to answer the following question:
`What were Gentleman's odds of winner?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_winners_of_olympiatravet" (
"year" real,
"horse" text,
"driver" text,
"trainer" text,
"country_of_owner" text,
"odds_of_winner" text,
"winning_time_km_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were Gentleman's odds of winner?`:
```sql
|
SELECT COUNT("country_of_owner") FROM "all_winners_of_olympiatravet" WHERE "horse"='Utah Bulwark'; |
## Task
Generate a SQL query to answer the following question:
`How many countries did Utah Bulwark's owner come from?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_winners_of_olympiatravet" (
"year" real,
"horse" text,
"driver" text,
"trainer" text,
"country_of_owner" text,
"odds_of_winner" text,
"winning_time_km_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many countries did Utah Bulwark's owner come from?`:
```sql
|
SELECT COUNT("horse") FROM "all_winners_of_olympiatravet" WHERE "year"=1985; |
## Task
Generate a SQL query to answer the following question:
`How many horses are mentioned competing in 1985?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_winners_of_olympiatravet" (
"year" real,
"horse" text,
"driver" text,
"trainer" text,
"country_of_owner" text,
"odds_of_winner" text,
"winning_time_km_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many horses are mentioned competing in 1985?`:
```sql
|
SELECT MAX("area_km") FROM "table1_2168295_1" WHERE "headquarters"='Bharatpur'; |
## Task
Generate a SQL query to answer the following question:
`If the headquarters is Bharatpur, what is the maximum area?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_2168295_1" (
"district" text,
"headquarters" text,
"area_km" real,
"population_2011" real,
"division" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the headquarters is Bharatpur, what is the maximum area?`:
```sql
|
SELECT "area_km" FROM "table1_2168295_1" WHERE "district"='Chittorgarh'; |
## Task
Generate a SQL query to answer the following question:
`If the district is Chittorgarh, what is the area?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_2168295_1" (
"district" text,
"headquarters" text,
"area_km" real,
"population_2011" real,
"division" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the district is Chittorgarh, what is the area?`:
```sql
|
SELECT "headquarters" FROM "table1_2168295_1" WHERE "population_2011"=3685681; |
## Task
Generate a SQL query to answer the following question:
`If the 2011 population is 3685681, what is the name of the headquarters?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_2168295_1" (
"district" text,
"headquarters" text,
"area_km" real,
"population_2011" real,
"division" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the 2011 population is 3685681, what is the name of the headquarters?`:
```sql
|
SELECT MIN("area_km") FROM "table1_2168295_1" WHERE "population_2011"=3067549; |
## Task
Generate a SQL query to answer the following question:
`What is the minimum area id the 2011 population is 3067549?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_2168295_1" (
"district" text,
"headquarters" text,
"area_km" real,
"population_2011" real,
"division" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the minimum area id the 2011 population is 3067549?`:
```sql
|
SELECT "population_2011" FROM "table1_2168295_1" WHERE "headquarters"='Chittorgarh'; |
## Task
Generate a SQL query to answer the following question:
`What is the 2011 population if the headquarters is Chittorgarh?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_2168295_1" (
"district" text,
"headquarters" text,
"area_km" real,
"population_2011" real,
"division" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 2011 population if the headquarters is Chittorgarh?`:
```sql
|
SELECT COUNT("municipal_mayor") FROM "municipalities" WHERE "area_km"='42.66'; |
## Task
Generate a SQL query to answer the following question:
`How many different municipal mayors were there in the municipality with an area of 42.66 km2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "municipalities" (
"municipality" text,
"type" text,
"district" text,
"area_km" text,
"population_2010" real,
"pop_density_per_km" text,
"no_of_barangays" real,
"municipal_mayor" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many different municipal mayors were there in the municipality with an area of 42.66 km2?`:
```sql
|
SELECT "municipality" FROM "municipalities" WHERE "population_2010"=26839; |
## Task
Generate a SQL query to answer the following question:
`What municipality had 26839 people living in it in 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "municipalities" (
"municipality" text,
"type" text,
"district" text,
"area_km" text,
"population_2010" real,
"pop_density_per_km" text,
"no_of_barangays" real,
"municipal_mayor" text
);
### SQL
Given the database schema, here is the SQL query that answers `What municipality had 26839 people living in it in 2010?`:
```sql
|
SELECT "municipality" FROM "municipalities" WHERE "pop_density_per_km"='757.5'; |
## Task
Generate a SQL query to answer the following question:
`In what municipality were there 757.5 people per km2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "municipalities" (
"municipality" text,
"type" text,
"district" text,
"area_km" text,
"population_2010" real,
"pop_density_per_km" text,
"no_of_barangays" real,
"municipal_mayor" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what municipality were there 757.5 people per km2?`:
```sql
|
SELECT COUNT("population_2010") FROM "municipalities" WHERE "municipality"='Cavinti'; |
## Task
Generate a SQL query to answer the following question:
`How many different counts of the population in Cavinti in 2010 are there?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "municipalities" (
"municipality" text,
"type" text,
"district" text,
"area_km" text,
"population_2010" real,
"pop_density_per_km" text,
"no_of_barangays" real,
"municipal_mayor" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many different counts of the population in Cavinti in 2010 are there?`:
```sql
|
SELECT "pop_density_per_km" FROM "municipalities" WHERE "municipal_mayor"='Boy Quiat'; |
## Task
Generate a SQL query to answer the following question:
`How many people per km2 are there in the municipality whose mayor is Boy Quiat?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "municipalities" (
"municipality" text,
"type" text,
"district" text,
"area_km" text,
"population_2010" real,
"pop_density_per_km" text,
"no_of_barangays" real,
"municipal_mayor" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people per km2 are there in the municipality whose mayor is Boy Quiat?`:
```sql
|
SELECT "num" FROM "table1_21696800_1" WHERE "u_s_viewers_million"='2.24'; |
## Task
Generate a SQL query to answer the following question:
`What's the number of the episode seen by 2.24 million people in the US?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21696800_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 `What's the number of the episode seen by 2.24 million people in the US?`:
```sql
|
SELECT "u_s_viewers_million" FROM "table1_21696800_1" WHERE "title"='\"Rabid\"'; |
## Task
Generate a SQL query to answer the following question:
`How many millions of people in the US saw the episode titled "Rabid"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21696800_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 `How many millions of people in the US saw the episode titled "Rabid"?`:
```sql
|
SELECT COUNT("num") FROM "table1_21696800_1" WHERE "directed_by"='Wayne Rose'; |
## Task
Generate a SQL query to answer the following question:
`How many different episode numbers are there for episodes directed by Wayne Rose?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21696800_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 `How many different episode numbers are there for episodes directed by Wayne Rose?`:
```sql
|
SELECT "u_s_viewers_million" FROM "table1_21696800_1" WHERE "title"='\"Kandor\"'; |
## Task
Generate a SQL query to answer the following question:
`How many millions of people in the US saw the episode titled "Kandor"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21696800_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 `How many millions of people in the US saw the episode titled "Kandor"?`:
```sql
|
SELECT "wins" FROM "nascar_sprint_cup_series" WHERE "starts"=10; |
## Task
Generate a SQL query to answer the following question:
`How many wins does he get when he starts at 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_sprint_cup_series" (
"year" real,
"starts" real,
"wins" 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 `How many wins does he get when he starts at 10?`:
```sql
|
SELECT MAX("wins") FROM "nascar_sprint_cup_series"; |
## Task
Generate a SQL query to answer the following question:
`How many wins does he have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_sprint_cup_series" (
"year" real,
"starts" real,
"wins" 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 `How many wins does he have?`:
```sql
|
SELECT "pct_cut" FROM "table1_21690339_1" WHERE "gas_storage"='80% full'; |
## Task
Generate a SQL query to answer the following question:
`What wast the percent cut for the nation with an 80% full gas storage?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21690339_1" (
"country" text,
"pct_of_imports_from_russia" text,
"pct_cut" text,
"diversification" text,
"gas_storage" text,
"alternative_fuel" text
);
### SQL
Given the database schema, here is the SQL query that answers `What wast the percent cut for the nation with an 80% full gas storage?`:
```sql
|
SELECT "gas_storage" FROM "table1_21690339_1" WHERE "alternative_fuel"='Yes'; |
## Task
Generate a SQL query to answer the following question:
`What was the gas storage status for the nation that had "yes" for alternative fuel?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21690339_1" (
"country" text,
"pct_of_imports_from_russia" text,
"pct_cut" text,
"diversification" text,
"gas_storage" text,
"alternative_fuel" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the gas storage status for the nation that had "yes" for alternative fuel?`:
```sql
|
SELECT "pct_cut" FROM "table1_21690339_1" WHERE "alternative_fuel"='Fuel oil stocks need only for industry'; |
## Task
Generate a SQL query to answer the following question:
`What was the percent cunt for the nation that had fuel oil stocks need only for industry as their fuel alternative?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21690339_1" (
"country" text,
"pct_of_imports_from_russia" text,
"pct_cut" text,
"diversification" text,
"gas_storage" text,
"alternative_fuel" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the percent cunt for the nation that had fuel oil stocks need only for industry as their fuel alternative?`:
```sql
|
SELECT "country" FROM "table1_21690339_1" WHERE "pct_of_imports_from_russia"='20%'; |
## Task
Generate a SQL query to answer the following question:
`What country had 20% imports from russia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21690339_1" (
"country" text,
"pct_of_imports_from_russia" text,
"pct_cut" text,
"diversification" text,
"gas_storage" text,
"alternative_fuel" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country had 20% imports from russia?`:
```sql
|
SELECT "country" FROM "table1_21690339_1" WHERE "pct_cut"='100%'; |
## Task
Generate a SQL query to answer the following question:
`What country had a 100% cut?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21690339_1" (
"country" text,
"pct_of_imports_from_russia" text,
"pct_cut" text,
"diversification" text,
"gas_storage" text,
"alternative_fuel" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country had a 100% cut?`:
```sql
|
SELECT "network" FROM "ratings" WHERE "viewers_in_millions"='2.74'; |
## Task
Generate a SQL query to answer the following question:
`What network garnered 2.74 million viewers for Supernatural?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ratings" (
"season" real,
"network" text,
"timeslot" text,
"season_premiere" text,
"season_finale" text,
"tv_season" text,
"rank_rank_denotes_the_relative_position_of_the_television_series_with_respect_to_other_prime_time_shows_on_the_cw_fox_nbc_cbs_and_abc" text,
"viewers_in_millions" text,
"rating_rating_is_the_percentage_of_all_households_tuned_into_the_program" text
);
### SQL
Given the database schema, here is the SQL query that answers `What network garnered 2.74 million viewers for Supernatural?`:
```sql
|
SELECT "tv_season" FROM "ratings" WHERE "viewers_in_millions"='2.52'; |
## Task
Generate a SQL query to answer the following question:
`What season had 2.52 million viewers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ratings" (
"season" real,
"network" text,
"timeslot" text,
"season_premiere" text,
"season_finale" text,
"tv_season" text,
"rank_rank_denotes_the_relative_position_of_the_television_series_with_respect_to_other_prime_time_shows_on_the_cw_fox_nbc_cbs_and_abc" text,
"viewers_in_millions" text,
"rating_rating_is_the_percentage_of_all_households_tuned_into_the_program" text
);
### SQL
Given the database schema, here is the SQL query that answers `What season had 2.52 million viewers?`:
```sql
|
SELECT "category" FROM "important_originating_express_trains" WHERE "train_no"='16609/16610'; |
## Task
Generate a SQL query to answer the following question:
`What is the category for trains numbered 16609/16610?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "important_originating_express_trains" (
"train_no" text,
"train_name" text,
"destination" text,
"category" text,
"frequency" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the category for trains numbered 16609/16610?`:
```sql
|
SELECT "train_name" FROM "important_originating_express_trains" WHERE "category"='Express' AND "frequency"='Weekly'; |
## Task
Generate a SQL query to answer the following question:
`What trains have a category of express and a weekly frequency?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "important_originating_express_trains" (
"train_no" text,
"train_name" text,
"destination" text,
"category" text,
"frequency" text
);
### SQL
Given the database schema, here is the SQL query that answers `What trains have a category of express and a weekly frequency?`:
```sql
|
SELECT "train_name" FROM "important_originating_express_trains" WHERE "destination"='Tuticorin'; |
## Task
Generate a SQL query to answer the following question:
`What is the train name that has a destination of Tuticorin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "important_originating_express_trains" (
"train_no" text,
"train_name" text,
"destination" text,
"category" text,
"frequency" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the train name that has a destination of Tuticorin?`:
```sql
|
SELECT "frequency" FROM "important_originating_express_trains" WHERE "train_no"='12671/12672'; |
## Task
Generate a SQL query to answer the following question:
`What is the frequency of trains numbered 12671/12672?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "important_originating_express_trains" (
"train_no" text,
"train_name" text,
"destination" text,
"category" text,
"frequency" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the frequency of trains numbered 12671/12672?`:
```sql
|
SELECT COUNT("destination") FROM "important_originating_express_trains" WHERE "frequency"='Weekly' AND "train_name"='AC Express'; |
## Task
Generate a SQL query to answer the following question:
`How many destinations have a weekly frequency and are named AC Express?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "important_originating_express_trains" (
"train_no" text,
"train_name" text,
"destination" text,
"category" text,
"frequency" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many destinations have a weekly frequency and are named AC Express?`:
```sql
|
SELECT COUNT("frequency") FROM "important_originating_express_trains" WHERE "destination"='Jaipur'; |
## Task
Generate a SQL query to answer the following question:
`What is the number of frequencies that have a destination of Jaipur?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "important_originating_express_trains" (
"train_no" text,
"train_name" text,
"destination" text,
"category" text,
"frequency" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of frequencies that have a destination of Jaipur?`:
```sql
|
SELECT MAX("pick_num") FROM "draft_picks" WHERE "player"='David Grannis'; |
## Task
Generate a SQL query to answer the following question:
`What is the pick # for player david grannis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round_num" real,
"pick_num" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the pick # for player david grannis?`:
```sql
|
SELECT "player" FROM "draft_picks" WHERE "college_junior_club_team"='Deerfield Academy (Massachusetts)'; |
## Task
Generate a SQL query to answer the following question:
`Which player belongs to deerfield academy (Massachusetts) college/junior/club team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round_num" real,
"pick_num" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player belongs to deerfield academy (Massachusetts) college/junior/club team?`:
```sql
|
SELECT "nationality" FROM "draft_picks" WHERE "college_junior_club_team"='Kitchener Rangers (OHL)'; |
## Task
Generate a SQL query to answer the following question:
`Which nationality is kitchener rangers (ohl) college/junior/club team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round_num" real,
"pick_num" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which nationality is kitchener rangers (ohl) college/junior/club team?`:
```sql
|
SELECT "nationality" FROM "draft_picks" WHERE "player"='Brian Wilks'; |
## Task
Generate a SQL query to answer the following question:
`Which nationality is player Brian Wilks?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round_num" real,
"pick_num" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which nationality is player Brian Wilks?`:
```sql
|
SELECT COUNT("position") FROM "draft_picks" WHERE "player"='Tom Glavine'; |
## Task
Generate a SQL query to answer the following question:
`How many positions is player Tom Glavine?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round_num" real,
"pick_num" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many positions is player Tom Glavine?`:
```sql
|
SELECT "directed_by" FROM "table1_21726793_1" WHERE "production_code"='2T5710'; |
## Task
Generate a SQL query to answer the following question:
`who directed the production code 2t5710?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21726793_1" (
"no" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text,
"u_s_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `who directed the production code 2t5710?`:
```sql
|
SELECT COUNT("production_code") FROM "table1_21726793_1" WHERE "u_s_viewers_million"='2.76'; |
## Task
Generate a SQL query to answer the following question:
`what is the total number o production code where us viewers is 2.76?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21726793_1" (
"no" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text,
"u_s_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the total number o production code where us viewers is 2.76?`:
```sql
|
SELECT "written_by" FROM "table1_21726793_1" WHERE "no"=2; |
## Task
Generate a SQL query to answer the following question:
`who wrote the no 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21726793_1" (
"no" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text,
"u_s_viewers_million" text
);
### SQL
Given the database schema, here is the SQL query that answers `who wrote the no 2?`:
```sql
|
SELECT "maac" FROM "year_by_year_statistics" WHERE "maac_tournament_result"='Quarterfinals'; |
## Task
Generate a SQL query to answer the following question:
`What is the maac in the macc tournament results is quarterfinals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year_statistics" (
"year" text,
"maac" text,
"overall" text,
"regular_season_results" text,
"maac_tournament_result" text,
"ncaa_seed" text,
"ncaa_round" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the maac in the macc tournament results is quarterfinals?`:
```sql
|
SELECT "maac" FROM "year_by_year_statistics" WHERE "overall"='26-8'; |
## Task
Generate a SQL query to answer the following question:
`What is the maac when the overall is 26-8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year_statistics" (
"year" text,
"maac" text,
"overall" text,
"regular_season_results" text,
"maac_tournament_result" text,
"ncaa_seed" text,
"ncaa_round" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the maac when the overall is 26-8?`:
```sql
|
SELECT COUNT("maac") FROM "year_by_year_statistics" WHERE "ncaa_seed"='14th' AND "overall"='20-10'; |
## Task
Generate a SQL query to answer the following question:
`How many maac are there that have 14th as the ncaa and the overall is 20-10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year_statistics" (
"year" text,
"maac" text,
"overall" text,
"regular_season_results" text,
"maac_tournament_result" text,
"ncaa_seed" text,
"ncaa_round" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many maac are there that have 14th as the ncaa and the overall is 20-10?`:
```sql
|
SELECT COUNT("overall") FROM "year_by_year_statistics" WHERE "year"='2010-2011'; |
## Task
Generate a SQL query to answer the following question:
`How many overall in the year 2010-2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year_statistics" (
"year" text,
"maac" text,
"overall" text,
"regular_season_results" text,
"maac_tournament_result" text,
"ncaa_seed" text,
"ncaa_round" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many overall in the year 2010-2011?`:
```sql
|
SELECT "year" FROM "year_by_year_statistics" WHERE "overall"='29-4'; |
## Task
Generate a SQL query to answer the following question:
`In which year is the overall 29-4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year_statistics" (
"year" text,
"maac" text,
"overall" text,
"regular_season_results" text,
"maac_tournament_result" text,
"ncaa_seed" text,
"ncaa_round" text
);
### SQL
Given the database schema, here is the SQL query that answers `In which year is the overall 29-4?`:
```sql
|
SELECT "regular_season_results" FROM "year_by_year_statistics" WHERE "year"='2011-2012'; |
## Task
Generate a SQL query to answer the following question:
`What is the regular season results for the year 2011-2012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year_statistics" (
"year" text,
"maac" text,
"overall" text,
"regular_season_results" text,
"maac_tournament_result" text,
"ncaa_seed" text,
"ncaa_round" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the regular season results for the year 2011-2012?`:
```sql
|
SELECT COUNT("driver") FROM "table1_2175858_1" WHERE "race_time"='3:09:45'; |
## Task
Generate a SQL query to answer the following question:
`How many drivers had a time of 3:09:45?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_2175858_1" (
"year" real,
"date" text,
"driver" text,
"team" text,
"manufacturer" text,
"laps" text,
"miles_km" text,
"race_time" text,
"average_speed_mph" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many drivers had a time of 3:09:45?`:
```sql
|
SELECT COUNT("driver") FROM "table1_2175858_1" WHERE "laps"='300' AND "average_speed_mph"='103.594'; |
## Task
Generate a SQL query to answer the following question:
`How many drivers drove 300 laps at average speed of 103.594?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_2175858_1" (
"year" real,
"date" text,
"driver" text,
"team" text,
"manufacturer" text,
"laps" text,
"miles_km" text,
"race_time" text,
"average_speed_mph" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many drivers drove 300 laps at average speed of 103.594?`:
```sql
|
SELECT COUNT("date") FROM "table1_2175858_1" WHERE "average_speed_mph"='102.003'; |
## Task
Generate a SQL query to answer the following question:
`How many dates had an average speed of 102.003?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_2175858_1" (
"year" real,
"date" text,
"driver" text,
"team" text,
"manufacturer" text,
"laps" text,
"miles_km" text,
"race_time" text,
"average_speed_mph" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many dates had an average speed of 102.003?`:
```sql
|
SELECT "laps" FROM "table1_2175858_1" WHERE "year"=2009; |
## Task
Generate a SQL query to answer the following question:
`How many laps were driven in 2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_2175858_1" (
"year" real,
"date" text,
"driver" text,
"team" text,
"manufacturer" text,
"laps" text,
"miles_km" text,
"race_time" text,
"average_speed_mph" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many laps were driven in 2009?`:
```sql
|
SELECT "laps" FROM "table1_2175858_1" WHERE "race_time"='3:03:50'; |
## Task
Generate a SQL query to answer the following question:
`How many laps were completed in the race with time of 3:03:50?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_2175858_1" (
"year" real,
"date" text,
"driver" text,
"team" text,
"manufacturer" text,
"laps" text,
"miles_km" text,
"race_time" text,
"average_speed_mph" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many laps were completed in the race with time of 3:03:50?`:
```sql
|
SELECT "miles_km" FROM "table1_2175858_1" WHERE "average_speed_mph"='116.81'; |
## Task
Generate a SQL query to answer the following question:
`How many miles were driven with the average speed at 116.81?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_2175858_1" (
"year" real,
"date" text,
"driver" text,
"team" text,
"manufacturer" text,
"laps" text,
"miles_km" text,
"race_time" text,
"average_speed_mph" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many miles were driven with the average speed at 116.81?`:
```sql
|
SELECT "season_no" FROM "table1_21781578_2" WHERE "production_code"='E2110'; |
## Task
Generate a SQL query to answer the following question:
`What was the season number for production code E2110?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21781578_2" (
"season_no" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the season number for production code E2110?`:
```sql
|
SELECT "original_air_date" FROM "table1_21781578_2" WHERE "season_no"=2; |
## Task
Generate a SQL query to answer the following question:
`What was the original air date for season number 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21781578_2" (
"season_no" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the original air date for season number 2?`:
```sql
|
SELECT "season_no" FROM "table1_21781578_2" WHERE "directed_by"='John David Coles'; |
## Task
Generate a SQL query to answer the following question:
`What was the season number episode directed by John David Coles?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21781578_2" (
"season_no" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the season number episode directed by John David Coles?`:
```sql
|
SELECT "u_s_viewers_millions" FROM "table1_21781578_2" WHERE "directed_by"='Steve Shill' AND "production_code"='E2102'; |
## Task
Generate a SQL query to answer the following question:
`What was the number of US Viewers in the episode directed by Steve Shill and having a production code of E2102?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21781578_2" (
"season_no" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the number of US Viewers in the episode directed by Steve Shill and having a production code of E2102?`:
```sql
|
SELECT COUNT("season_no") FROM "table1_21781578_2" WHERE "u_s_viewers_millions"='12.30'; |
## Task
Generate a SQL query to answer the following question:
`What was the number of season number entries that had US Viewers of 12.30 million?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21781578_2" (
"season_no" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the number of season number entries that had US Viewers of 12.30 million?`:
```sql
|
SELECT "date" FROM "regular_season" WHERE "week"=3; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game in week 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"location" text,
"final_score" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game in week 3?`:
```sql
|
SELECT "final_score" FROM "regular_season" WHERE "opponent"='@ Roughriders'; |
## Task
Generate a SQL query to answer the following question:
`What was the final score when the game was @ roughriders?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"location" text,
"final_score" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the final score when the game was @ roughriders?`:
```sql
|
SELECT COUNT("week") FROM "regular_season" WHERE "location"='Ivor Wynne Stadium'; |
## Task
Generate a SQL query to answer the following question:
`What was the total number of weeks where the game played Ivor Wynne Stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"location" text,
"final_score" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the total number of weeks where the game played Ivor Wynne Stadium?`:
```sql
|
SELECT "location" FROM "regular_season" WHERE "opponent"='@ Roughriders'; |
## Task
Generate a SQL query to answer the following question:
`What was the location for when the opponent was @ roughriders?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"location" text,
"final_score" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the location for when the opponent was @ roughriders?`:
```sql
|
SELECT "final_score" FROM "regular_season" WHERE "attendance"=25598; |
## Task
Generate a SQL query to answer the following question:
`What was the final score when the attendance was 25598?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"location" text,
"final_score" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the final score when the attendance was 25598?`:
```sql
|
SELECT "location" FROM "regular_season" WHERE "date"='October 6'; |
## Task
Generate a SQL query to answer the following question:
`What location was the game on October 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"location" text,
"final_score" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What location was the game on October 6?`:
```sql
|
SELECT MIN("ranking") FROM "nielsen_ratings" WHERE "viewers_in_millions_of_households"='11.2'; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest rating with 11.2 million viewers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nielsen_ratings" (
"season" text,
"timeslot_times_listed_are_eastern_time" text,
"season_premiere" text,
"season_finale" text,
"tv_season" text,
"ranking" real,
"viewers_in_millions_of_households" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the lowest rating with 11.2 million viewers?`:
```sql
|
SELECT "season_premiere" FROM "nielsen_ratings" WHERE "season_finale"='May 19, 1997'; |
## Task
Generate a SQL query to answer the following question:
`When did was the start of the season that ended May 19, 1997?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nielsen_ratings" (
"season" text,
"timeslot_times_listed_are_eastern_time" text,
"season_premiere" text,
"season_finale" text,
"tv_season" text,
"ranking" real,
"viewers_in_millions_of_households" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did was the start of the season that ended May 19, 1997?`:
```sql
|
SELECT "season_finale" FROM "nielsen_ratings" WHERE "ranking"=73; |
## Task
Generate a SQL query to answer the following question:
`When did the season finale ranked at 73 first air?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nielsen_ratings" (
"season" text,
"timeslot_times_listed_are_eastern_time" text,
"season_premiere" text,
"season_finale" text,
"tv_season" text,
"ranking" real,
"viewers_in_millions_of_households" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the season finale ranked at 73 first air?`:
```sql
|
SELECT COUNT("tv_season") FROM "nielsen_ratings" WHERE "viewers_in_millions_of_households"='10.2'; |
## Task
Generate a SQL query to answer the following question:
`Which season received 10.2 million viewers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nielsen_ratings" (
"season" text,
"timeslot_times_listed_are_eastern_time" text,
"season_premiere" text,
"season_finale" text,
"tv_season" text,
"ranking" real,
"viewers_in_millions_of_households" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which season received 10.2 million viewers?`:
```sql
|
SELECT "name" FROM "names_and_fleet_details" WHERE "withdrawn"='19/05/2002'; |
## Task
Generate a SQL query to answer the following question:
`When 19/05/2002 is the date of withdrawn what is the name?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "names_and_fleet_details" (
"original_number" text,
"uic_number" text,
"name" text,
"constructer" text,
"constructor_number" real,
"year" real,
"withdrawn" text,
"kilometers_worked" real
);
### SQL
Given the database schema, here is the SQL query that answers `When 19/05/2002 is the date of withdrawn what is the name?`:
```sql
|
SELECT MAX("year") FROM "names_and_fleet_details" WHERE "name"='\"Virgen del Perpetuo Socorro\"'; |
## Task
Generate a SQL query to answer the following question:
`When "virgen del perpetuo socorro" is the name what is the highest year?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "names_and_fleet_details" (
"original_number" text,
"uic_number" text,
"name" text,
"constructer" text,
"constructor_number" real,
"year" real,
"withdrawn" text,
"kilometers_worked" real
);
### SQL
Given the database schema, here is the SQL query that answers `When "virgen del perpetuo socorro" is the name what is the highest year?`:
```sql
|
SELECT MIN("year") FROM "names_and_fleet_details" WHERE "original_number"='2008 T'; |
## Task
Generate a SQL query to answer the following question:
`When 2008 t is the original number what is the lowest year?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "names_and_fleet_details" (
"original_number" text,
"uic_number" text,
"name" text,
"constructer" text,
"constructor_number" real,
"year" real,
"withdrawn" text,
"kilometers_worked" real
);
### SQL
Given the database schema, here is the SQL query that answers `When 2008 t is the original number what is the lowest year?`:
```sql
|
SELECT "withdrawn" FROM "names_and_fleet_details" WHERE "name"='\"Virgen de Gracia\"'; |
## Task
Generate a SQL query to answer the following question:
`When "virgen de gracia" is the name what is the date of withdrawn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "names_and_fleet_details" (
"original_number" text,
"uic_number" text,
"name" text,
"constructer" text,
"constructor_number" real,
"year" real,
"withdrawn" text,
"kilometers_worked" real
);
### SQL
Given the database schema, here is the SQL query that answers `When "virgen de gracia" is the name what is the date of withdrawn?`:
```sql
|
SELECT "original_number" FROM "names_and_fleet_details" WHERE "withdrawn"='9/07/1999'; |
## Task
Generate a SQL query to answer the following question:
`When 9/07/1999 is the date of withdrawn what is the original number?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "names_and_fleet_details" (
"original_number" text,
"uic_number" text,
"name" text,
"constructer" text,
"constructor_number" real,
"year" real,
"withdrawn" text,
"kilometers_worked" real
);
### SQL
Given the database schema, here is the SQL query that answers `When 9/07/1999 is the date of withdrawn what is the original number?`:
```sql
|
SELECT "stage_winner" FROM "jersey_progress" WHERE "metas_volantes_classification"='Michael Albasini'; |
## Task
Generate a SQL query to answer the following question:
`WHO WAS THE STAGE WINNER IN THE STAGE WHERE MICHAEL ALBASINI WON THE METAS VOLANTES CLASSIFICATION?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jersey_progress" (
"stage_winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"metas_volantes_classification" text,
"team_classification" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHO WAS THE STAGE WINNER IN THE STAGE WHERE MICHAEL ALBASINI WON THE METAS VOLANTES CLASSIFICATION?`:
```sql
|
SELECT "mountains_classification" FROM "jersey_progress" WHERE "metas_volantes_classification"='Michael Albasini'; |
## Task
Generate a SQL query to answer the following question:
`Who got the mountains classification when Michael Albasini won the stage?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jersey_progress" (
"stage_winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"metas_volantes_classification" text,
"team_classification" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who got the mountains classification when Michael Albasini won the stage?`:
```sql
|
SELECT "attendance" FROM "regular_season" WHERE "date"='July 10'; |
## Task
Generate a SQL query to answer the following question:
`How many people were present at the July 10 game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"location" text,
"final_score" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people were present at the July 10 game?`:
```sql
|
SELECT "final_score" FROM "regular_season" WHERE "date"='July 10'; |
## Task
Generate a SQL query to answer the following question:
`What was the final score of the game played on July 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"location" text,
"final_score" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the final score of the game played on July 10?`:
```sql
|
SELECT "record" FROM "regular_season" WHERE "location"='BC Place Stadium'; |
## Task
Generate a SQL query to answer the following question:
`What's the record achieved in the gamed played at BC Place Stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"location" text,
"final_score" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the record achieved in the gamed played at BC Place Stadium?`:
```sql
|
SELECT "week" FROM "regular_season" WHERE "date"='July 10'; |
## Task
Generate a SQL query to answer the following question:
`During what week was the July 10 game played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"location" text,
"final_score" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `During what week was the July 10 game played?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.