output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT MIN("total") FROM "final_standings" WHERE "1500_m"=2; |
## Task
Generate a SQL query to answer the following question:
`Name the least total for 1500m for 2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_standings" (
"place" real,
"athlete" text,
"long_jump" real,
"javelin" real,
"200_m" real,
"discus" real,
"1500_m" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least total for 1500m for 2`:
```sql
|
SELECT MAX("javelin") FROM "final_standings" WHERE "200_m"=5; |
## Task
Generate a SQL query to answer the following question:
`Name the max javelin for 200m for 5`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_standings" (
"place" real,
"athlete" text,
"long_jump" real,
"javelin" real,
"200_m" real,
"discus" real,
"1500_m" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the max javelin for 200m for 5`:
```sql
|
SELECT COUNT("long_jump") FROM "final_standings" WHERE "1500_m"=2; |
## Task
Generate a SQL query to answer the following question:
`Name the number of long jump for 1500m being 2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_standings" (
"place" real,
"athlete" text,
"long_jump" real,
"javelin" real,
"200_m" real,
"discus" real,
"1500_m" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the number of long jump for 1500m being 2`:
```sql
|
SELECT "result" FROM "fixtures_and_results" WHERE "round"='13'; |
## Task
Generate a SQL query to answer the following question:
`Name the result for round 13`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the result for round 13`:
```sql
|
SELECT "attendance" FROM "fixtures_and_results" WHERE "result"='Loss' AND "opponent"='Salford City Reds'; |
## Task
Generate a SQL query to answer the following question:
`Name the attendance for loss result and salford city reds`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the attendance for loss result and salford city reds`:
```sql
|
SELECT COUNT("date") FROM "fixtures_and_results" WHERE "round"='26'; |
## Task
Generate a SQL query to answer the following question:
`Name the total number of date for round 26`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of date for round 26`:
```sql
|
SELECT "attendance" FROM "fixtures_and_results" WHERE "round"='23'; |
## Task
Generate a SQL query to answer the following question:
`Name the attendace for 23 round`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the attendace for 23 round`:
```sql
|
SELECT COUNT("opponent") FROM "fixtures_and_results" WHERE "date"='05/09/2009'; |
## Task
Generate a SQL query to answer the following question:
`Name the total number of opponets for 05/09/2009`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of opponets for 05/09/2009`:
```sql
|
SELECT "name" FROM "list" WHERE "population_density"='200'; |
## Task
Generate a SQL query to answer the following question:
`What is the only city name with a population density of 200?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list" (
"name" text,
"municipal_status" text,
"census_division" text,
"population_2011" real,
"population_2006" real,
"change_pct" text,
"area_km" text,
"population_density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the only city name with a population density of 200?`:
```sql
|
SELECT "census_division" FROM "list" WHERE "name"='Stratford'; |
## Task
Generate a SQL query to answer the following question:
`What is the census division for the name Stratford?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list" (
"name" text,
"municipal_status" text,
"census_division" text,
"population_2011" real,
"population_2006" real,
"change_pct" text,
"area_km" text,
"population_density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the census division for the name Stratford?`:
```sql
|
SELECT "change_pct" FROM "list" WHERE "area_km"='247.21'; |
## Task
Generate a SQL query to answer the following question:
`What is the change (%) when the area size (km2) is 247.21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list" (
"name" text,
"municipal_status" text,
"census_division" text,
"population_2011" real,
"population_2006" real,
"change_pct" text,
"area_km" text,
"population_density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the change (%) when the area size (km2) is 247.21?`:
```sql
|
SELECT "municipal_status" FROM "list" WHERE "population_density"='895.5'; |
## Task
Generate a SQL query to answer the following question:
`What is the municipal status where the population density is 895.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list" (
"name" text,
"municipal_status" text,
"census_division" text,
"population_2011" real,
"population_2006" real,
"change_pct" text,
"area_km" text,
"population_density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the municipal status where the population density is 895.5?`:
```sql
|
SELECT "census_division" FROM "list" WHERE "name"='Kenora'; |
## Task
Generate a SQL query to answer the following question:
`What is the census division for the city named Kenora?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list" (
"name" text,
"municipal_status" text,
"census_division" text,
"population_2011" real,
"population_2006" real,
"change_pct" text,
"area_km" text,
"population_density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the census division for the city named Kenora?`:
```sql
|
SELECT MIN("area_ha") FROM "administrative_divisions" WHERE "no_of_villages"=18; |
## Task
Generate a SQL query to answer the following question:
`If there are 18 villages, what is the minimum area ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "administrative_divisions" (
"nr" real,
"district" text,
"former_name" text,
"area_ha" real,
"population_2005" real,
"no_of_villages" real,
"density_persons_ha" text
);
### SQL
Given the database schema, here is the SQL query that answers `If there are 18 villages, what is the minimum area ?`:
```sql
|
SELECT "former_name" FROM "administrative_divisions" WHERE "population_2005"=572; |
## Task
Generate a SQL query to answer the following question:
`With the population in 2005 of 572, what is the former name?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "administrative_divisions" (
"nr" real,
"district" text,
"former_name" text,
"area_ha" real,
"population_2005" real,
"no_of_villages" real,
"density_persons_ha" text
);
### SQL
Given the database schema, here is the SQL query that answers `With the population in 2005 of 572, what is the former name?`:
```sql
|
SELECT COUNT("no_of_villages") FROM "administrative_divisions" WHERE "density_persons_ha"='5.5'; |
## Task
Generate a SQL query to answer the following question:
`How many villages have a density persons/ha of 5.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "administrative_divisions" (
"nr" real,
"district" text,
"former_name" text,
"area_ha" real,
"population_2005" real,
"no_of_villages" real,
"density_persons_ha" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many villages have a density persons/ha of 5.5?`:
```sql
|
SELECT "score" FROM "mixed_doubles_8_3_titles_5_runner_ups" WHERE "opponents"='Irving Wright Hazel Hotchkiss Wightman'; |
## Task
Generate a SQL query to answer the following question:
`What were the scores for matches with irving wright hazel hotchkiss wightman?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_doubles_8_3_titles_5_runner_ups" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the scores for matches with irving wright hazel hotchkiss wightman?`:
```sql
|
SELECT COUNT("year") FROM "mixed_doubles_8_3_titles_5_runner_ups" WHERE "score"='10–12, 6–1, 6–3'; |
## Task
Generate a SQL query to answer the following question:
`How many years had scores of 10–12, 6–1, 6–3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_doubles_8_3_titles_5_runner_ups" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years had scores of 10–12, 6–1, 6–3?`:
```sql
|
SELECT "partner" FROM "mixed_doubles_8_3_titles_5_runner_ups" WHERE "opponents"='Harry Johnson Hazel Hotchkiss Wightman'; |
## Task
Generate a SQL query to answer the following question:
`Who were the partners during times that harry johnson hazel hotchkiss wightman was the opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_doubles_8_3_titles_5_runner_ups" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the partners during times that harry johnson hazel hotchkiss wightman was the opponent?`:
```sql
|
SELECT "outcome" FROM "mixed_doubles_8_3_titles_5_runner_ups" WHERE "opponents"='Bill Tilden Florence Ballin'; |
## Task
Generate a SQL query to answer the following question:
`What were the outcomes of matches with bill tilden florence ballin as opponents?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_doubles_8_3_titles_5_runner_ups" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the outcomes of matches with bill tilden florence ballin as opponents?`:
```sql
|
SELECT MIN("year") FROM "mixed_doubles_8_3_titles_5_runner_ups"; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_doubles_8_3_titles_5_runner_ups" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year?`:
```sql
|
SELECT "survivor_count" FROM "table1_21304131_2" WHERE "directed_by"='Gwyneth Horder-Payton'; |
## Task
Generate a SQL query to answer the following question:
`What was the survivor count for the episode directed by Gwyneth Horder-Payton?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21304131_2" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"survivor_count" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the survivor count for the episode directed by Gwyneth Horder-Payton?`:
```sql
|
SELECT "original_air_date" FROM "table1_21304131_2" WHERE "no_in_series"=65; |
## Task
Generate a SQL query to answer the following question:
`When did series number 65 originally air?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21304131_2" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"survivor_count" real
);
### SQL
Given the database schema, here is the SQL query that answers `When did series number 65 originally air?`:
```sql
|
SELECT "production_code" FROM "table1_21304155_1" WHERE "directed_by"='David Solomon'; |
## Task
Generate a SQL query to answer the following question:
`What is the production code of the episode directed by David Solomon? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21304155_1" (
"no_in_series" 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 is the production code of the episode directed by David Solomon? `:
```sql
|
SELECT "written_by" FROM "table1_21304155_1" WHERE "production_code"='BN103'; |
## Task
Generate a SQL query to answer the following question:
`Who wrote the episode with the production code of BN103? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21304155_1" (
"no_in_series" 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 `Who wrote the episode with the production code of BN103? `:
```sql
|
SELECT "original_air_date" FROM "table1_21304155_1" WHERE "u_s_viewers_millions"='4.08'; |
## Task
Generate a SQL query to answer the following question:
`What was the original air date of the episode that had 4.08 million U.S. viewers? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21304155_1" (
"no_in_series" 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 of the episode that had 4.08 million U.S. viewers? `:
```sql
|
SELECT "location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4" FROM "table1_213088_1" WHERE "net_capacity_mw"=950; |
## Task
Generate a SQL query to answer the following question:
`List all the locations where net capacity is 950?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_213088_1" (
"location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4" text,
"reactor_type" text,
"status" text,
"net_capacity_mw" real,
"gross_capacity_mw" real
);
### SQL
Given the database schema, here is the SQL query that answers `List all the locations where net capacity is 950?`:
```sql
|
SELECT "location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4" FROM "table1_213088_1" WHERE "reactor_type"='RBMK-1000'; |
## Task
Generate a SQL query to answer the following question:
`List all the locations with a RBMK-1000 reactor.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_213088_1" (
"location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4" text,
"reactor_type" text,
"status" text,
"net_capacity_mw" real,
"gross_capacity_mw" real
);
### SQL
Given the database schema, here is the SQL query that answers `List all the locations with a RBMK-1000 reactor.`:
```sql
|
SELECT MIN("gross_capacity_mw") FROM "table1_213088_1" WHERE "net_capacity_mw"=1380; |
## Task
Generate a SQL query to answer the following question:
`What is the gross capacity where the net capacity is 1380?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_213088_1" (
"location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4" text,
"reactor_type" text,
"status" text,
"net_capacity_mw" real,
"gross_capacity_mw" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the gross capacity where the net capacity is 1380?`:
```sql
|
SELECT "original_air_date" FROM "table1_21313498_1" WHERE "u_s_viewers_millions"='3.3' AND "written_by"='Rob Wright'; |
## Task
Generate a SQL query to answer the following question:
`when was the premiere when a 3.3 millions of North American watched the episode whose writer was Rob Wright?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21313498_1" (
"no_in_series" real,
"no_in_season" 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 `when was the premiere when a 3.3 millions of North American watched the episode whose writer was Rob Wright?`:
```sql
|
SELECT "title" FROM "table1_21313498_1" WHERE "production_code"='62015-08-162'; |
## Task
Generate a SQL query to answer the following question:
`what is the name of the episode which the production code is 62015-08-162`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21313498_1" (
"no_in_series" real,
"no_in_season" 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 is the name of the episode which the production code is 62015-08-162`:
```sql
|
SELECT "written_by" FROM "table1_21313498_1" WHERE "no_in_season"=11; |
## Task
Generate a SQL query to answer the following question:
`in the number of episode in season is 11, who was the writer?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21313498_1" (
"no_in_series" real,
"no_in_season" 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 `in the number of episode in season is 11, who was the writer?`:
```sql
|
SELECT "production_code" FROM "table1_21312959_1" WHERE "title"='\"A Wrong Day''s Journey into Right\"'; |
## Task
Generate a SQL query to answer the following question:
`What is the production code for the episode title "A Wrong Day's Journey into Right"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21312959_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"us_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the production code for the episode title "A Wrong Day's Journey into Right"?`:
```sql
|
SELECT COUNT("no_in_season") FROM "table1_21312959_1" WHERE "us_viewers_millions"='5.0'; |
## Task
Generate a SQL query to answer the following question:
`How many episodes had the us viewers (millions) figure of 5.0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21312959_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"us_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many episodes had the us viewers (millions) figure of 5.0?`:
```sql
|
SELECT "written_by" FROM "table1_21312959_1" WHERE "no_in_series"=129; |
## Task
Generate a SQL query to answer the following question:
`Who are the writers for the episode number in series 129?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21312959_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"us_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the writers for the episode number in series 129?`:
```sql
|
SELECT "us_viewers_millions" FROM "table1_21312959_1" WHERE "title"='\"Witch Wars\"'; |
## Task
Generate a SQL query to answer the following question:
`What is the us viewers (millions) figure for the episode titled "Witch Wars"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21312959_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"us_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the us viewers (millions) figure for the episode titled "Witch Wars"?`:
```sql
|
SELECT MAX("no_in_season") FROM "table1_21312845_1" WHERE "directed_by"='Chris Long'; |
## Task
Generate a SQL query to answer the following question:
`What is the latest episode in the season directed by Chris Long?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21312845_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the latest episode in the season directed by Chris Long?`:
```sql
|
SELECT "written_by" FROM "table1_21312845_1" WHERE "directed_by"='David Straiton'; |
## Task
Generate a SQL query to answer the following question:
`Who wrote the episodes directed by David Straiton?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21312845_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who wrote the episodes directed by David Straiton?`:
```sql
|
SELECT "directed_by" FROM "table1_21312845_1" WHERE "production_code">4301103.585233785 AND "written_by"='Curtis Kheel'; |
## Task
Generate a SQL query to answer the following question:
`Who directed the episode with a production code greater than 4301103.585233785 that was written by Curtis Kheel?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21312845_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed the episode with a production code greater than 4301103.585233785 that was written by Curtis Kheel?`:
```sql
|
SELECT COUNT("result") FROM "fixtures_and_results" WHERE "date"='19/06/2009'; |
## Task
Generate a SQL query to answer the following question:
`How many results were there on 19/06/2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many results were there on 19/06/2009?`:
```sql
|
SELECT "round" FROM "fixtures_and_results" WHERE "date"='19/06/2009'; |
## Task
Generate a SQL query to answer the following question:
`What is the round number for the date 19/06/2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the round number for the date 19/06/2009?`:
```sql
|
SELECT "round" FROM "fixtures_and_results" WHERE "venue"='Stade de la Méditerranée'; |
## Task
Generate a SQL query to answer the following question:
`What is the round number for the venue of Stade de la Méditerranée?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the round number for the venue of Stade de la Méditerranée?`:
```sql
|
SELECT "score" FROM "fixtures_and_results" WHERE "date"='17/07/2009'; |
## Task
Generate a SQL query to answer the following question:
`What was the score when the date was 17/07/2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score when the date was 17/07/2009?`:
```sql
|
SELECT "position" FROM "round_five" WHERE "player"='Marc Parenteau'; |
## Task
Generate a SQL query to answer the following question:
`What is Marc Parenteau's position? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_five" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Marc Parenteau's position? `:
```sql
|
SELECT MIN("pick_num") FROM "round_five" WHERE "college"='McGill'; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest pick number for McGill?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_five" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest pick number for McGill?`:
```sql
|
SELECT "college" FROM "round_five" WHERE "player"='Derik Fury'; |
## Task
Generate a SQL query to answer the following question:
`Derik Fury plays for which college? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_five" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Derik Fury plays for which college? `:
```sql
|
SELECT COUNT("college") FROM "round_five" WHERE "player"='David Kasouf'; |
## Task
Generate a SQL query to answer the following question:
`David Kasouf plays for how many colleges? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_five" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `David Kasouf plays for how many colleges? `:
```sql
|
SELECT "position" FROM "round_five" WHERE "cfl_team"='Hamilton Tiger-Cats'; |
## Task
Generate a SQL query to answer the following question:
`What position was drafted by the Hamilton Tiger-Cats? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_five" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What position was drafted by the Hamilton Tiger-Cats? `:
```sql
|
SELECT "winning_driver" FROM "race_calendar_and_results" WHERE "fastest_lap"='Jamie Green'; |
## Task
Generate a SQL query to answer the following question:
`Who won when Jamie Green had the best lap?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_calendar_and_results" (
"round" real,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won when Jamie Green had the best lap?`:
```sql
|
SELECT "fastest_lap" FROM "race_calendar_and_results" WHERE "circuit"='Motorsport Arena Oschersleben'; |
## Task
Generate a SQL query to answer the following question:
`Who had the fasted lap in motorsport arena oschersleben?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_calendar_and_results" (
"round" real,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had the fasted lap in motorsport arena oschersleben?`:
```sql
|
SELECT "date" FROM "race_calendar_and_results" WHERE "pole_position"='Oliver Jarvis'; |
## Task
Generate a SQL query to answer the following question:
`When did Oliver Jarvis have pole position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_calendar_and_results" (
"round" real,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did Oliver Jarvis have pole position?`:
```sql
|
SELECT "college" FROM "round_three" WHERE "cfl_team"='Hamilton Tiger-Cats'; |
## Task
Generate a SQL query to answer the following question:
`What college did the player for the Hamilton Tiger-Cats go to? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_three" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What college did the player for the Hamilton Tiger-Cats go to? `:
```sql
|
SELECT COUNT("player") FROM "round_three" WHERE "position"='DT'; |
## Task
Generate a SQL query to answer the following question:
`How many players are at the DT position? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_three" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many players are at the DT position? `:
```sql
|
SELECT "cfl_team" FROM "round_three" WHERE "college"='Nebraska'; |
## Task
Generate a SQL query to answer the following question:
`What team does the player who went to Nebraska play for? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_three" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team does the player who went to Nebraska play for? `:
```sql
|
SELECT MAX("pick_num") FROM "round_three"; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number any of the players were picked at? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_three" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number any of the players were picked at? `:
```sql
|
SELECT "player" FROM "round_three" WHERE "cfl_team"='Winnipeg Blue Bombers'; |
## Task
Generate a SQL query to answer the following question:
`Which player plays for the Winnipeg Blue Bombers? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_three" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player plays for the Winnipeg Blue Bombers? `:
```sql
|
SELECT "pick_num" FROM "round_one" WHERE "player"='Wes Lysack'; |
## Task
Generate a SQL query to answer the following question:
`What is the pick # for player wes lysack?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_one" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the pick # for player wes lysack?`:
```sql
|
SELECT COUNT("cfl_team") FROM "round_one" WHERE "pick_num"=5; |
## Task
Generate a SQL query to answer the following question:
`How many clf teams have a pick # of 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_one" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many clf teams have a pick # of 5?`:
```sql
|
SELECT COUNT("position") FROM "round_one" WHERE "college"='Utah'; |
## Task
Generate a SQL query to answer the following question:
`How many total positions are there for utah college?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_one" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many total positions are there for utah college?`:
```sql
|
SELECT "cfl_team" FROM "round_one" WHERE "college"='Manitoba'; |
## Task
Generate a SQL query to answer the following question:
`Which cfl team is manitoba college?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_one" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which cfl team is manitoba college?`:
```sql
|
SELECT "position" FROM "round_one" WHERE "cfl_team"='Edmonton Eskimos' AND "college"='Weber State'; |
## Task
Generate a SQL query to answer the following question:
`Which position is cfl team edmonton eskimos for weber state college?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_one" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which position is cfl team edmonton eskimos for weber state college?`:
```sql
|
SELECT MAX("pick_num") FROM "round_one" WHERE "player"='Wes Lysack'; |
## Task
Generate a SQL query to answer the following question:
`What is the pick # for player wes lysack?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_one" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the pick # for player wes lysack?`:
```sql
|
SELECT COUNT("series_num") FROM "table1_21328899_1" WHERE "written_by"='Joe Sachs' AND "title"='\"I Feel Good\"'; |
## Task
Generate a SQL query to answer the following question:
`When "i feel good" is the title and joe sachs is the writer how many series numbers are there?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21328899_1" (
"series_num" real,
"season_num" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When "i feel good" is the title and joe sachs is the writer how many series numbers are there?`:
```sql
|
SELECT COUNT("length") FROM "special_stages" WHERE "time"='14:33.9'; |
## Task
Generate a SQL query to answer the following question:
`How many stages of the rally took 14:33.9 for the leader to finish?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "special_stages" (
"day" text,
"stage" text,
"time_gmt" text,
"name" text,
"length" text,
"winner" text,
"time" text,
"avg_spd" text,
"rally_leader" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many stages of the rally took 14:33.9 for the leader to finish?`:
```sql
|
SELECT "stage" FROM "special_stages" WHERE "rally_leader"='Sébastien Loeb' AND "name"='Tempo 2'; |
## Task
Generate a SQL query to answer the following question:
`In which special stage named Tempo 2 was Sébastien Loeb the leader?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "special_stages" (
"day" text,
"stage" text,
"time_gmt" text,
"name" text,
"length" text,
"winner" text,
"time" text,
"avg_spd" text,
"rally_leader" text
);
### SQL
Given the database schema, here is the SQL query that answers `In which special stage named Tempo 2 was Sébastien Loeb the leader?`:
```sql
|
SELECT "winner" FROM "special_stages" WHERE "time_gmt"='18:54'; |
## Task
Generate a SQL query to answer the following question:
`Which ralliers won the stages that were at 18:54 GMT?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "special_stages" (
"day" text,
"stage" text,
"time_gmt" text,
"name" text,
"length" text,
"winner" text,
"time" text,
"avg_spd" text,
"rally_leader" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which ralliers won the stages that were at 18:54 GMT?`:
```sql
|
SELECT MIN("total_episodes") FROM "table1_21344397_3" WHERE "title"='\"Bouncy Ball\"'; |
## Task
Generate a SQL query to answer the following question:
`What is episode is "Bouncy Ball"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21344397_3" (
"episode_number" real,
"total_episodes" real,
"title" text,
"original_uk_broadcast_by" text,
"original_uk_airdate" text,
"dvd_reference" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is episode is "Bouncy Ball"?`:
```sql
|
SELECT COUNT("location") FROM "table1_21330550_2" WHERE "big_ten_team"='#12 Michigan State'; |
## Task
Generate a SQL query to answer the following question:
`How many locations have #12 Michigan State as the big ten team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21330550_2" (
"date" text,
"time" text,
"acc_team" text,
"big_ten_team" text,
"location" text,
"television" text,
"attendance" real,
"winner" text,
"challenge_leader" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many locations have #12 Michigan State as the big ten team?`:
```sql
|
SELECT "winner" FROM "table1_21330550_2" WHERE "challenge_leader"='BigTen (2-1)'; |
## Task
Generate a SQL query to answer the following question:
`Who is the winner when bigten (2-1) is the challenge leader?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21330550_2" (
"date" text,
"time" text,
"acc_team" text,
"big_ten_team" text,
"location" text,
"television" text,
"attendance" real,
"winner" text,
"challenge_leader" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the winner when bigten (2-1) is the challenge leader?`:
```sql
|
SELECT "winner" FROM "table1_21330550_2" WHERE "location"='LJVM Coliseum • Winston-Salem, NC'; |
## Task
Generate a SQL query to answer the following question:
`Who is the winner in the location of ljvm coliseum • winston-salem, nc?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21330550_2" (
"date" text,
"time" text,
"acc_team" text,
"big_ten_team" text,
"location" text,
"television" text,
"attendance" real,
"winner" text,
"challenge_leader" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the winner in the location of ljvm coliseum • winston-salem, nc?`:
```sql
|
SELECT "time" FROM "table1_21330550_2" WHERE "acc_team"='#17 Wake Forest'; |
## Task
Generate a SQL query to answer the following question:
`What time was the acc team #17 wake forest?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21330550_2" (
"date" text,
"time" text,
"acc_team" text,
"big_ten_team" text,
"location" text,
"television" text,
"attendance" real,
"winner" text,
"challenge_leader" text
);
### SQL
Given the database schema, here is the SQL query that answers `What time was the acc team #17 wake forest?`:
```sql
|
SELECT "location" FROM "table1_21330550_2" WHERE "time"='9:30PM'; |
## Task
Generate a SQL query to answer the following question:
`Which location has a time of 9:30pm?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21330550_2" (
"date" text,
"time" text,
"acc_team" text,
"big_ten_team" text,
"location" text,
"television" text,
"attendance" real,
"winner" text,
"challenge_leader" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which location has a time of 9:30pm?`:
```sql
|
SELECT COUNT("date") FROM "table1_21330550_2" WHERE "big_ten_team"='#10 Purdue'; |
## Task
Generate a SQL query to answer the following question:
`How many dates have a big ten team of #10 purdue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21330550_2" (
"date" text,
"time" text,
"acc_team" text,
"big_ten_team" text,
"location" text,
"television" text,
"attendance" real,
"winner" text,
"challenge_leader" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many dates have a big ten team of #10 purdue?`:
```sql
|
SELECT "hometown" FROM "delegates" WHERE "province_community"='Barahona'; |
## Task
Generate a SQL query to answer the following question:
`Name the hometown for barahona`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "delegates" (
"province_community" text,
"contestant" text,
"age" real,
"height" text,
"hometown" text,
"geographical_regions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the hometown for barahona`:
```sql
|
SELECT "contestant" FROM "delegates" WHERE "hometown"='Villa Hermosa'; |
## Task
Generate a SQL query to answer the following question:
`Name the contestant for villa hermosa`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "delegates" (
"province_community" text,
"contestant" text,
"age" real,
"height" text,
"hometown" text,
"geographical_regions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the contestant for villa hermosa`:
```sql
|
SELECT MIN("age") FROM "delegates" WHERE "geographical_regions"='Cibao Central' AND "hometown"='Santo Domingo'; |
## Task
Generate a SQL query to answer the following question:
`Name the least age for cibao central and santo domingo`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "delegates" (
"province_community" text,
"contestant" text,
"age" real,
"height" text,
"hometown" text,
"geographical_regions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least age for cibao central and santo domingo`:
```sql
|
SELECT COUNT("pop_2001") FROM "demographics" WHERE "pop_1996"=880859; |
## Task
Generate a SQL query to answer the following question:
`How many different results of the population count in 2001 are there for the census division whose population in 1996 is 880859?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demographics" (
"census_division" text,
"area_km" text,
"pop_2011" real,
"pop_2006" real,
"pop_2001" real,
"pop_1996" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many different results of the population count in 2001 are there for the census division whose population in 1996 is 880859?`:
```sql
|
SELECT "pop_1996" FROM "demographics" WHERE "area_km"='15767.99'; |
## Task
Generate a SQL query to answer the following question:
`How many people lived in the census division with an area of 15767.99 km2 in 1996?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demographics" (
"census_division" text,
"area_km" text,
"pop_2011" real,
"pop_2006" real,
"pop_2001" real,
"pop_1996" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many people lived in the census division with an area of 15767.99 km2 in 1996?`:
```sql
|
SELECT MAX("pop_2006") FROM "demographics"; |
## Task
Generate a SQL query to answer the following question:
`What is the largest population count in any of the census divisions in 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demographics" (
"census_division" text,
"area_km" text,
"pop_2011" real,
"pop_2006" real,
"pop_2001" real,
"pop_1996" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest population count in any of the census divisions in 2006?`:
```sql
|
SELECT "pop_1996" FROM "demographics" WHERE "area_km"='9909.31'; |
## Task
Generate a SQL query to answer the following question:
`How many people lived in the census division spread out on 9909.31 km2 in 1996?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demographics" (
"census_division" text,
"area_km" text,
"pop_2011" real,
"pop_2006" real,
"pop_2001" real,
"pop_1996" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many people lived in the census division spread out on 9909.31 km2 in 1996?`:
```sql
|
SELECT "original_uk_airdate" FROM "table1_21344397_5" WHERE "title"='\"Granny Pig''s Chickens\"'; |
## Task
Generate a SQL query to answer the following question:
`When did "Granny Pig's Chickens" first air?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21344397_5" (
"episode_number" real,
"total_episodes" real,
"title" text,
"original_uk_broadcast_by" text,
"original_uk_airdate" text,
"dvd_reference" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did "Granny Pig's Chickens" first air?`:
```sql
|
SELECT COUNT("total_episodes") FROM "table1_21344397_5" WHERE "title"='\"The Fire Engine\"'; |
## Task
Generate a SQL query to answer the following question:
`How many have the name, "The Fire Engine"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21344397_5" (
"episode_number" real,
"total_episodes" real,
"title" text,
"original_uk_broadcast_by" text,
"original_uk_airdate" text,
"dvd_reference" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many have the name, "The Fire Engine"?`:
```sql
|
SELECT "result" FROM "fixtures_and_results" WHERE "round"='QF'; |
## Task
Generate a SQL query to answer the following question:
`What is the result of the qf round?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result of the qf round?`:
```sql
|
SELECT "venue" FROM "fixtures_and_results" WHERE "opponent"='Bradford Bulls' AND "date"='06/09/2009'; |
## Task
Generate a SQL query to answer the following question:
`Which venue has bradford bulls as the opponent on the date of 06/09/2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue has bradford bulls as the opponent on the date of 06/09/2009?`:
```sql
|
SELECT "opponent" FROM "fixtures_and_results" WHERE "attendance"='N/A'; |
## Task
Generate a SQL query to answer the following question:
`Who is the opponent when the attendance is n/a?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the opponent when the attendance is n/a?`:
```sql
|
SELECT "venue" FROM "fixtures_and_results" WHERE "score"='34-18'; |
## Task
Generate a SQL query to answer the following question:
`What is the venue that has 34-18 as the score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the venue that has 34-18 as the score?`:
```sql
|
SELECT COUNT("result") FROM "fixtures_and_results" WHERE "attendance"='14,381'; |
## Task
Generate a SQL query to answer the following question:
`How many results have 14,381 as the attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many results have 14,381 as the attendance?`:
```sql
|
SELECT "round" FROM "fixtures_and_results" WHERE "attendance"='6,150'; |
## Task
Generate a SQL query to answer the following question:
`How many rounds have 6,150 as attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many rounds have 6,150 as attendance?`:
```sql
|
SELECT "episode" FROM "table1_21369888_4" WHERE "title"='\"Case Two (Part 1)\"'; |
## Task
Generate a SQL query to answer the following question:
`What is the episode number for "case two (part 1)"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21369888_4" (
"episode" real,
"title" text,
"directed_by" text,
"written_by" text,
"originalairdate" text,
"viewing_figures_millions_sourced_by_barb_includes_itv1_hd_and_itv1_1" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the episode number for "case two (part 1)"?`:
```sql
|
SELECT "originalairdate" FROM "table1_21369888_4" WHERE "viewing_figures_millions_sourced_by_barb_includes_itv1_hd_and_itv1_1"='7.12'; |
## Task
Generate a SQL query to answer the following question:
`What is the original air date for the episode viewed by 7.12 million?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21369888_4" (
"episode" real,
"title" text,
"directed_by" text,
"written_by" text,
"originalairdate" text,
"viewing_figures_millions_sourced_by_barb_includes_itv1_hd_and_itv1_1" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the original air date for the episode viewed by 7.12 million?`:
```sql
|
SELECT "directed_by" FROM "table1_21369888_4" WHERE "viewing_figures_millions_sourced_by_barb_includes_itv1_hd_and_itv1_1"='7.35'; |
## Task
Generate a SQL query to answer the following question:
`Who directed the episode viewed by 7.35 million?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_21369888_4" (
"episode" real,
"title" text,
"directed_by" text,
"written_by" text,
"originalairdate" text,
"viewing_figures_millions_sourced_by_barb_includes_itv1_hd_and_itv1_1" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed the episode viewed by 7.35 million?`:
```sql
|
SELECT COUNT("opponent") FROM "fixtures_and_results" WHERE "date"='17/05/2009'; |
## Task
Generate a SQL query to answer the following question:
`How many opponents did they play on 17/05/2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many opponents did they play on 17/05/2009?`:
```sql
|
SELECT "score" FROM "fixtures_and_results" WHERE "round"='3'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of round 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixtures_and_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of round 3?`:
```sql
|
SELECT COUNT("artist") FROM "final" WHERE "televote_points"=7; |
## Task
Generate a SQL query to answer the following question:
`Name the artist for 7 points`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"draw" real,
"song" text,
"artist" text,
"panel_points" real,
"televotes" real,
"televote_points" real,
"score" real,
"placing" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the artist for 7 points`:
```sql
|
SELECT COUNT("artist") FROM "final" WHERE "panel_points"=5; |
## Task
Generate a SQL query to answer the following question:
`Name the number of artists for panel points being 5`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"draw" real,
"song" text,
"artist" text,
"panel_points" real,
"televotes" real,
"televote_points" real,
"score" real,
"placing" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the number of artists for panel points being 5`:
```sql
|
SELECT COUNT("televote_points") FROM "final" WHERE "song"='Cry on my shoulders'; |
## Task
Generate a SQL query to answer the following question:
`Name the total number of televote points for cry on my shoulders`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"draw" real,
"song" text,
"artist" text,
"panel_points" real,
"televotes" real,
"televote_points" real,
"score" real,
"placing" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of televote points for cry on my shoulders`:
```sql
|
SELECT "score" FROM "final" WHERE "artist"='Rebeka Dremelj'; |
## Task
Generate a SQL query to answer the following question:
`Name the score for rebeka dremelj`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"draw" real,
"song" text,
"artist" text,
"panel_points" real,
"televotes" real,
"televote_points" real,
"score" real,
"placing" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the score for rebeka dremelj`:
```sql
|
SELECT "artist" FROM "final" WHERE "televotes"=1595; |
## Task
Generate a SQL query to answer the following question:
`Name the artist for 1595 televotes`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"draw" real,
"song" text,
"artist" text,
"panel_points" real,
"televotes" real,
"televote_points" real,
"score" real,
"placing" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the artist for 1595 televotes`:
```sql
|
SELECT "outcome" FROM "men_s_doubles_8_5_titles_3_runner_ups" WHERE "surface"='Grass' AND "year"=1955; |
## Task
Generate a SQL query to answer the following question:
`What was the result of the match on grass in 1955?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "men_s_doubles_8_5_titles_3_runner_ups" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of the match on grass in 1955?`:
```sql
|
SELECT "outcome" FROM "men_s_doubles_8_5_titles_3_runner_ups" WHERE "championship"='Australian Championships'; |
## Task
Generate a SQL query to answer the following question:
`What was the result of the Australian Championships?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "men_s_doubles_8_5_titles_3_runner_ups" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of the Australian Championships?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.