output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT MIN("votes_sw_eng") FROM "results" WHERE "pct_sw_eng">2.1 AND "votes_gib"='1,127' AND "change_sw_eng">-3.6; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest Votes (SW Eng) with a % (SW Eng) that's larger than 2.1, Votes (Gib) of 1,127, and a Change (SW Eng) that's larger than -3.6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"party" text,
"votes_gib" real,
"votes_sw_eng" real,
"pct_gib" real,
"pct_sw_eng" real,
"change_sw_eng" real,
"seats" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the lowest Votes (SW Eng) with a % (SW Eng) that's larger than 2.1, Votes (Gib) of 1,127, and a Change (SW Eng) that's larger than -3.6?`:
```sql
|
SELECT MIN("gold") FROM "medal_table" WHERE "bronze"=14 AND "total">42; |
## Task
Generate a SQL query to answer the following question:
`Which Gold is the lowest one that has a Bronze of 14, and a Total larger than 42?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_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 Gold is the lowest one that has a Bronze of 14, and a Total larger than 42?`:
```sql
|
SELECT MIN("bronze") FROM "medal_table" WHERE "nation"='total' AND "gold"<14; |
## Task
Generate a SQL query to answer the following question:
`Which Bronze is the lowest one that has a Nation of total, and a Gold smaller than 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_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 Bronze is the lowest one that has a Nation of total, and a Gold smaller than 14?`:
```sql
|
SELECT COUNT("total") FROM "medal_table" WHERE "nation"='kazakhstan (kaz)' AND "gold">0; |
## Task
Generate a SQL query to answer the following question:
`How much Total has a Nation of kazakhstan (kaz), and a Gold larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_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 Total has a Nation of kazakhstan (kaz), and a Gold larger than 0?`:
```sql
|
SELECT MAX("total") FROM "medal_table" WHERE "rank"='1' AND "gold">11; |
## Task
Generate a SQL query to answer the following question:
`Which Total is the highest one that has a Rank of 1, and a Gold larger than 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_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 Total is the highest one that has a Rank of 1, and a Gold larger than 11?`:
```sql
|
SELECT "third" FROM "individual_events" WHERE "venue"='oslo'; |
## Task
Generate a SQL query to answer the following question:
`Who finished 3rd in Oslo?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual_events" (
"round" text,
"venue" text,
"discipline" text,
"date" text,
"winner" text,
"second" text,
"third" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who finished 3rd in Oslo?`:
```sql
|
SELECT "results" FROM "1950" WHERE "type_of_game"='friendly' AND "date"='november 22'; |
## Task
Generate a SQL query to answer the following question:
`On November 22, what were the results of the friendly type game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1950" (
"date" text,
"city" text,
"opponent" text,
"results" text,
"type_of_game" text
);
### SQL
Given the database schema, here is the SQL query that answers `On November 22, what were the results of the friendly type game?`:
```sql
|
SELECT "city" FROM "1950" WHERE "date"='october 8'; |
## Task
Generate a SQL query to answer the following question:
`On October 8, what city was the game played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1950" (
"date" text,
"city" text,
"opponent" text,
"results" text,
"type_of_game" text
);
### SQL
Given the database schema, here is the SQL query that answers `On October 8, what city was the game played?`:
```sql
|
SELECT "opponent" FROM "1950" WHERE "date"='june 29'; |
## Task
Generate a SQL query to answer the following question:
`On June 29, who was the opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1950" (
"date" text,
"city" text,
"opponent" text,
"results" text,
"type_of_game" text
);
### SQL
Given the database schema, here is the SQL query that answers `On June 29, who was the opponent?`:
```sql
|
SELECT "date" FROM "1950" WHERE "type_of_game"='friendly' AND "opponent"='sweden'; |
## Task
Generate a SQL query to answer the following question:
`What date had an opponent of Sweden and a friendly type game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1950" (
"date" text,
"city" text,
"opponent" text,
"results" text,
"type_of_game" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date had an opponent of Sweden and a friendly type game?`:
```sql
|
SELECT "results" FROM "1950" WHERE "date"='september 7'; |
## Task
Generate a SQL query to answer the following question:
`What were the results on September 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1950" (
"date" text,
"city" text,
"opponent" text,
"results" text,
"type_of_game" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the results on September 7?`:
```sql
|
SELECT MAX("1990_95") FROM "index_trends_in_major_states_by_respecti" WHERE "state"='karnataka' AND "2001_05"<0.2; |
## Task
Generate a SQL query to answer the following question:
`Which 1990–95 is the highest one that has a State of karnataka, and a 2001–05 smaller than 0.2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "index_trends_in_major_states_by_respecti" (
"state" text,
"1990_95" real,
"1996_00" real,
"2001_05" real,
"2006_10" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which 1990–95 is the highest one that has a State of karnataka, and a 2001–05 smaller than 0.2?`:
```sql
|
SELECT MIN("1996_00") FROM "index_trends_in_major_states_by_respecti" WHERE "state"='maharashtra' AND "2006_10"<0.26; |
## Task
Generate a SQL query to answer the following question:
`Which 1996-00 is the lowest one that has a State of maharashtra, and a 2006–10 smaller than 0.26?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "index_trends_in_major_states_by_respecti" (
"state" text,
"1990_95" real,
"1996_00" real,
"2001_05" real,
"2006_10" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which 1996-00 is the lowest one that has a State of maharashtra, and a 2006–10 smaller than 0.26?`:
```sql
|
SELECT AVG("1990_95") FROM "index_trends_in_major_states_by_respecti" WHERE "2001_05">0.55; |
## Task
Generate a SQL query to answer the following question:
`Which 1990–95 is the average one that has a 2001–05 larger than 0.55?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "index_trends_in_major_states_by_respecti" (
"state" text,
"1990_95" real,
"1996_00" real,
"2001_05" real,
"2006_10" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which 1990–95 is the average one that has a 2001–05 larger than 0.55?`:
```sql
|
SELECT MAX("1990_95") FROM "index_trends_in_major_states_by_respecti" WHERE "state"='assam' AND "1996_00"<0.02; |
## Task
Generate a SQL query to answer the following question:
`Which 1990–95 is the highest one that has a State of assam, and a 1996-00 smaller than 0.02?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "index_trends_in_major_states_by_respecti" (
"state" text,
"1990_95" real,
"1996_00" real,
"2001_05" real,
"2006_10" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which 1990–95 is the highest one that has a State of assam, and a 1996-00 smaller than 0.02?`:
```sql
|
SELECT "winning_team" FROM "2005_2006" WHERE "date"='january 28, 2006'; |
## Task
Generate a SQL query to answer the following question:
`What is the Winning team on january 28, 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005_2006" (
"date" text,
"site" text,
"sport" text,
"winning_team" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Winning team on january 28, 2006?`:
```sql
|
SELECT "series" FROM "2005_2006" WHERE "winning_team"='iowa state' AND "sport"='w basketball'; |
## Task
Generate a SQL query to answer the following question:
`Which Series has a Winning team of iowa state and a Sport of w basketball?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005_2006" (
"date" text,
"site" text,
"sport" text,
"winning_team" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Series has a Winning team of iowa state and a Sport of w basketball?`:
```sql
|
SELECT "series" FROM "2005_2006" WHERE "site"='ames' AND "date"='september 10, 2005'; |
## Task
Generate a SQL query to answer the following question:
`Which Series has a Site of ames on september 10, 2005?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005_2006" (
"date" text,
"site" text,
"sport" text,
"winning_team" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Series has a Site of ames on september 10, 2005?`:
```sql
|
SELECT "series" FROM "2005_2006" WHERE "site"='ames' AND "sport"='w gymnastics'; |
## Task
Generate a SQL query to answer the following question:
`Which Series has a Site of ames and a Sport of w gymnastics?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005_2006" (
"date" text,
"site" text,
"sport" text,
"winning_team" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Series has a Site of ames and a Sport of w gymnastics?`:
```sql
|
SELECT "sport" FROM "2005_2006" WHERE "date"='march 17, 2006' AND "winning_team"='iowa state'; |
## Task
Generate a SQL query to answer the following question:
`WHich port is on march 17, 2006 and has a Winning team of iowa state?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005_2006" (
"date" text,
"site" text,
"sport" text,
"winning_team" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHich port is on march 17, 2006 and has a Winning team of iowa state?`:
```sql
|
SELECT "site" FROM "2005_2006" WHERE "date"='march 17, 2006' AND "winning_team"='iowa state'; |
## Task
Generate a SQL query to answer the following question:
`Which Site has a Date of march 17, 2006 and an iowa state Winning team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005_2006" (
"date" text,
"site" text,
"sport" text,
"winning_team" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Site has a Date of march 17, 2006 and an iowa state Winning team?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "week"<11 AND "date"='october 31, 1976'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent of the game before week 11 on October 31, 1976?`
### 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 `Who was the opponent of the game before week 11 on October 31, 1976?`:
```sql
|
SELECT MAX("attendance") FROM "schedule" WHERE "week"=9; |
## Task
Generate a SQL query to answer the following question:
`What is the highest attendance of the game on week 9?`
### 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 is the highest attendance of the game on week 9?`:
```sql
|
SELECT "last_air_date" FROM "seasons" WHERE "season"=3; |
## Task
Generate a SQL query to answer the following question:
`When is the last episode air date for season 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seasons" (
"season" real,
"episodes" real,
"first_air_date" text,
"last_air_date" text,
"timeslot" text,
"dvd_release" text
);
### SQL
Given the database schema, here is the SQL query that answers `When is the last episode air date for season 3?`:
```sql
|
SELECT "season" FROM "seasons" WHERE "last_air_date"='march 11, 2001'; |
## Task
Generate a SQL query to answer the following question:
`Which season had its last episode air on March 11, 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seasons" (
"season" real,
"episodes" real,
"first_air_date" text,
"last_air_date" text,
"timeslot" text,
"dvd_release" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which season had its last episode air on March 11, 2001?`:
```sql
|
SELECT AVG("games") FROM "first_round" WHERE "drawn">1; |
## Task
Generate a SQL query to answer the following question:
`What games have more than 1 draw?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What games have more than 1 draw?`:
```sql
|
SELECT MIN("games") FROM "first_round" WHERE "drawn"=1 AND "points"<7; |
## Task
Generate a SQL query to answer the following question:
`What game is the lowest with 1 draw and less than 7 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What game is the lowest with 1 draw and less than 7 points?`:
```sql
|
SELECT MIN("year") FROM "western_league" WHERE "manager"='art griggs'; |
## Task
Generate a SQL query to answer the following question:
`Manager of art griggs had what lowest year?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "western_league" (
"year" real,
"league" text,
"class" text,
"record" text,
"finish" text,
"manager" text,
"playoffs" text
);
### SQL
Given the database schema, here is the SQL query that answers `Manager of art griggs had what lowest year?`:
```sql
|
SELECT "playoffs" FROM "western_league" WHERE "manager"='spencer abbott' AND "year"=1919; |
## Task
Generate a SQL query to answer the following question:
`Manager of spencer abbott, and a Year of 1919 involves what playoffs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "western_league" (
"year" real,
"league" text,
"class" text,
"record" text,
"finish" text,
"manager" text,
"playoffs" text
);
### SQL
Given the database schema, here is the SQL query that answers `Manager of spencer abbott, and a Year of 1919 involves what playoffs?`:
```sql
|
SELECT "year" FROM "western_league" WHERE "manager"='marty berghammer / nick allen'; |
## Task
Generate a SQL query to answer the following question:
`Manager of marty berghammer / nick allen is what year?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "western_league" (
"year" real,
"league" text,
"class" text,
"record" text,
"finish" text,
"manager" text,
"playoffs" text
);
### SQL
Given the database schema, here is the SQL query that answers `Manager of marty berghammer / nick allen is what year?`:
```sql
|
SELECT "league" FROM "western_league" WHERE "manager"='lyman lamb / marty berghammer'; |
## Task
Generate a SQL query to answer the following question:
`Manager of lyman lamb / marty berghammer is in what league?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "western_league" (
"year" real,
"league" text,
"class" text,
"record" text,
"finish" text,
"manager" text,
"playoffs" text
);
### SQL
Given the database schema, here is the SQL query that answers `Manager of lyman lamb / marty berghammer is in what league?`:
```sql
|
SELECT MIN("year") FROM "western_league" WHERE "manager"='marty berghammer' AND "finish"='1st'; |
## Task
Generate a SQL query to answer the following question:
`Manager of marty berghammer, and a Finish of 1st involved what lowest year?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "western_league" (
"year" real,
"league" text,
"class" text,
"record" text,
"finish" text,
"manager" text,
"playoffs" text
);
### SQL
Given the database schema, here is the SQL query that answers `Manager of marty berghammer, and a Finish of 1st involved what lowest year?`:
```sql
|
SELECT "league" FROM "western_league" WHERE "playoffs"='league champs' AND "record"='77-63'; |
## Task
Generate a SQL query to answer the following question:
`Playoffs of league champs, and a Record of 77-63 is in what league?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "western_league" (
"year" real,
"league" text,
"class" text,
"record" text,
"finish" text,
"manager" text,
"playoffs" text
);
### SQL
Given the database schema, here is the SQL query that answers `Playoffs of league champs, and a Record of 77-63 is in what league?`:
```sql
|
SELECT "2005" FROM "doubles" WHERE "2007"='sf'; |
## Task
Generate a SQL query to answer the following question:
`Name the 2005 with 2007 of sf`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles" (
"tournament" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"career_w_l" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 2005 with 2007 of sf`:
```sql
|
SELECT "2006" FROM "doubles" WHERE "2008"='1r' AND "2004"='1r'; |
## Task
Generate a SQL query to answer the following question:
`Name the 2006 with 2008 of 1r and 2004 of 1r`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles" (
"tournament" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"career_w_l" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 2006 with 2008 of 1r and 2004 of 1r`:
```sql
|
SELECT "2011" FROM "doubles" WHERE "2002"='1r' AND "2009"='a'; |
## Task
Generate a SQL query to answer the following question:
`Name the 2011 with 2002 of 1r and 2009 of a`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles" (
"tournament" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"career_w_l" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 2011 with 2002 of 1r and 2009 of a`:
```sql
|
SELECT "1999" FROM "doubles" WHERE "2011"='2r'; |
## Task
Generate a SQL query to answer the following question:
`Name the 1999 with 2011 of 2r`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles" (
"tournament" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"career_w_l" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 1999 with 2011 of 2r`:
```sql
|
SELECT "2008" FROM "doubles" WHERE "1998"='a' AND "2002"='1r' AND "2004"='2r'; |
## Task
Generate a SQL query to answer the following question:
`Name the 2008 with 1998 of a and 2002 of 1r with 2004 of 2r`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles" (
"tournament" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"career_w_l" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 2008 with 1998 of a and 2002 of 1r with 2004 of 2r`:
```sql
|
SELECT "2001" FROM "doubles" WHERE "2007"='sf'; |
## Task
Generate a SQL query to answer the following question:
`Name the 2001 with 2007 of sf`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles" (
"tournament" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"career_w_l" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 2001 with 2007 of sf`:
```sql
|
SELECT "class_aaa" FROM "individual" WHERE "class_aaaaa"='fort bend dulles'; |
## Task
Generate a SQL query to answer the following question:
`Which AAA class has Fort Bend Dulles as a Class AAAAA?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual" (
"school_year" text,
"class_a" text,
"class_aa" text,
"class_aaa" text,
"class_aaaa" text,
"class_aaaaa" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which AAA class has Fort Bend Dulles as a Class AAAAA?`:
```sql
|
SELECT "school_year" FROM "individual" WHERE "class_aaa"='dalhart' AND "class_aaaaa"='edinburg'; |
## Task
Generate a SQL query to answer the following question:
`Which school year was the Class AAA dalhart and the class AAAAA edinburg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual" (
"school_year" text,
"class_a" text,
"class_aa" text,
"class_aaa" text,
"class_aaaa" text,
"class_aaaaa" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which school year was the Class AAA dalhart and the class AAAAA edinburg?`:
```sql
|
SELECT "class_a" FROM "individual" WHERE "school_year"='1987-88'; |
## Task
Generate a SQL query to answer the following question:
`For what Class A is the school year 1987-88?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual" (
"school_year" text,
"class_a" text,
"class_aa" text,
"class_aaa" text,
"class_aaaa" text,
"class_aaaaa" text
);
### SQL
Given the database schema, here is the SQL query that answers `For what Class A is the school year 1987-88?`:
```sql
|
SELECT "class_aaaaa" FROM "individual" WHERE "class_aa"='tuscola jim ned' AND "class_aaa"='snyder'; |
## Task
Generate a SQL query to answer the following question:
`What is the Class AAAAA when Class AA is Tuscola Jim Ned and Class AAA Snyder?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual" (
"school_year" text,
"class_a" text,
"class_aa" text,
"class_aaa" text,
"class_aaaa" text,
"class_aaaaa" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Class AAAAA when Class AA is Tuscola Jim Ned and Class AAA Snyder?`:
```sql
|
SELECT "class_aaaa" FROM "individual" WHERE "class_aaa"='gonzales'; |
## Task
Generate a SQL query to answer the following question:
`What is the Class AAAAA when the Class AAA is Gonzales?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual" (
"school_year" text,
"class_a" text,
"class_aa" text,
"class_aaa" text,
"class_aaaa" text,
"class_aaaaa" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Class AAAAA when the Class AAA is Gonzales?`:
```sql
|
SELECT "team" FROM "campeonato_brasileiro_s_rie_b" WHERE "points"<35; |
## Task
Generate a SQL query to answer the following question:
`Which team scored less than 35 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campeonato_brasileiro_s_rie_b" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team scored less than 35 points?`:
```sql
|
SELECT AVG("position") FROM "campeonato_brasileiro_s_rie_b" WHERE "team"='criciúma' AND "drawn">8; |
## Task
Generate a SQL query to answer the following question:
`Which Position has a Team of criciúma, and a Drawn larger than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campeonato_brasileiro_s_rie_b" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Position has a Team of criciúma, and a Drawn larger than 8?`:
```sql
|
SELECT "drawn" FROM "campeonato_brasileiro_s_rie_b" WHERE "points"<46 AND "position"<20 AND "lost"<19 AND "against"=56; |
## Task
Generate a SQL query to answer the following question:
`Which Drawn has Points smaller than 46, and a Position smaller than 20, and a Lost smaller than 19, and an Against of 56?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campeonato_brasileiro_s_rie_b" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Drawn has Points smaller than 46, and a Position smaller than 20, and a Lost smaller than 19, and an Against of 56?`:
```sql
|
SELECT AVG("played") FROM "campeonato_brasileiro_s_rie_b" WHERE "lost">14 AND "drawn"=10 AND "points">46; |
## Task
Generate a SQL query to answer the following question:
`Which Played has a Lost larger than 14, and a Drawn of 10, and Points larger than 46?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campeonato_brasileiro_s_rie_b" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Played has a Lost larger than 14, and a Drawn of 10, and Points larger than 46?`:
```sql
|
SELECT "name" FROM "harrachov" WHERE "1st_m"<199.5 AND "rank"=3; |
## Task
Generate a SQL query to answer the following question:
`What's the name of a Rank 3 with a 1st (m) smaller than 199.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "harrachov" (
"rank" real,
"name" text,
"nationality" text,
"1st_m" real,
"points" real,
"overall_wc_points_rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the name of a Rank 3 with a 1st (m) smaller than 199.5?`:
```sql
|
SELECT "overall_wc_points_rank" FROM "harrachov" WHERE "rank"=2; |
## Task
Generate a SQL query to answer the following question:
`What's the Overall WC points (Rank) for Rank 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "harrachov" (
"rank" real,
"name" text,
"nationality" text,
"1st_m" real,
"points" real,
"overall_wc_points_rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the Overall WC points (Rank) for Rank 2?`:
```sql
|
SELECT "score" FROM "january" WHERE "leading_scorer"='devin brown (24)'; |
## Task
Generate a SQL query to answer the following question:
`What score has devin brown (24) as the leading scorer?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What score has devin brown (24) as the leading scorer?`:
```sql
|
SELECT "height_ft_m" FROM "timeline_of_tallest_buildings" WHERE "floors"=36; |
## Task
Generate a SQL query to answer the following question:
`Which height, in meters, has 36 floors?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "timeline_of_tallest_buildings" (
"name" text,
"street_address" text,
"years_as_tallest" text,
"height_ft_m" text,
"floors" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which height, in meters, has 36 floors?`:
```sql
|
SELECT MAX("floors") FROM "timeline_of_tallest_buildings" WHERE "name"='one indiana square'; |
## Task
Generate a SQL query to answer the following question:
`Which Floors is the highest one that has a Name of one indiana square?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "timeline_of_tallest_buildings" (
"name" text,
"street_address" text,
"years_as_tallest" text,
"height_ft_m" text,
"floors" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Floors is the highest one that has a Name of one indiana square?`:
```sql
|
SELECT "height_ft_m" FROM "timeline_of_tallest_buildings" WHERE "street_address"='07.0 200 east washington street'; |
## Task
Generate a SQL query to answer the following question:
`How tall is the Street address of 07.0 200 east washington street?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "timeline_of_tallest_buildings" (
"name" text,
"street_address" text,
"years_as_tallest" text,
"height_ft_m" text,
"floors" real
);
### SQL
Given the database schema, here is the SQL query that answers `How tall is the Street address of 07.0 200 east washington street?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "record"='37-44'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game where the indians record was 37-44?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game where the indians record was 37-44?`:
```sql
|
SELECT "town_city" FROM "museums_with_paleontology_holdings" WHERE "name"='garfield county museum'; |
## Task
Generate a SQL query to answer the following question:
`What city is Garfield County Museum located in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "museums_with_paleontology_holdings" (
"name" text,
"town_city" text,
"region" text,
"on_dinosaur_trail" text,
"education_programs_guided_tours" text,
"associated_field_digs" text
);
### SQL
Given the database schema, here is the SQL query that answers `What city is Garfield County Museum located in?`:
```sql
|
SELECT "on_dinosaur_trail" FROM "museums_with_paleontology_holdings" WHERE "name"='rudyard depot museum'; |
## Task
Generate a SQL query to answer the following question:
`Is the Rudyard Depot Museum on the Dinosaur Trail?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "museums_with_paleontology_holdings" (
"name" text,
"town_city" text,
"region" text,
"on_dinosaur_trail" text,
"education_programs_guided_tours" text,
"associated_field_digs" text
);
### SQL
Given the database schema, here is the SQL query that answers `Is the Rudyard Depot Museum on the Dinosaur Trail?`:
```sql
|
SELECT "name" FROM "museums_with_paleontology_holdings" WHERE "associated_field_digs"='no' AND "town_city"='malta'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the museum located in Malta with no associated field digs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "museums_with_paleontology_holdings" (
"name" text,
"town_city" text,
"region" text,
"on_dinosaur_trail" text,
"education_programs_guided_tours" text,
"associated_field_digs" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the museum located in Malta with no associated field digs?`:
```sql
|
SELECT "name" FROM "museums_with_paleontology_holdings" WHERE "town_city"='rudyard'; |
## Task
Generate a SQL query to answer the following question:
`What is the museum name located in Rudyard?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "museums_with_paleontology_holdings" (
"name" text,
"town_city" text,
"region" text,
"on_dinosaur_trail" text,
"education_programs_guided_tours" text,
"associated_field_digs" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the museum name located in Rudyard?`:
```sql
|
SELECT "region" FROM "museums_with_paleontology_holdings" WHERE "name"='blaine county museum'; |
## Task
Generate a SQL query to answer the following question:
`What is the region that the Blaine County Museum is located in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "museums_with_paleontology_holdings" (
"name" text,
"town_city" text,
"region" text,
"on_dinosaur_trail" text,
"education_programs_guided_tours" text,
"associated_field_digs" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the region that the Blaine County Museum is located in?`:
```sql
|
SELECT "tournament" FROM "doubles_6_2_4" WHERE "score"='6–3, 2–6, 6–3'; |
## Task
Generate a SQL query to answer the following question:
`What Tournament had a Score of 6–3, 2–6, 6–3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_6_2_4" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Tournament had a Score of 6–3, 2–6, 6–3?`:
```sql
|
SELECT "partner" FROM "doubles_6_2_4" WHERE "score"='6–3, 2–6, 6–3'; |
## Task
Generate a SQL query to answer the following question:
`What Partner had a Score of 6–3, 2–6, 6–3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_6_2_4" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Partner had a Score of 6–3, 2–6, 6–3?`:
```sql
|
SELECT "opponents" FROM "doubles_6_2_4" WHERE "outcome"='runner-up' AND "surface"='hard' AND "partner"='catherine suire'; |
## Task
Generate a SQL query to answer the following question:
`Who were the Opponents in the match on a Hard Surface with Catherine Suire as Partner and Outcome of runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_6_2_4" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the Opponents in the match on a Hard Surface with Catherine Suire as Partner and Outcome of runner-up?`:
```sql
|
SELECT "visitor" FROM "game_log" WHERE "record"='6–12–5–1'; |
## Task
Generate a SQL query to answer the following question:
`Who was the visiting team when the record was 6–12–5–1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the visiting team when the record was 6–12–5–1?`:
```sql
|
SELECT "home" FROM "game_log" WHERE "record"='21–45–8–5'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home team when the record was 21–45–8–5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the home team when the record was 21–45–8–5?`:
```sql
|
SELECT "attribute" FROM "pointer_events" WHERE "cancelable"='yes' AND "bubbles"='yes'; |
## Task
Generate a SQL query to answer the following question:
`Which of the attributes has is cancelable and an answer of yes for bubbles?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pointer_events" (
"category" text,
"type" text,
"attribute" text,
"bubbles" text,
"cancelable" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which of the attributes has is cancelable and an answer of yes for bubbles?`:
```sql
|
SELECT "bubbles" FROM "pointer_events" WHERE "attribute"='onlostpointercapture'; |
## Task
Generate a SQL query to answer the following question:
`Which bubbles has an atribute of onlostpointercapture?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pointer_events" (
"category" text,
"type" text,
"attribute" text,
"bubbles" text,
"cancelable" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which bubbles has an atribute of onlostpointercapture?`:
```sql
|
SELECT "cancelable" FROM "pointer_events" WHERE "attribute"='onpointerout'; |
## Task
Generate a SQL query to answer the following question:
`For the attribute of onpointerout, what is the cancelable?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pointer_events" (
"category" text,
"type" text,
"attribute" text,
"bubbles" text,
"cancelable" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the attribute of onpointerout, what is the cancelable?`:
```sql
|
SELECT "bubbles" FROM "pointer_events" WHERE "cancelable"='yes' AND "attribute"='onpointerdown'; |
## Task
Generate a SQL query to answer the following question:
`Which bubble have a cancelable of yes and an attribute of onpointerdown?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pointer_events" (
"category" text,
"type" text,
"attribute" text,
"bubbles" text,
"cancelable" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which bubble have a cancelable of yes and an attribute of onpointerdown?`:
```sql
|
SELECT MAX("grid") FROM "race" WHERE "driver"='ronnie bremer' AND "points">18; |
## Task
Generate a SQL query to answer the following question:
`What's the highest grid of Ronnie Bremer, who had more than 18 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the highest grid of Ronnie Bremer, who had more than 18 points?`:
```sql
|
SELECT MAX("points") FROM "race" WHERE "laps"=70 AND "grid">16; |
## Task
Generate a SQL query to answer the following question:
`What are the most points Lap 70 had with a grid larger than 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are the most points Lap 70 had with a grid larger than 16?`:
```sql
|
SELECT "track" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "city"='holland'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the track in Holland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_auto_racing_tracks_in_the_united" (
"track" text,
"city" text,
"state" text,
"opened_closing_date_if_defunct" text,
"surface" text,
"length" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the track in Holland?`:
```sql
|
SELECT "track" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "state"='washington'; |
## Task
Generate a SQL query to answer the following question:
`What is the track in Washington state?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_auto_racing_tracks_in_the_united" (
"track" text,
"city" text,
"state" text,
"opened_closing_date_if_defunct" text,
"surface" text,
"length" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the track in Washington state?`:
```sql
|
SELECT "city" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "track"='manzanita speedway'; |
## Task
Generate a SQL query to answer the following question:
`What is the city the track of manzanita speedway is in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_auto_racing_tracks_in_the_united" (
"track" text,
"city" text,
"state" text,
"opened_closing_date_if_defunct" text,
"surface" text,
"length" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the city the track of manzanita speedway is in?`:
```sql
|
SELECT "surface" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "track"='indianapolis speedrome'; |
## Task
Generate a SQL query to answer the following question:
`What is the surface of the track at the indianapolis speedrome?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_auto_racing_tracks_in_the_united" (
"track" text,
"city" text,
"state" text,
"opened_closing_date_if_defunct" text,
"surface" text,
"length" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the surface of the track at the indianapolis speedrome?`:
```sql
|
SELECT "surface" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "track"='riverhead raceway'; |
## Task
Generate a SQL query to answer the following question:
`What is the surface for the riverhead raceway?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_auto_racing_tracks_in_the_united" (
"track" text,
"city" text,
"state" text,
"opened_closing_date_if_defunct" text,
"surface" text,
"length" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the surface for the riverhead raceway?`:
```sql
|
SELECT "city" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "track"='indianapolis speedrome'; |
## Task
Generate a SQL query to answer the following question:
`What city is the indianapolis speedrome in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_auto_racing_tracks_in_the_united" (
"track" text,
"city" text,
"state" text,
"opened_closing_date_if_defunct" text,
"surface" text,
"length" text
);
### SQL
Given the database schema, here is the SQL query that answers `What city is the indianapolis speedrome in?`:
```sql
|
SELECT "iupac_name" FROM "common_trihalomethanes_ordered_by_molecu" WHERE "common_name"='chloroform'; |
## Task
Generate a SQL query to answer the following question:
`What is the IUPAC name for chloroform?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "common_trihalomethanes_ordered_by_molecu" (
"molecular_formula" text,
"iupac_name" text,
"cas_registry_number" text,
"common_name" text,
"other_names" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the IUPAC name for chloroform?`:
```sql
|
SELECT "szdsz" FROM "opinion_polls" WHERE "mszp"='25%' AND "date"='25/2/2009'; |
## Task
Generate a SQL query to answer the following question:
`What is the SZDSZ percentage with an MSZP of 25% on 25/2/2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polls" (
"source" text,
"date" text,
"fidesz" text,
"mszp" text,
"szdsz" text,
"jobbik" text,
"others" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the SZDSZ percentage with an MSZP of 25% on 25/2/2009?`:
```sql
|
SELECT "others" FROM "opinion_polls" WHERE "szdsz"='4%' AND "fidesz"='60%'; |
## Task
Generate a SQL query to answer the following question:
`What percentage of others have an SZDSZ of 4% and a Fidesz of 60%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polls" (
"source" text,
"date" text,
"fidesz" text,
"mszp" text,
"szdsz" text,
"jobbik" text,
"others" text
);
### SQL
Given the database schema, here is the SQL query that answers `What percentage of others have an SZDSZ of 4% and a Fidesz of 60%?`:
```sql
|
SELECT "others" FROM "opinion_polls" WHERE "fidesz"='62%' AND "jobbik"='4%'; |
## Task
Generate a SQL query to answer the following question:
`What is the percentage of others with a Fidesz of 62% and a Jobbik of 4%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polls" (
"source" text,
"date" text,
"fidesz" text,
"mszp" text,
"szdsz" text,
"jobbik" text,
"others" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the percentage of others with a Fidesz of 62% and a Jobbik of 4%?`:
```sql
|
SELECT "date" FROM "opinion_polls" WHERE "others"='5%' AND "szdsz"='5%'; |
## Task
Generate a SQL query to answer the following question:
`On what date do others have 5% with an SZDSZ of 5%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polls" (
"source" text,
"date" text,
"fidesz" text,
"mszp" text,
"szdsz" text,
"jobbik" text,
"others" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date do others have 5% with an SZDSZ of 5%?`:
```sql
|
SELECT "szdsz" FROM "opinion_polls" WHERE "jobbik"='5%' AND "fidesz"='68%'; |
## Task
Generate a SQL query to answer the following question:
`What is the SZDSZ percentage with a Jobbik of 5% and a Fidesz of 68%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polls" (
"source" text,
"date" text,
"fidesz" text,
"mszp" text,
"szdsz" text,
"jobbik" text,
"others" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the SZDSZ percentage with a Jobbik of 5% and a Fidesz of 68%?`:
```sql
|
SELECT "jobbik" FROM "opinion_polls" WHERE "fidesz"='61%' AND "others"='2%'; |
## Task
Generate a SQL query to answer the following question:
`What is the Jobbik percentage with a Fidesz of 61% and others of 2%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polls" (
"source" text,
"date" text,
"fidesz" text,
"mszp" text,
"szdsz" text,
"jobbik" text,
"others" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Jobbik percentage with a Fidesz of 61% and others of 2%?`:
```sql
|
SELECT "turnout_pct" FROM "by_province" WHERE "ngilu"='3,429'; |
## Task
Generate a SQL query to answer the following question:
`What's listed for the Turnout % with a Ngilu of 3,429?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_province" (
"province" text,
"kibaki" text,
"raila" text,
"wamalwa" text,
"ngilu" text,
"others" text,
"registered_voters" text,
"turnout_pct" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's listed for the Turnout % with a Ngilu of 3,429?`:
```sql
|
SELECT "turnout_pct" FROM "by_province" WHERE "raila"='519,180'; |
## Task
Generate a SQL query to answer the following question:
`What's listed for the Turnout % with a Raila of 519,180?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_province" (
"province" text,
"kibaki" text,
"raila" text,
"wamalwa" text,
"ngilu" text,
"others" text,
"registered_voters" text,
"turnout_pct" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's listed for the Turnout % with a Raila of 519,180?`:
```sql
|
SELECT "turnout_pct" FROM "by_province" WHERE "ngilu"='30,535'; |
## Task
Generate a SQL query to answer the following question:
`What's listed for the Turnout % with a Ngilu of 30,535?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_province" (
"province" text,
"kibaki" text,
"raila" text,
"wamalwa" text,
"ngilu" text,
"others" text,
"registered_voters" text,
"turnout_pct" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's listed for the Turnout % with a Ngilu of 30,535?`:
```sql
|
SELECT "registered_voters" FROM "by_province" WHERE "ngilu"='3,429'; |
## Task
Generate a SQL query to answer the following question:
`What's listed for the Registered Voters with a Ngilu of 3,429?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_province" (
"province" text,
"kibaki" text,
"raila" text,
"wamalwa" text,
"ngilu" text,
"others" text,
"registered_voters" text,
"turnout_pct" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's listed for the Registered Voters with a Ngilu of 3,429?`:
```sql
|
SELECT "province" FROM "by_province" WHERE "wamalwa"='4,431'; |
## Task
Generate a SQL query to answer the following question:
`What is listed for the Province with a Wamalwa of 4,431?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_province" (
"province" text,
"kibaki" text,
"raila" text,
"wamalwa" text,
"ngilu" text,
"others" text,
"registered_voters" text,
"turnout_pct" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is listed for the Province with a Wamalwa of 4,431?`:
```sql
|
SELECT "wamalwa" FROM "by_province" WHERE "turnout_pct"='55.9%'; |
## Task
Generate a SQL query to answer the following question:
`What's listed for the Wamalwa that has a Turnout % of 55.9%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_province" (
"province" text,
"kibaki" text,
"raila" text,
"wamalwa" text,
"ngilu" text,
"others" text,
"registered_voters" text,
"turnout_pct" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's listed for the Wamalwa that has a Turnout % of 55.9%?`:
```sql
|
SELECT AVG("partial_failures") FROM "by_type" WHERE "rocket"='ariane 5'; |
## Task
Generate a SQL query to answer the following question:
`What were the average partial failures when the rocket was Ariane 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_type" (
"rocket" text,
"country" text,
"family" text,
"launches" real,
"successes" real,
"failures" real,
"partial_failures" real
);
### SQL
Given the database schema, here is the SQL query that answers `What were the average partial failures when the rocket was Ariane 5?`:
```sql
|
SELECT AVG("launches") FROM "by_type" WHERE "failures"=0 AND "rocket"='soyuz' AND "successes"<12; |
## Task
Generate a SQL query to answer the following question:
`What are average launches with 0 failures, rocket of Soyuz, and less than 12 successes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_type" (
"rocket" text,
"country" text,
"family" text,
"launches" real,
"successes" real,
"failures" real,
"partial_failures" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are average launches with 0 failures, rocket of Soyuz, and less than 12 successes?`:
```sql
|
SELECT SUM("launches") FROM "by_type" WHERE "rocket"='long march 3' AND "failures">0; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of launches with Long March 3 and 0 failures?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_type" (
"rocket" text,
"country" text,
"family" text,
"launches" real,
"successes" real,
"failures" real,
"partial_failures" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of launches with Long March 3 and 0 failures?`:
```sql
|
SELECT MIN("failures") FROM "by_type" WHERE "launches"=1 AND "partial_failures"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the least amount of failures with 1 launch and 0 partial failures?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_type" (
"rocket" text,
"country" text,
"family" text,
"launches" real,
"successes" real,
"failures" real,
"partial_failures" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least amount of failures with 1 launch and 0 partial failures?`:
```sql
|
SELECT AVG("launches") FROM "by_type" WHERE "rocket"='ariane 5' AND "partial_failures"<0; |
## Task
Generate a SQL query to answer the following question:
`What were the average launches for Ariane 5 and 0 partial failures?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_type" (
"rocket" text,
"country" text,
"family" text,
"launches" real,
"successes" real,
"failures" real,
"partial_failures" real
);
### SQL
Given the database schema, here is the SQL query that answers `What were the average launches for Ariane 5 and 0 partial failures?`:
```sql
|
SELECT "race" FROM "2000_01_season_as_a_four_year_old" WHERE "group"='na' AND "result"='4th'; |
## Task
Generate a SQL query to answer the following question:
`What was the race of the jockey in na group in 4th place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000_01_season_as_a_four_year_old" (
"result" text,
"date" text,
"race" text,
"venue" text,
"group" text,
"distance" text,
"weight_kg" real,
"jockey" text,
"winner_2nd" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the race of the jockey in na group in 4th place?`:
```sql
|
SELECT "distance" FROM "2000_01_season_as_a_four_year_old" WHERE "jockey"='p. carbery' AND "result"='2nd'; |
## Task
Generate a SQL query to answer the following question:
`How far did p. carbery run to get 2nd?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000_01_season_as_a_four_year_old" (
"result" text,
"date" text,
"race" text,
"venue" text,
"group" text,
"distance" text,
"weight_kg" real,
"jockey" text,
"winner_2nd" text
);
### SQL
Given the database schema, here is the SQL query that answers `How far did p. carbery run to get 2nd?`:
```sql
|
SELECT "transmission" FROM "engines" WHERE "trim"='xe (2009)'; |
## Task
Generate a SQL query to answer the following question:
`What is the Removal that has a Trim of xe (2009)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engines" (
"trim" text,
"engine" text,
"displacement" text,
"power" text,
"torque" text,
"transmission" text,
"fuel_mileage_latest_epa_mpg_us" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Removal that has a Trim of xe (2009)?`:
```sql
|
SELECT "torque" FROM "engines" WHERE "power"='hp (kw)' AND "trim"='xr (2009)'; |
## Task
Generate a SQL query to answer the following question:
`What is the Torque that has a Power of hp (kw), and a Trim of xr (2009)? Question 6`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engines" (
"trim" text,
"engine" text,
"displacement" text,
"power" text,
"torque" text,
"transmission" text,
"fuel_mileage_latest_epa_mpg_us" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Torque that has a Power of hp (kw), and a Trim of xr (2009)? Question 6`:
```sql
|
SELECT MIN("round") FROM "draft_picks" WHERE "college_junior_club_team_league"='oshawa generals (oha)' AND "player"='bob kelly'; |
## Task
Generate a SQL query to answer the following question:
`Which Round is the lowest one that has a College/Junior/Club Team (League) of oshawa generals (oha), and a Player of bob kelly?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Round is the lowest one that has a College/Junior/Club Team (League) of oshawa generals (oha), and a Player of bob kelly?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.