output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "year_at_cu" FROM "coaches_staff" WHERE "experience"<1 AND "position"='video services'; |
## Task
Generate a SQL query to answer the following question:
`What year at CU is the person in video services with an experience less than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "coaches_staff" (
"position" text,
"name" text,
"year_at_cu" text,
"experience" real,
"alma_mater" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year at CU is the person in video services with an experience less than 1?`:
```sql
|
SELECT "experience" FROM "coaches_staff" WHERE "year_at_cu"='1st' AND "position"='graduate assistant'; |
## Task
Generate a SQL query to answer the following question:
`The graduate assistant who was in the 1st year at CU has what experience?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "coaches_staff" (
"position" text,
"name" text,
"year_at_cu" text,
"experience" real,
"alma_mater" text
);
### SQL
Given the database schema, here is the SQL query that answers `The graduate assistant who was in the 1st year at CU has what experience?`:
```sql
|
SELECT "name" FROM "coaches_staff" WHERE "experience">19 AND "alma_mater"='eastern nazarene (''74)'; |
## Task
Generate a SQL query to answer the following question:
`What person has the alma mater of Eastern Nazarene ('74), and greater than 19 experience?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "coaches_staff" (
"position" text,
"name" text,
"year_at_cu" text,
"experience" real,
"alma_mater" text
);
### SQL
Given the database schema, here is the SQL query that answers `What person has the alma mater of Eastern Nazarene ('74), and greater than 19 experience?`:
```sql
|
SELECT COUNT("engine_capacity") FROM "see_also" WHERE "transmission"='a4' AND "mpg_us_urban">19 AND "mpg_us_extra_urban">38.6 AND "model"='aveo'; |
## Task
Generate a SQL query to answer the following question:
`What is the total engine capacity of the a4 transmission, which has an urban mpg-US greater than 19, an mpg-us extra-urban greater than 38.6, and an aveo model?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"manufacturer" text,
"model" text,
"transmission" text,
"engine_capacity" real,
"fuel_type" text,
"l_100km_urban_cold" real,
"l_100km_extra_urban" real,
"l_100km_combined" real,
"mpg_uk_urban_cold" real,
"mpg_uk_extra_urban" real,
"mpg_uk_combined" real,
"mpg_us_urban" real,
"mpg_us_extra_urban" real,
"mpg_us_combined" real,
"co_2_g_km" real,
"green_rating" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total engine capacity of the a4 transmission, which has an urban mpg-US greater than 19, an mpg-us extra-urban greater than 38.6, and an aveo model?`:
```sql
|
SELECT MAX("engine_capacity") FROM "see_also" WHERE "manufacturer"='bmw' AND "mpg_uk_extra_urban"=52.3 AND "co_2_g_km"=176 AND "mpg_us_urban">27.3; |
## Task
Generate a SQL query to answer the following question:
`What is the highest engine capacity with a bmw manufacturer, an mpg-UK extra-urban of 52.3, a 176 CO 2 g/km, and an mpg-us urban greater than 27.3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"manufacturer" text,
"model" text,
"transmission" text,
"engine_capacity" real,
"fuel_type" text,
"l_100km_urban_cold" real,
"l_100km_extra_urban" real,
"l_100km_combined" real,
"mpg_uk_urban_cold" real,
"mpg_uk_extra_urban" real,
"mpg_uk_combined" real,
"mpg_us_urban" real,
"mpg_us_extra_urban" real,
"mpg_us_combined" real,
"co_2_g_km" real,
"green_rating" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest engine capacity with a bmw manufacturer, an mpg-UK extra-urban of 52.3, a 176 CO 2 g/km, and an mpg-us urban greater than 27.3?`:
```sql
|
SELECT "mpg_uk_combined" FROM "see_also" WHERE "mpg_uk_urban_cold">26.6 AND "transmission"='m5' AND "fuel_type"='diesel' AND "engine_capacity"<1560; |
## Task
Generate a SQL query to answer the following question:
`What is the mpg-uk combined with an mpg-uk urban (cold) greater than 26.6, a m5 transmission, a diesel fuel type, and an engine capacity less than 1560?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"manufacturer" text,
"model" text,
"transmission" text,
"engine_capacity" real,
"fuel_type" text,
"l_100km_urban_cold" real,
"l_100km_extra_urban" real,
"l_100km_combined" real,
"mpg_uk_urban_cold" real,
"mpg_uk_extra_urban" real,
"mpg_uk_combined" real,
"mpg_us_urban" real,
"mpg_us_extra_urban" real,
"mpg_us_combined" real,
"co_2_g_km" real,
"green_rating" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the mpg-uk combined with an mpg-uk urban (cold) greater than 26.6, a m5 transmission, a diesel fuel type, and an engine capacity less than 1560?`:
```sql
|
SELECT "l_100km_urban_cold" FROM "see_also" WHERE "co_2_g_km"<222 AND "mpg_us_urban">17.8 AND "mpg_uk_extra_urban"=55.4 AND "engine_capacity">1560; |
## Task
Generate a SQL query to answer the following question:
`What is the l/100km urban (cold) with a CO 2 g/km less than 222, an mpg-us urban greater than 17.8, an mpg-uk extra-urban of 55.4, and an engine capacity greater than 1560?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"manufacturer" text,
"model" text,
"transmission" text,
"engine_capacity" real,
"fuel_type" text,
"l_100km_urban_cold" real,
"l_100km_extra_urban" real,
"l_100km_combined" real,
"mpg_uk_urban_cold" real,
"mpg_uk_extra_urban" real,
"mpg_uk_combined" real,
"mpg_us_urban" real,
"mpg_us_extra_urban" real,
"mpg_us_combined" real,
"co_2_g_km" real,
"green_rating" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the l/100km urban (cold) with a CO 2 g/km less than 222, an mpg-us urban greater than 17.8, an mpg-uk extra-urban of 55.4, and an engine capacity greater than 1560?`:
```sql
|
SELECT "model" FROM "see_also" WHERE "green_rating"='g' AND "manufacturer"='chrysler jeep' AND "l_100km_urban_cold"<18 AND "mpg_uk_combined"=27.7; |
## Task
Generate a SQL query to answer the following question:
`What model has a g green rating, has chrysler jeep as a manufacturer, has an l/100km urban (cold) less than 18, and has an mpg-uk combined of 27.7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"manufacturer" text,
"model" text,
"transmission" text,
"engine_capacity" real,
"fuel_type" text,
"l_100km_urban_cold" real,
"l_100km_extra_urban" real,
"l_100km_combined" real,
"mpg_uk_urban_cold" real,
"mpg_uk_extra_urban" real,
"mpg_uk_combined" real,
"mpg_us_urban" real,
"mpg_us_extra_urban" real,
"mpg_us_combined" real,
"co_2_g_km" real,
"green_rating" text
);
### SQL
Given the database schema, here is the SQL query that answers `What model has a g green rating, has chrysler jeep as a manufacturer, has an l/100km urban (cold) less than 18, and has an mpg-uk combined of 27.7?`:
```sql
|
SELECT "league_cup_apps" FROM "appearances_and_goals" WHERE "total_goals"<2 AND "total_apps"='12'; |
## Task
Generate a SQL query to answer the following question:
`what is the league cup apps when the total goals is less than 2 and the total apps is 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"flt_apps" text,
"flt_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the league cup apps when the total goals is less than 2 and the total apps is 12?`:
```sql
|
SELECT AVG("fa_cup_goals") FROM "appearances_and_goals" WHERE "league_cup_apps"='2' AND "fa_cup_apps"='3' AND "league_goals"=3; |
## Task
Generate a SQL query to answer the following question:
`what is the average ga cup goals when the league cup apps is 2, the fa cup apps is 3 and the league goals is 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"flt_apps" text,
"flt_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the average ga cup goals when the league cup apps is 2, the fa cup apps is 3 and the league goals is 3?`:
```sql
|
SELECT MAX("fa_cup_goals") FROM "appearances_and_goals" WHERE "flt_goals">0; |
## Task
Generate a SQL query to answer the following question:
`what is the highest fa cup goals when flt goals is more than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"flt_apps" text,
"flt_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the highest fa cup goals when flt goals is more than 0?`:
```sql
|
SELECT "total_apps" FROM "appearances_and_goals" WHERE "league_apps"='4 (2)'; |
## Task
Generate a SQL query to answer the following question:
`what is the total apps when the league apps is 4 (2)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"flt_apps" text,
"flt_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the total apps when the league apps is 4 (2)?`:
```sql
|
SELECT COUNT("silver") FROM "medals_table" WHERE "total">9 AND "gold"=14; |
## Task
Generate a SQL query to answer the following question:
`How much Silver has a Total larger than 9, and a Gold of 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much Silver has a Total larger than 9, and a Gold of 14?`:
```sql
|
SELECT "rank" FROM "medals_table" WHERE "total">9 AND "gold">6; |
## Task
Generate a SQL query to answer the following question:
`Which Rank has a Total larger than 9, and a Gold larger than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank has a Total larger than 9, and a Gold larger than 6?`:
```sql
|
SELECT COUNT("silver") FROM "medals_table" WHERE "rank"='4' AND "bronze"<12; |
## Task
Generate a SQL query to answer the following question:
`How much Silver has a Rank of 4, and a Bronze smaller than 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much Silver has a Rank of 4, and a Bronze smaller than 12?`:
```sql
|
SELECT SUM("bronze") FROM "medals_table" WHERE "total"=9; |
## Task
Generate a SQL query to answer the following question:
`How many bronzes have a Total of 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many bronzes have a Total of 9?`:
```sql
|
SELECT SUM("gold") FROM "medals_table" WHERE "nation"='mongolia' AND "total">18; |
## Task
Generate a SQL query to answer the following question:
`How much Gold has a Nation of mongolia, and a Total larger than 18?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much Gold has a Nation of mongolia, and a Total larger than 18?`:
```sql
|
SELECT "lok_sabha" FROM "members_of_the_parliament" WHERE "party_affiliation"='dravida munnetra kazhagam' AND "duration"='1999-04'; |
## Task
Generate a SQL query to answer the following question:
`What is the Lok Sabha for Dravida Munnetra Kazhagam, in 1999-04?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members_of_the_parliament" (
"lok_sabha" text,
"duration" text,
"name_of_m_p" text,
"party_affiliation" text,
"election_year" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Lok Sabha for Dravida Munnetra Kazhagam, in 1999-04?`:
```sql
|
SELECT "duration" FROM "members_of_the_parliament" WHERE "lok_sabha"='fifth'; |
## Task
Generate a SQL query to answer the following question:
`What is the duration when Lok Sabha shows fifth?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members_of_the_parliament" (
"lok_sabha" text,
"duration" text,
"name_of_m_p" text,
"party_affiliation" text,
"election_year" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the duration when Lok Sabha shows fifth?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "date"='december 20, 1970'; |
## Task
Generate a SQL query to answer the following question:
`What was the result for the game played on December 20, 1970?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result for the game played on December 20, 1970?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "week"=2; |
## Task
Generate a SQL query to answer the following question:
`What was the result for week 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result for week 2?`:
```sql
|
SELECT SUM("rank") FROM "semifinal_a_b_2" WHERE "notes"='fb' AND "time"='6:47.30'; |
## Task
Generate a SQL query to answer the following question:
`What is the rank of the athletes that have Notes of fb, and a Time of 6:47.30?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_a_b_2" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank of the athletes that have Notes of fb, and a Time of 6:47.30?`:
```sql
|
SELECT MIN("rank") FROM "semifinal_a_b_2" WHERE "time"='6:36.65'; |
## Task
Generate a SQL query to answer the following question:
`What is the least rank for athletes with a time of 6:36.65?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_a_b_2" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least rank for athletes with a time of 6:36.65?`:
```sql
|
SELECT AVG("react") FROM "heat_1" WHERE "rank">8; |
## Task
Generate a SQL query to answer the following question:
`What is the average react for a rank more than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_1" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average react for a rank more than 8?`:
```sql
|
SELECT MAX("rank") FROM "heat_1" WHERE "react"=0.198 AND "time">20.42; |
## Task
Generate a SQL query to answer the following question:
`What is the highest rank for the react of 0.198, and the time more than 20.42?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_1" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest rank for the react of 0.198, and the time more than 20.42?`:
```sql
|
SELECT SUM("time") FROM "heat_1" WHERE "lane">6 AND "nationality"='canada' AND "react"<0.151; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of time with a lane larger than 6, a nationality of canada, and the react smaller than 0.151?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_1" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of time with a lane larger than 6, a nationality of canada, and the react smaller than 0.151?`:
```sql
|
SELECT "human_gene_protein" FROM "ner_associated_genes" WHERE "yeast_ortholog"='rad26'; |
## Task
Generate a SQL query to answer the following question:
`What human gene has a yeast ortholog of RAD26?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ner_associated_genes" (
"human_gene_protein" text,
"mouse_ortholog" text,
"yeast_ortholog" text,
"subpathway" text,
"gene_cards_entry" text
);
### SQL
Given the database schema, here is the SQL query that answers `What human gene has a yeast ortholog of RAD26?`:
```sql
|
SELECT "human_gene_protein" FROM "ner_associated_genes" WHERE "mouse_ortholog"='lig1'; |
## Task
Generate a SQL query to answer the following question:
`What is the human gene that has a mouse ortholog of LIG1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ner_associated_genes" (
"human_gene_protein" text,
"mouse_ortholog" text,
"yeast_ortholog" text,
"subpathway" text,
"gene_cards_entry" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the human gene that has a mouse ortholog of LIG1?`:
```sql
|
SELECT "yeast_ortholog" FROM "ner_associated_genes" WHERE "subpathway"='ggr' AND "gene_cards_entry"='cetn2'; |
## Task
Generate a SQL query to answer the following question:
`What is the yeast ortholog that has a subpathway of GGR and GeneCards entry CETN2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ner_associated_genes" (
"human_gene_protein" text,
"mouse_ortholog" text,
"yeast_ortholog" text,
"subpathway" text,
"gene_cards_entry" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the yeast ortholog that has a subpathway of GGR and GeneCards entry CETN2?`:
```sql
|
SELECT "yeast_ortholog" FROM "ner_associated_genes" WHERE "mouse_ortholog"='mms19'; |
## Task
Generate a SQL query to answer the following question:
`What is the yeast ortholog of mouse ortholog MMS19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ner_associated_genes" (
"human_gene_protein" text,
"mouse_ortholog" text,
"yeast_ortholog" text,
"subpathway" text,
"gene_cards_entry" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the yeast ortholog of mouse ortholog MMS19?`:
```sql
|
SELECT "tournament" FROM "singles_10_3_titles_7_runner_ups" WHERE "opponent"='vladimir zednik'; |
## Task
Generate a SQL query to answer the following question:
`What is the Tournament against Vladimir Zednik?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_10_3_titles_7_runner_ups" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Tournament against Vladimir Zednik?`:
```sql
|
SELECT "tournament" FROM "singles_10_3_titles_7_runner_ups" WHERE "score"='4–6, 6–7, 3–6'; |
## Task
Generate a SQL query to answer the following question:
`What Tournament had a Score of 4–6, 6–7, 3–6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_10_3_titles_7_runner_ups" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Tournament had a Score of 4–6, 6–7, 3–6?`:
```sql
|
SELECT "score" FROM "singles_10_3_titles_7_runner_ups" WHERE "outcome"='runner-up' AND "opponent"='tim gullikson'; |
## Task
Generate a SQL query to answer the following question:
`What is the Score of the of the Tournament against Tim Gullikson with Outcome of runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_10_3_titles_7_runner_ups" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Score of the of the Tournament against Tim Gullikson with Outcome of runner-up?`:
```sql
|
SELECT "doha_qatar" FROM "records" WHERE "snatch"='total'; |
## Task
Generate a SQL query to answer the following question:
`What is the Doha, Qatar when the snatch is total?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"chen_yanqing_chn" text,
"111kg" text,
"doha_qatar" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Doha, Qatar when the snatch is total?`:
```sql
|
SELECT "chen_yanqing_chn" FROM "records" WHERE "doha_qatar"='—'; |
## Task
Generate a SQL query to answer the following question:
`What shows for Chen Yanqing (CHN) when Doha, Qatar is —?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"chen_yanqing_chn" text,
"111kg" text,
"doha_qatar" text
);
### SQL
Given the database schema, here is the SQL query that answers `What shows for Chen Yanqing (CHN) when Doha, Qatar is —?`:
```sql
|
SELECT "doha_qatar" FROM "records" WHERE "snatch"='clean & jerk'; |
## Task
Generate a SQL query to answer the following question:
`What is the Doha, Qatar when the snatch is clean & jerk?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"chen_yanqing_chn" text,
"111kg" text,
"doha_qatar" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Doha, Qatar when the snatch is clean & jerk?`:
```sql
|
SELECT AVG("points") FROM "top_scorers" WHERE "club"='london wasps' AND "drop">1; |
## Task
Generate a SQL query to answer the following question:
`Which Points have a Club of london wasps, and a Drop larger than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_scorers" (
"points" real,
"name" text,
"club" text,
"tries" real,
"drop" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Points have a Club of london wasps, and a Drop larger than 1?`:
```sql
|
SELECT SUM("points") FROM "top_scorers" WHERE "name"='stephen myler' AND "tries"<0; |
## Task
Generate a SQL query to answer the following question:
`How many Points have a Name of stephen myler, and Tries smaller than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_scorers" (
"points" real,
"name" text,
"club" text,
"tries" real,
"drop" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Points have a Name of stephen myler, and Tries smaller than 0?`:
```sql
|
SELECT COUNT("drop") FROM "top_scorers" WHERE "tries"<5 AND "points">212; |
## Task
Generate a SQL query to answer the following question:
`How many drops have Tries smaller than 5, and Points larger than 212?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_scorers" (
"points" real,
"name" text,
"club" text,
"tries" real,
"drop" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many drops have Tries smaller than 5, and Points larger than 212?`:
```sql
|
SELECT AVG("pick") FROM "fourteenth_round" WHERE "college"='new mexico'; |
## Task
Generate a SQL query to answer the following question:
`What is the pick number for New Mexico?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourteenth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the pick number for New Mexico?`:
```sql
|
SELECT "player" FROM "fourteenth_round" WHERE "team"='denver broncos'; |
## Task
Generate a SQL query to answer the following question:
`What player is from the Denver Broncos?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourteenth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What player is from the Denver Broncos?`:
```sql
|
SELECT "college" FROM "fourteenth_round" WHERE "team"='new york jets'; |
## Task
Generate a SQL query to answer the following question:
`Which college has their team as the New York Jets?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourteenth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which college has their team as the New York Jets?`:
```sql
|
SELECT "constituency_number" FROM "assembly_segments" WHERE "name"='total:'; |
## Task
Generate a SQL query to answer the following question:
`What is the Constituency Number of Total:?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2003" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Constituency Number of Total:?`:
```sql
|
SELECT "constituency_number" FROM "assembly_segments" WHERE "number_of_electorates_2003">'156,910' AND "reserved_for_sc_st_none"='sc'; |
## Task
Generate a SQL query to answer the following question:
`What is the Constituency Number when the Number of Electorates (2003) is more than 156,910, and Reserved for sc?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2003" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Constituency Number when the Number of Electorates (2003) is more than 156,910, and Reserved for sc?`:
```sql
|
SELECT "district" FROM "assembly_segments" WHERE "constituency_number"='22'; |
## Task
Generate a SQL query to answer the following question:
`Which District is Constituency number 22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2003" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which District is Constituency number 22?`:
```sql
|
SELECT MIN("number_of_electorates_2003") FROM "assembly_segments" WHERE "district"='bhind' AND "reserved_for_sc_st_none"='none' AND "constituency_number"='11'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of Electorates (2003) in District bhind, Reserved for none, and Constituency Number 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2003" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest number of Electorates (2003) in District bhind, Reserved for none, and Constituency Number 11?`:
```sql
|
SELECT "school_club_team" FROM "nfl_draft" WHERE "pick"=33; |
## Task
Generate a SQL query to answer the following question:
`What school/club had pick 33?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What school/club had pick 33?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "date"='october 16, 2005'; |
## Task
Generate a SQL query to answer the following question:
`What attendance has October 16, 2005 as the date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What attendance has October 16, 2005 as the date?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "week"<16 AND "date"='october 31, 2005'; |
## Task
Generate a SQL query to answer the following question:
`What result has a week less than 16, and October 31, 2005 as the date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What result has a week less than 16, and October 31, 2005 as the date?`:
```sql
|
SELECT MIN("year") FROM "year_by_year_record" WHERE "manager"='bobby dews' AND "playoffs"='lost in 1st round'; |
## Task
Generate a SQL query to answer the following question:
`Which Year has a Manager of bobby dews, and Playoffs of lost in 1st round?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year_record" (
"year" real,
"record" text,
"finish" text,
"manager" text,
"playoffs" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Year has a Manager of bobby dews, and Playoffs of lost in 1st round?`:
```sql
|
SELECT COUNT("year") FROM "year_by_year_record" WHERE "record"='73-65'; |
## Task
Generate a SQL query to answer the following question:
`How many years have a Record of 73-65?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year_record" (
"year" real,
"record" text,
"finish" text,
"manager" text,
"playoffs" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years have a Record of 73-65?`:
```sql
|
SELECT "record" FROM "year_by_year_record" WHERE "year">1974 AND "finish"='3rd'; |
## Task
Generate a SQL query to answer the following question:
`Which Record has a Year larger than 1974, and a Finish of 3rd?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year_record" (
"year" real,
"record" text,
"finish" text,
"manager" text,
"playoffs" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Record has a Year larger than 1974, and a Finish of 3rd?`:
```sql
|
SELECT "song" FROM "1961_1995" WHERE "year"<1994 AND "uk_chart"='42'; |
## Task
Generate a SQL query to answer the following question:
`Which Song of the Year was 42 on the UK charts prior to 1994?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1961_1995" (
"year" real,
"artist" text,
"song" text,
"uk_chart" text,
"at_eurovision" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Song of the Year was 42 on the UK charts prior to 1994?`:
```sql
|
SELECT "uk_chart" FROM "1961_1995" WHERE "artist"='scott fitzgerald'; |
## Task
Generate a SQL query to answer the following question:
`Where did Scott Fitzgerald rank on the UK charts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1961_1995" (
"year" real,
"artist" text,
"song" text,
"uk_chart" text,
"at_eurovision" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did Scott Fitzgerald rank on the UK charts?`:
```sql
|
SELECT "uk_chart" FROM "1961_1995" WHERE "year">1961 AND "at_eurovision"='2nd' AND "artist"='michael ball'; |
## Task
Generate a SQL query to answer the following question:
`Where did the song by Michael Ball, which placed 2nd in Eurovision prior to 1961, place on the UK charts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1961_1995" (
"year" real,
"artist" text,
"song" text,
"uk_chart" text,
"at_eurovision" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did the song by Michael Ball, which placed 2nd in Eurovision prior to 1961, place on the UK charts?`:
```sql
|
SELECT MAX("year") FROM "lent_bumps" WHERE "3rd_day"='rowed-over'; |
## Task
Generate a SQL query to answer the following question:
`What is the latest year that ended with a 3rd day of rowed-over?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lent_bumps" (
"year" real,
"finish_position" text,
"1st_day" text,
"2nd_day" text,
"3rd_day" text,
"4th_day" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the latest year that ended with a 3rd day of rowed-over?`:
```sql
|
SELECT "3rd_day" FROM "lent_bumps" WHERE "year"<2012 AND "finish_position"='33rd'; |
## Task
Generate a SQL query to answer the following question:
`What is the 3rd day result for years under 2012 and a finish position of 33rd?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lent_bumps" (
"year" real,
"finish_position" text,
"1st_day" text,
"2nd_day" text,
"3rd_day" text,
"4th_day" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 3rd day result for years under 2012 and a finish position of 33rd?`:
```sql
|
SELECT "4th_day" FROM "lent_bumps" WHERE "3rd_day"='bumped darwin'; |
## Task
Generate a SQL query to answer the following question:
`What was the 4th day result for the year in which the 3rd day result was bumped Darwin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lent_bumps" (
"year" real,
"finish_position" text,
"1st_day" text,
"2nd_day" text,
"3rd_day" text,
"4th_day" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the 4th day result for the year in which the 3rd day result was bumped Darwin?`:
```sql
|
SELECT SUM("height_cm") FROM "luge" WHERE "2009_10_team"='cornell big red'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the heights for the Cornell Big Red?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "luge" (
"position" text,
"height_cm" real,
"weight_kg" real,
"birthplace" text,
"2009_10_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the heights for the Cornell Big Red?`:
```sql
|
SELECT "origin" FROM "equipment" WHERE "in_service"=1; |
## Task
Generate a SQL query to answer the following question:
`For the vessel with a listed In service of 1, what is the origin given?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "equipment" (
"vessel" text,
"origin" text,
"type" text,
"in_service" real,
"unit" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the vessel with a listed In service of 1, what is the origin given?`:
```sql
|
SELECT MIN("in_service") FROM "equipment" WHERE "vessel"='xavery czernicki class'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest listed In service for a vessel of xavery czernicki class?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "equipment" (
"vessel" text,
"origin" text,
"type" text,
"in_service" real,
"unit" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest listed In service for a vessel of xavery czernicki class?`:
```sql
|
SELECT "vessel" FROM "equipment" WHERE "type"='logistic support'; |
## Task
Generate a SQL query to answer the following question:
`Which vessel has a type of logistic support?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "equipment" (
"vessel" text,
"origin" text,
"type" text,
"in_service" real,
"unit" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which vessel has a type of logistic support?`:
```sql
|
SELECT "type" FROM "equipment" WHERE "vessel"='lublin class'; |
## Task
Generate a SQL query to answer the following question:
`What is the type for a vessel of lublin class?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "equipment" (
"vessel" text,
"origin" text,
"type" text,
"in_service" real,
"unit" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the type for a vessel of lublin class?`:
```sql
|
SELECT MAX("in_service") FROM "equipment" WHERE "unit"='12th minesweeper squadron'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest In service for a vessel with a listed Unit of 12th minesweeper squadron?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "equipment" (
"vessel" text,
"origin" text,
"type" text,
"in_service" real,
"unit" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest In service for a vessel with a listed Unit of 12th minesweeper squadron?`:
```sql
|
SELECT "type" FROM "equipment" WHERE "unit"='naval base swinoujscie (auxiliary squadron)'; |
## Task
Generate a SQL query to answer the following question:
`What is the type for a vessel with a listed unit of naval base swinoujscie (auxiliary squadron)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "equipment" (
"vessel" text,
"origin" text,
"type" text,
"in_service" real,
"unit" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the type for a vessel with a listed unit of naval base swinoujscie (auxiliary squadron)?`:
```sql
|
SELECT "rider" FROM "race_1_newcomers_race_a" WHERE "team"='600cc yamaha'; |
## Task
Generate a SQL query to answer the following question:
`Which rider was on the 600cc Yamaha team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_1_newcomers_race_a" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which rider was on the 600cc Yamaha team?`:
```sql
|
SELECT "speed" FROM "race_1_newcomers_race_a" WHERE "rider"='john hildreth'; |
## Task
Generate a SQL query to answer the following question:
`What was John Hildreth's speed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_1_newcomers_race_a" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was John Hildreth's speed?`:
```sql
|
SELECT AVG("draw") FROM "royal_rumble_entrances_and_eliminations" WHERE "time"='22:29'; |
## Task
Generate a SQL query to answer the following question:
`What is the average draw number of an entrant with a time of 22:29?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "royal_rumble_entrances_and_eliminations" (
"draw" real,
"entrant" text,
"brand" text,
"order" text,
"eliminated_by" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average draw number of an entrant with a time of 22:29?`:
```sql
|
SELECT "brand" FROM "royal_rumble_entrances_and_eliminations" WHERE "entrant"='mark henry'; |
## Task
Generate a SQL query to answer the following question:
`What is Mark Henry's brand?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "royal_rumble_entrances_and_eliminations" (
"draw" real,
"entrant" text,
"brand" text,
"order" text,
"eliminated_by" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Mark Henry's brand?`:
```sql
|
SELECT "author_editor_source" FROM "see_also" WHERE "world_ranking_1"='35' AND "countries_sampled">100; |
## Task
Generate a SQL query to answer the following question:
`Who is the Author/Editor/Source for more than 100 countries sampled and has a 35 world ranking?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"author_editor_source" text,
"year_of_publication" text,
"countries_sampled" real,
"world_ranking_1" text,
"ranking_in_latin_america_2" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the Author/Editor/Source for more than 100 countries sampled and has a 35 world ranking?`:
```sql
|
SELECT SUM("countries_sampled") FROM "see_also" WHERE "year_of_publication"='2010' AND "world_ranking_1"='33' AND "ranking_in_latin_america_2"<3; |
## Task
Generate a SQL query to answer the following question:
`How many countries sampled has a world ranking of 33 in 2010 and less than 3 ranking in Latin America?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"author_editor_source" text,
"year_of_publication" text,
"countries_sampled" real,
"world_ranking_1" text,
"ranking_in_latin_america_2" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many countries sampled has a world ranking of 33 in 2010 and less than 3 ranking in Latin America?`:
```sql
|
SELECT "world_ranking_1" FROM "see_also" WHERE "year_of_publication"='2011' AND "ranking_in_latin_america_2">3 AND "countries_sampled">142; |
## Task
Generate a SQL query to answer the following question:
`What's the world ranking in 2011 having more than 142 countries sampled, and more than a 3 for ranking in Latin America?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"author_editor_source" text,
"year_of_publication" text,
"countries_sampled" real,
"world_ranking_1" text,
"ranking_in_latin_america_2" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the world ranking in 2011 having more than 142 countries sampled, and more than a 3 for ranking in Latin America?`:
```sql
|
SELECT "home_team" FROM "first_round_proper" WHERE "tie_no"='20'; |
## Task
Generate a SQL query to answer the following question:
`What home team has a tie no of 20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What home team has a tie no of 20?`:
```sql
|
SELECT "date" FROM "first_round_proper" WHERE "score"='3–3' AND "away_team"='barnet'; |
## Task
Generate a SQL query to answer the following question:
`What date was the score 3–3, and away team was Barnet?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the score 3–3, and away team was Barnet?`:
```sql
|
SELECT "tie_no" FROM "first_round_proper" WHERE "home_team"='wimbledon'; |
## Task
Generate a SQL query to answer the following question:
`What is the Tie no when Wimbledon is the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Tie no when Wimbledon is the home team?`:
```sql
|
SELECT "score" FROM "first_round_proper" WHERE "tie_no"='replay' AND "away_team"='york city'; |
## Task
Generate a SQL query to answer the following question:
`What is the score when the Tie no is replay, and the away team is York City?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score when the Tie no is replay, and the away team is York City?`:
```sql
|
SELECT "tie_no" FROM "first_round_proper" WHERE "away_team"='chester'; |
## Task
Generate a SQL query to answer the following question:
`What is the Tie no when Chester is the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Tie no when Chester is the away team?`:
```sql
|
SELECT "broadcast_date" FROM "episode_information" WHERE "viewership_millions"=9.65; |
## Task
Generate a SQL query to answer the following question:
`What is the broadcast date of the episode with 9.65 million viewers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episode_information" (
"episode_number" text,
"broadcast_date" text,
"title" text,
"written_by" text,
"viewership_millions" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the broadcast date of the episode with 9.65 million viewers?`:
```sql
|
SELECT MIN("viewership_millions") FROM "episode_information" WHERE "broadcast_date"='7 september 2001'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest viewership in millions of the episode broadcast on 7 September 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episode_information" (
"episode_number" text,
"broadcast_date" text,
"title" text,
"written_by" text,
"viewership_millions" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest viewership in millions of the episode broadcast on 7 September 2001?`:
```sql
|
SELECT "episode_number" FROM "episode_information" WHERE "broadcast_date"='21 september 2001'; |
## Task
Generate a SQL query to answer the following question:
`What is the episode number of the episode broadcast on 21 September 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episode_information" (
"episode_number" text,
"broadcast_date" text,
"title" text,
"written_by" text,
"viewership_millions" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the episode number of the episode broadcast on 21 September 2001?`:
```sql
|
SELECT COUNT("draw") FROM "results" WHERE "points"=8 AND "place">8; |
## Task
Generate a SQL query to answer the following question:
`How many times is the points 8 and the place larger than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"draw" real,
"language" text,
"artist" text,
"place" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many times is the points 8 and the place larger than 8?`:
```sql
|
SELECT AVG("draw") FROM "results" WHERE "place"=5 AND "points">15; |
## Task
Generate a SQL query to answer the following question:
`what is the average draw when the place is 5 and points more than 15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"draw" real,
"language" text,
"artist" text,
"place" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the average draw when the place is 5 and points more than 15?`:
```sql
|
SELECT MAX("draw") FROM "results" WHERE "points"<11 AND "language"='norwegian'; |
## Task
Generate a SQL query to answer the following question:
`what is the highest draw when points is less than 11 and language is norwegian?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"draw" real,
"language" text,
"artist" text,
"place" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the highest draw when points is less than 11 and language is norwegian?`:
```sql
|
SELECT COUNT("pick") FROM "round_2" WHERE "pba_team"='purefoods tender juicy hotdogs'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of picks from the PBA team of purefoods tender juicy hotdogs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of picks from the PBA team of purefoods tender juicy hotdogs?`:
```sql
|
SELECT "pba_team" FROM "round_2" WHERE "college"='santo tomas'; |
## Task
Generate a SQL query to answer the following question:
`What is the pba team for the player who went to santo tomas college?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the pba team for the player who went to santo tomas college?`:
```sql
|
SELECT "pba_team" FROM "round_2" WHERE "pick"<11 AND "player"='roberto jabar'; |
## Task
Generate a SQL query to answer the following question:
`What is the PBA team for roberto jabar who was picked before number 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the PBA team for roberto jabar who was picked before number 11?`:
```sql
|
SELECT "brand" FROM "fixed_focal_length_lenses" WHERE "focal_length"='35mm' AND "product_name"='slr magic hyperprime cine 35mm t0.95'; |
## Task
Generate a SQL query to answer the following question:
`What is the brand of the slr magic hyperprime cine 35mm t0.95, which has a focal length of 35mm?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fixed_focal_length_lenses" (
"brand" text,
"product_name" text,
"focal_length" text,
"35mm_efl_and_equivalent_aperture" text,
"max_aperture" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the brand of the slr magic hyperprime cine 35mm t0.95, which has a focal length of 35mm?`:
```sql
|
SELECT "most_spoken_language" FROM "main_places" WHERE "code">70403 AND "area_km_2">3.79 AND "population">'73,283'; |
## Task
Generate a SQL query to answer the following question:
`What is the Most Spoken language in the Place with Code 70403 with an Area (km 2) larger than 3.79 and a Population larger than 73,283?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "main_places" (
"place" text,
"code" real,
"area_km_2" real,
"population" real,
"most_spoken_language" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Most Spoken language in the Place with Code 70403 with an Area (km 2) larger than 3.79 and a Population larger than 73,283?`:
```sql
|
SELECT COUNT("population") FROM "main_places" WHERE "area_km_2">498.77; |
## Task
Generate a SQL query to answer the following question:
`What is the Population of the Place with an Area (km 2) larger than 498.77?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "main_places" (
"place" text,
"code" real,
"area_km_2" real,
"population" real,
"most_spoken_language" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Population of the Place with an Area (km 2) larger than 498.77?`:
```sql
|
SELECT MIN("population") FROM "main_places" WHERE "code"<70409 AND "area_km_2"<5.97 AND "place"='tshepiso'; |
## Task
Generate a SQL query to answer the following question:
`What is the Population of Tshepiso with a Code of 70409 or smaller and an Area (km 2) smaller than 5.97?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "main_places" (
"place" text,
"code" real,
"area_km_2" real,
"population" real,
"most_spoken_language" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Population of Tshepiso with a Code of 70409 or smaller and an Area (km 2) smaller than 5.97?`:
```sql
|
SELECT "time" FROM "heat_4" WHERE "react">0.187 AND "athlete"='paul hession'; |
## Task
Generate a SQL query to answer the following question:
`What the time of Paul Hession with more than an 0.187 react?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_4" (
"lane" real,
"athlete" text,
"nationality" text,
"time" text,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `What the time of Paul Hession with more than an 0.187 react?`:
```sql
|
SELECT MAX("lane") FROM "heat_4" WHERE "react"<0.164 AND "time"='20.45'; |
## Task
Generate a SQL query to answer the following question:
`What's the lane number when time was 20.45 and the react was less than 0.164?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_4" (
"lane" real,
"athlete" text,
"nationality" text,
"time" text,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the lane number when time was 20.45 and the react was less than 0.164?`:
```sql
|
SELECT "1958" FROM "grand_tour_results_timeline" WHERE "1957"='2' AND "1956"='3'; |
## Task
Generate a SQL query to answer the following question:
`what is 1958 when 1957 is 2 and 1956 is 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_tour_results_timeline" (
"1953" text,
"1954" text,
"1955" text,
"1956" text,
"1957" text,
"1958" text,
"1959" text,
"1960" text,
"1961" text,
"1962" text,
"1963" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is 1958 when 1957 is 2 and 1956 is 3?`:
```sql
|
SELECT "1955" FROM "grand_tour_results_timeline" WHERE "1961"='n/a'; |
## Task
Generate a SQL query to answer the following question:
`what is 1955 when 1961 is n/a?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_tour_results_timeline" (
"1953" text,
"1954" text,
"1955" text,
"1956" text,
"1957" text,
"1958" text,
"1959" text,
"1960" text,
"1961" text,
"1962" text,
"1963" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is 1955 when 1961 is n/a?`:
```sql
|
SELECT "date" FROM "fifth_round_proper" WHERE "tie_no"='7'; |
## Task
Generate a SQL query to answer the following question:
`What date has 7 as the tie no.?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fifth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date has 7 as the tie no.?`:
```sql
|
SELECT "year" FROM "taekwondo_medals" WHERE "venue"='beijing'; |
## Task
Generate a SQL query to answer the following question:
`Which year was held in beijing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "taekwondo_medals" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which year was held in beijing?`:
```sql
|
SELECT COUNT("year") FROM "taekwondo_medals" WHERE "venue"='eindhoven'; |
## Task
Generate a SQL query to answer the following question:
`How many years had a Venue of eindhoven?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "taekwondo_medals" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years had a Venue of eindhoven?`:
```sql
|
SELECT "competition" FROM "taekwondo_medals" WHERE "venue"='manchester' AND "year"=2009; |
## Task
Generate a SQL query to answer the following question:
`Which Competition has a Venue of manchester in 2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "taekwondo_medals" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Competition has a Venue of manchester in 2009?`:
```sql
|
SELECT "year" FROM "taekwondo_medals" WHERE "position"='2nd' AND "notes"='-63kg' AND "venue"='manchester'; |
## Task
Generate a SQL query to answer the following question:
`Which Year has a Position of 2nd, and Notes of -63kg, and a Venue of manchester?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "taekwondo_medals" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Year has a Position of 2nd, and Notes of -63kg, and a Venue of manchester?`:
```sql
|
SELECT "best" FROM "qualifying_results" WHERE "name"='rodolfo lavín'; |
## Task
Generate a SQL query to answer the following question:
`Name the the Best of rodolfo lavín`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_results" (
"name" text,
"team" text,
"qual_1" text,
"qual_2" text,
"best" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the the Best of rodolfo lavín`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.