output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "location" FROM "top_5_jamaican_100_m_athletes_women" WHERE "rank"<5 AND "time">10.7 AND "date"='10 july 2009'; |
## Task
Generate a SQL query to answer the following question:
`Rank smaller than 5, and a Time larger than 10.7, and a Date of 10 july 2009 has what location?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_5_jamaican_100_m_athletes_women" (
"rank" real,
"time" real,
"athlete" text,
"nation" text,
"date" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Rank smaller than 5, and a Time larger than 10.7, and a Date of 10 july 2009 has what location?`:
```sql
|
SELECT MAX("dcsf_number") FROM "berkhamsted" WHERE "faith"='rc' AND "opened">1966; |
## Task
Generate a SQL query to answer the following question:
`Faith of rc, and a Opened larger than 1966 which has the highest DCSF number?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "berkhamsted" (
"name" text,
"faith" text,
"type" text,
"opened" real,
"intake" real,
"dcsf_number" real,
"ofsted_number" real
);
### SQL
Given the database schema, here is the SQL query that answers `Faith of rc, and a Opened larger than 1966 which has the highest DCSF number?`:
```sql
|
SELECT "type" FROM "berkhamsted" WHERE "faith"='–' AND "name"='greenway'; |
## Task
Generate a SQL query to answer the following question:
`Faith of –, and a Name of greenway has what type?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "berkhamsted" (
"name" text,
"faith" text,
"type" text,
"opened" real,
"intake" real,
"dcsf_number" real,
"ofsted_number" real
);
### SQL
Given the database schema, here is the SQL query that answers `Faith of –, and a Name of greenway has what type?`:
```sql
|
SELECT "opponent" FROM "lowest_team_totals_against" WHERE "venue"='launceston cricket club ground, launceston' AND "season"='1853/54'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent that played at Launceston Cricket Club Ground, launceston during the season of 1853/54?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lowest_team_totals_against" (
"rank" text,
"runs" text,
"opponent" text,
"venue" text,
"season" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent that played at Launceston Cricket Club Ground, launceston during the season of 1853/54?`:
```sql
|
SELECT "rank" FROM "lowest_team_totals_against" WHERE "season"='2006/07'; |
## Task
Generate a SQL query to answer the following question:
`What was the rank of the team during season 2006/07?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lowest_team_totals_against" (
"rank" text,
"runs" text,
"opponent" text,
"venue" text,
"season" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the rank of the team during season 2006/07?`:
```sql
|
SELECT "venue" FROM "lowest_team_totals_against" WHERE "runs"='55'; |
## Task
Generate a SQL query to answer the following question:
`What was the venue where there were 55 runs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lowest_team_totals_against" (
"rank" text,
"runs" text,
"opponent" text,
"venue" text,
"season" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the venue where there were 55 runs?`:
```sql
|
SELECT "venue" FROM "lowest_team_totals_against" WHERE "runs"='62'; |
## Task
Generate a SQL query to answer the following question:
`What was the venue where there were 62 runs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lowest_team_totals_against" (
"rank" text,
"runs" text,
"opponent" text,
"venue" text,
"season" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the venue where there were 62 runs?`:
```sql
|
SELECT "driver" FROM "race" WHERE "laps"<53 AND "time_retired"='accident'; |
## Task
Generate a SQL query to answer the following question:
`Which driver had an accident and laps smaller than 53?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which driver had an accident and laps smaller than 53?`:
```sql
|
SELECT "language" FROM "scholarly_journals" WHERE "publication_range"='1955–1999'; |
## Task
Generate a SQL query to answer the following question:
`What language has a publication range from 1955–1999?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scholarly_journals" (
"issn" text,
"language" text,
"country" text,
"frequency" text,
"publication_range" text,
"status" text,
"document_type" text
);
### SQL
Given the database schema, here is the SQL query that answers `What language has a publication range from 1955–1999?`:
```sql
|
SELECT "status" FROM "scholarly_journals" WHERE "issn"='0149-1830'; |
## Task
Generate a SQL query to answer the following question:
`What is the status for a journal with the ISSN of 0149-1830?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scholarly_journals" (
"issn" text,
"language" text,
"country" text,
"frequency" text,
"publication_range" text,
"status" text,
"document_type" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the status for a journal with the ISSN of 0149-1830?`:
```sql
|
SELECT "language" FROM "scholarly_journals" WHERE "country"='france' AND "publication_range"='1992–2003'; |
## Task
Generate a SQL query to answer the following question:
`What is the language with a France publication range of 1992–2003?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scholarly_journals" (
"issn" text,
"language" text,
"country" text,
"frequency" text,
"publication_range" text,
"status" text,
"document_type" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the language with a France publication range of 1992–2003?`:
```sql
|
SELECT "issn" FROM "scholarly_journals" WHERE "publication_range"='1984-'; |
## Task
Generate a SQL query to answer the following question:
`What is the ISSN number of a publication range of 1984-?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scholarly_journals" (
"issn" text,
"language" text,
"country" text,
"frequency" text,
"publication_range" text,
"status" text,
"document_type" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the ISSN number of a publication range of 1984-?`:
```sql
|
SELECT "language" FROM "scholarly_journals" WHERE "frequency"='3 times per year' AND "issn"='1136-7385'; |
## Task
Generate a SQL query to answer the following question:
`What is the language for a journal that has a frequency of 3 times per year and has an ISSN number of 1136-7385?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scholarly_journals" (
"issn" text,
"language" text,
"country" text,
"frequency" text,
"publication_range" text,
"status" text,
"document_type" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the language for a journal that has a frequency of 3 times per year and has an ISSN number of 1136-7385?`:
```sql
|
SELECT "region_4_release" FROM "dvd_releases" WHERE "region_2_release"='july 20, 2009'; |
## Task
Generate a SQL query to answer the following question:
`What is the region 4 release that has july 20, 2009 as the region 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dvd_releases" (
"volume" text,
"discs" real,
"episodes" real,
"region_1_release" text,
"region_2_release" text,
"region_4_release" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the region 4 release that has july 20, 2009 as the region 2?`:
```sql
|
SELECT "region_1_release" FROM "dvd_releases" WHERE "region_2_release"='july 20, 2009'; |
## Task
Generate a SQL query to answer the following question:
`What is the region 1 release that has july 20, 2009 as the region 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dvd_releases" (
"volume" text,
"discs" real,
"episodes" real,
"region_1_release" text,
"region_2_release" text,
"region_4_release" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the region 1 release that has july 20, 2009 as the region 2?`:
```sql
|
SELECT AVG("episodes") FROM "dvd_releases" WHERE "region_1_release"='september 11, 2007'; |
## Task
Generate a SQL query to answer the following question:
`What is the average episode that has September 11, 2007 as a region 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dvd_releases" (
"volume" text,
"discs" real,
"episodes" real,
"region_1_release" text,
"region_2_release" text,
"region_4_release" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average episode that has September 11, 2007 as a region 1?`:
```sql
|
SELECT "scheduled" FROM "proposed_or_under_construction" WHERE "capacity_mw"<32.5 AND "type"='nordex n90 2.5mw' AND "wind_farm"='glenough extension'; |
## Task
Generate a SQL query to answer the following question:
`What is the scheduled value for the farm having a capacity under 32.5MW, type of Nordex n90 2.5MW, and a farm of Glenough Extension?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "proposed_or_under_construction" (
"wind_farm" text,
"scheduled" text,
"capacity_mw" real,
"turbines" real,
"type" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the scheduled value for the farm having a capacity under 32.5MW, type of Nordex n90 2.5MW, and a farm of Glenough Extension?`:
```sql
|
SELECT "type" FROM "proposed_or_under_construction" WHERE "turbines"<17 AND "location"='county laois'; |
## Task
Generate a SQL query to answer the following question:
`What is the type of turbine having fewer than 17 units and located in County Laois?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "proposed_or_under_construction" (
"wind_farm" text,
"scheduled" text,
"capacity_mw" real,
"turbines" real,
"type" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the type of turbine having fewer than 17 units and located in County Laois?`:
```sql
|
SELECT "scheduled" FROM "proposed_or_under_construction" WHERE "turbines"=17; |
## Task
Generate a SQL query to answer the following question:
`When is the scheduled date for the farm having 17 turbines?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "proposed_or_under_construction" (
"wind_farm" text,
"scheduled" text,
"capacity_mw" real,
"turbines" real,
"type" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `When is the scheduled date for the farm having 17 turbines?`:
```sql
|
SELECT AVG("capacity_mw") FROM "proposed_or_under_construction" WHERE "wind_farm"='gortahile' AND "turbines">8; |
## Task
Generate a SQL query to answer the following question:
`What is the average capacity for the farm at Gortahile having more than 8 turbines?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "proposed_or_under_construction" (
"wind_farm" text,
"scheduled" text,
"capacity_mw" real,
"turbines" real,
"type" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average capacity for the farm at Gortahile having more than 8 turbines?`:
```sql
|
SELECT "title" FROM "933_1062" WHERE "left_office"='982' AND "entered_office"='949'; |
## Task
Generate a SQL query to answer the following question:
`What is the title of the king who left office in 982 and entered office in 949?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "933_1062" (
"throne_name" text,
"title" text,
"born_died" text,
"entered_office" text,
"left_office" text,
"family_relations" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the title of the king who left office in 982 and entered office in 949?`:
```sql
|
SELECT "left_office" FROM "933_1062" WHERE "entered_office"='1012'; |
## Task
Generate a SQL query to answer the following question:
`When did the king who entered office in 1012 leave office?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "933_1062" (
"throne_name" text,
"title" text,
"born_died" text,
"entered_office" text,
"left_office" text,
"family_relations" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the king who entered office in 1012 leave office?`:
```sql
|
SELECT "family_relations" FROM "933_1062" WHERE "throne_name"='303'; |
## Task
Generate a SQL query to answer the following question:
`What are the family relations of the king with the throne name 303?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "933_1062" (
"throne_name" text,
"title" text,
"born_died" text,
"entered_office" text,
"left_office" text,
"family_relations" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the family relations of the king with the throne name 303?`:
```sql
|
SELECT "born_died" FROM "933_1062" WHERE "left_office"='1021' AND "throne_name"='315'; |
## Task
Generate a SQL query to answer the following question:
`What is teh born-died dates of the king with a throne name 315 and left office in 1021?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "933_1062" (
"throne_name" text,
"title" text,
"born_died" text,
"entered_office" text,
"left_office" text,
"family_relations" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is teh born-died dates of the king with a throne name 315 and left office in 1021?`:
```sql
|
SELECT "opponents" FROM "doubles_10_2_titles_8_runners_up" WHERE "partner"='irina-camelia begu' AND "surface"='hard'; |
## Task
Generate a SQL query to answer the following question:
`Which Opponents have a Partner of irina-camelia begu, and a Surface of hard?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_10_2_titles_8_runners_up" (
"outcome" text,
"date" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Opponents have a Partner of irina-camelia begu, and a Surface of hard?`:
```sql
|
SELECT "surface" FROM "doubles_10_2_titles_8_runners_up" WHERE "partner"='galina voskoboeva'; |
## Task
Generate a SQL query to answer the following question:
`Which Surface has a Partner of galina voskoboeva?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_10_2_titles_8_runners_up" (
"outcome" text,
"date" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Surface has a Partner of galina voskoboeva?`:
```sql
|
SELECT "opponents" FROM "doubles_10_2_titles_8_runners_up" WHERE "surface"='hard' AND "outcome"='runner-up' AND "partner"='jarmila gajdošová'; |
## Task
Generate a SQL query to answer the following question:
`Which Opponents have a Surface of hard, and an Outcome of runner-up, and a Partner of jarmila gajdošová?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_10_2_titles_8_runners_up" (
"outcome" text,
"date" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Opponents have a Surface of hard, and an Outcome of runner-up, and a Partner of jarmila gajdošová?`:
```sql
|
SELECT "partner" FROM "doubles_10_2_titles_8_runners_up" WHERE "date"='12 july 2009'; |
## Task
Generate a SQL query to answer the following question:
`Which Partner has a Date of 12 july 2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_10_2_titles_8_runners_up" (
"outcome" text,
"date" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Partner has a Date of 12 july 2009?`:
```sql
|
SELECT "surface" FROM "doubles_10_2_titles_8_runners_up" WHERE "partner"='sorana cîrstea'; |
## Task
Generate a SQL query to answer the following question:
`Which Surface has a Partner of sorana cîrstea?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_10_2_titles_8_runners_up" (
"outcome" text,
"date" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Surface has a Partner of sorana cîrstea?`:
```sql
|
SELECT MIN("overall") FROM "atlanta_falcons_draft_history" WHERE "pick_num">27; |
## Task
Generate a SQL query to answer the following question:
`Name the least overall with pick number more than 27`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "atlanta_falcons_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least overall with pick number more than 27`:
```sql
|
SELECT "1st_leg" FROM "eighthfinals" WHERE "team_num2"='gran canaria'; |
## Task
Generate a SQL query to answer the following question:
`what's the first leg with gran canaria as team #2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eighthfinals" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the first leg with gran canaria as team #2?`:
```sql
|
SELECT "team_num2" FROM "eighthfinals" WHERE "team_num1"='lukoil academic'; |
## Task
Generate a SQL query to answer the following question:
`with team #1 as lukoil academic what is team #2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eighthfinals" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `with team #1 as lukoil academic what is team #2?`:
```sql
|
SELECT "team_num1" FROM "eighthfinals" WHERE "team_num2"='akasvayu girona'; |
## Task
Generate a SQL query to answer the following question:
`with team #2 as akasvayu girona what is team #1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eighthfinals" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `with team #2 as akasvayu girona what is team #1?`:
```sql
|
SELECT "virtue" FROM "seven_heavenly_virtues" WHERE "latin"='acedia'; |
## Task
Generate a SQL query to answer the following question:
`Which virtue is acedia(Latin)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seven_heavenly_virtues" (
"virtue" text,
"latin" text,
"gloss" text,
"vice" text,
"latin" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which virtue is acedia(Latin)?`:
```sql
|
SELECT "virtue" FROM "seven_heavenly_virtues" WHERE "vice"='lust'; |
## Task
Generate a SQL query to answer the following question:
`Which Virtue has a (vice) of lust?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seven_heavenly_virtues" (
"virtue" text,
"latin" text,
"gloss" text,
"vice" text,
"latin" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Virtue has a (vice) of lust?`:
```sql
|
SELECT "virtue" FROM "seven_heavenly_virtues" WHERE "latin"='invidia'; |
## Task
Generate a SQL query to answer the following question:
`Which virtue is Invidia(Latin)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seven_heavenly_virtues" (
"virtue" text,
"latin" text,
"gloss" text,
"vice" text,
"latin" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which virtue is Invidia(Latin)?`:
```sql
|
SELECT "gloss" FROM "seven_heavenly_virtues" WHERE "latin"='castitas'; |
## Task
Generate a SQL query to answer the following question:
`What's the gloss with Castitas(Latin)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seven_heavenly_virtues" (
"virtue" text,
"latin" text,
"gloss" text,
"vice" text,
"latin" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the gloss with Castitas(Latin)?`:
```sql
|
SELECT "gloss" FROM "seven_heavenly_virtues" WHERE "virtue"='diligence'; |
## Task
Generate a SQL query to answer the following question:
`What is the Diligence Virtues Gloss?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seven_heavenly_virtues" (
"virtue" text,
"latin" text,
"gloss" text,
"vice" text,
"latin" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Diligence Virtues Gloss?`:
```sql
|
SELECT "latin" FROM "seven_heavenly_virtues" WHERE "virtue"='temperance'; |
## Task
Generate a SQL query to answer the following question:
`What is the Virtue of Temperance in Latin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seven_heavenly_virtues" (
"virtue" text,
"latin" text,
"gloss" text,
"vice" text,
"latin" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Virtue of Temperance in Latin?`:
```sql
|
SELECT "year" FROM "team" WHERE "silver"='south korea'; |
## Task
Generate a SQL query to answer the following question:
`In what year(s) did South Korea win silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "team" (
"year" real,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what year(s) did South Korea win silver?`:
```sql
|
SELECT "silver" FROM "team" WHERE "location"='doha'; |
## Task
Generate a SQL query to answer the following question:
`Which nation(s) won silver in Doha?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "team" (
"year" real,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which nation(s) won silver in Doha?`:
```sql
|
SELECT MIN("year") FROM "team" WHERE "gold"='south korea' AND "bronze"='malaysia'; |
## Task
Generate a SQL query to answer the following question:
`What was the first year that South Korea won gold and Malaysia won bronze?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "team" (
"year" real,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the first year that South Korea won gold and Malaysia won bronze?`:
```sql
|
SELECT "gold" FROM "team" WHERE "bronze"='chinese taipei'; |
## Task
Generate a SQL query to answer the following question:
`What country won gold in the year(s) that Chinese Taipei won bronze?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "team" (
"year" real,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country won gold in the year(s) that Chinese Taipei won bronze?`:
```sql
|
SELECT "european_competitions" FROM "results" WHERE "pos"=6; |
## Task
Generate a SQL query to answer the following question:
`Which European competitions have a Pos of 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"season" text,
"tier" real,
"league" text,
"pos" real,
"postseason" text,
"dutch_cup" text,
"european_competitions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which European competitions have a Pos of 6?`:
```sql
|
SELECT AVG("pos") FROM "results" WHERE "dutch_cup"='winner' AND "tier">1; |
## Task
Generate a SQL query to answer the following question:
`Which Pos has a Dutch Cup of winner, and a Tier larger than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"season" text,
"tier" real,
"league" text,
"pos" real,
"postseason" text,
"dutch_cup" text,
"european_competitions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Pos has a Dutch Cup of winner, and a Tier larger than 1?`:
```sql
|
SELECT AVG("frequency_m_hz") FROM "external_links" WHERE "city_of_license"='farwell, texas'; |
## Task
Generate a SQL query to answer the following question:
`What is the average Frequency MHz that is on farwell, texas?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "external_links" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" text,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Frequency MHz that is on farwell, texas?`:
```sql
|
SELECT "city_of_license" FROM "external_links" WHERE "fcc_info"='fcc' AND "erp_w"='10,000 horizontal 3,000 vertical'; |
## Task
Generate a SQL query to answer the following question:
`WHich City of license has a FCC info of fcc, and 10,000 horizontal 3,000 vertical ERP W`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "external_links" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" text,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHich City of license has a FCC info of fcc, and 10,000 horizontal 3,000 vertical ERP W`:
```sql
|
SELECT "fcc_info" FROM "external_links" WHERE "erp_w"='3,000'; |
## Task
Generate a SQL query to answer the following question:
`WHich FCC info has 3,000 ERP W?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "external_links" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" text,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHich FCC info has 3,000 ERP W?`:
```sql
|
SELECT AVG("game") FROM "regular_season" WHERE "points"=19 AND "opponent"='new jersey devils'; |
## Task
Generate a SQL query to answer the following question:
`What's the average game against the New Jersey Devils with 19 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"november" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the average game against the New Jersey Devils with 19 points?`:
```sql
|
SELECT AVG("attendance") FROM "schedule" WHERE "opponent"='at boston patriots' AND "week">3; |
## Task
Generate a SQL query to answer the following question:
`Opponent of at boston patriots, and a Week larger than 3 had what average attendance?`
### 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,
"record" text,
"game_site" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Opponent of at boston patriots, and a Week larger than 3 had what average attendance?`:
```sql
|
SELECT AVG("fall_07") FROM "geography_of_students" WHERE "fall_06">219; |
## Task
Generate a SQL query to answer the following question:
`Name the average fall 07 for fall 07 more than 219`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "geography_of_students" (
"maryland_counties" text,
"fall_05" real,
"fall_06" real,
"fall_07" real,
"fall_08" real,
"fall_09" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average fall 07 for fall 07 more than 219`:
```sql
|
SELECT "player" FROM "round_one" WHERE "pick_num"<3 AND "mls_team"='fc dallas'; |
## Task
Generate a SQL query to answer the following question:
`Name the player for fc dallas pick number less than 3`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_one" (
"pick_num" real,
"mls_team" text,
"player" text,
"position" text,
"affiliation" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the player for fc dallas pick number less than 3`:
```sql
|
SELECT MAX("pick_num") FROM "round_one" WHERE "mls_team"='real salt lake' AND "affiliation"='ucla los angeles storm'; |
## Task
Generate a SQL query to answer the following question:
`Name the most pick number for real salt lake and affiliation of ucla los angeles storm`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_one" (
"pick_num" real,
"mls_team" text,
"player" text,
"position" text,
"affiliation" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most pick number for real salt lake and affiliation of ucla los angeles storm`:
```sql
|
SELECT "player" FROM "round_one" WHERE "pick_num"=7; |
## Task
Generate a SQL query to answer the following question:
`Name the player with pick number of 7`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_one" (
"pick_num" real,
"mls_team" text,
"player" text,
"position" text,
"affiliation" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the player with pick number of 7`:
```sql
|
SELECT MIN("game") FROM "regular_season" WHERE "march"<12 AND "score"='10–1'; |
## Task
Generate a SQL query to answer the following question:
`Which Game has a March smaller than 12, and a Score of 10–1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Game has a March smaller than 12, and a Score of 10–1?`:
```sql
|
SELECT "score" FROM "regular_season" WHERE "points"=88 AND "record"='38–22–12'; |
## Task
Generate a SQL query to answer the following question:
`Which Score has Points of 88, and a Record of 38–22–12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Score has Points of 88, and a Record of 38–22–12?`:
```sql
|
SELECT COUNT("game") FROM "regular_season" WHERE "opponent"='detroit red wings' AND "march"<12; |
## Task
Generate a SQL query to answer the following question:
`Which Game has an Opponent of detroit red wings, and a March smaller than 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Game has an Opponent of detroit red wings, and a March smaller than 12?`:
```sql
|
SELECT MIN("points") FROM "regular_season" WHERE "game"<70 AND "score"='4–8'; |
## Task
Generate a SQL query to answer the following question:
`Which Points have a Game smaller than 70, and a Score of 4–8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Points have a Game smaller than 70, and a Score of 4–8?`:
```sql
|
SELECT "segment_a" FROM "season_10_2007_2008" WHERE "netflix"='s05e22'; |
## Task
Generate a SQL query to answer the following question:
`Which segment a's Netflix is S05E22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_10_2007_2008" (
"series_ep" text,
"episode" real,
"netflix" text,
"segment_a" text,
"segment_b" text,
"segment_c" text,
"segment_d" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which segment a's Netflix is S05E22?`:
```sql
|
SELECT "series_ep" FROM "season_10_2007_2008" WHERE "segment_c"='electric pole s transformer'; |
## Task
Generate a SQL query to answer the following question:
`Which series episode has a segment c that is Electric pole s transformer?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_10_2007_2008" (
"series_ep" text,
"episode" real,
"netflix" text,
"segment_a" text,
"segment_b" text,
"segment_c" text,
"segment_d" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which series episode has a segment c that is Electric pole s transformer?`:
```sql
|
SELECT MAX("episode") FROM "season_10_2007_2008" WHERE "netflix"='s05e23'; |
## Task
Generate a SQL query to answer the following question:
`What largest episode number's Netflix is S05E23?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_10_2007_2008" (
"series_ep" text,
"episode" real,
"netflix" text,
"segment_a" text,
"segment_b" text,
"segment_c" text,
"segment_d" text
);
### SQL
Given the database schema, here is the SQL query that answers `What largest episode number's Netflix is S05E23?`:
```sql
|
SELECT "segment_c" FROM "season_10_2007_2008" WHERE "segment_b"='refrigerators'; |
## Task
Generate a SQL query to answer the following question:
`Which segment c's segment b is refrigerators?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_10_2007_2008" (
"series_ep" text,
"episode" real,
"netflix" text,
"segment_a" text,
"segment_b" text,
"segment_c" text,
"segment_d" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which segment c's segment b is refrigerators?`:
```sql
|
SELECT "races" FROM "career_summary" WHERE "points"='125'; |
## Task
Generate a SQL query to answer the following question:
`Which races did they accumulate at least 125 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" text,
"series" text,
"team" text,
"races" text,
"wins" text,
"points" text,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which races did they accumulate at least 125 points?`:
```sql
|
SELECT "series" FROM "playoffs" WHERE "score"='3 – 8'; |
## Task
Generate a SQL query to answer the following question:
`Which Series has a Score of 3 – 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Series has a Score of 3 – 8?`:
```sql
|
SELECT "date" FROM "playoffs" WHERE "decision"='myre'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has a Decision of myre?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date has a Decision of myre?`:
```sql
|
SELECT MIN("attendance") FROM "playoffs" WHERE "date"='may 24'; |
## Task
Generate a SQL query to answer the following question:
`How many Attendances on may 24?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Attendances on may 24?`:
```sql
|
SELECT "series" FROM "playoffs" WHERE "date"='may 18'; |
## Task
Generate a SQL query to answer the following question:
`Which Series are on may 18?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Series are on may 18?`:
```sql
|
SELECT AVG("attendance") FROM "playoffs" WHERE "visitor"='philadelphia' AND "date"='may 20'; |
## Task
Generate a SQL query to answer the following question:
`How many Attendances that has a Visitor of philadelphia on may 20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Attendances that has a Visitor of philadelphia on may 20?`:
```sql
|
SELECT "visitor" FROM "playoffs" WHERE "series"='series tied 2–2'; |
## Task
Generate a SQL query to answer the following question:
`who is the Visitor that has a Series of series tied 2–2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the Visitor that has a Series of series tied 2–2?`:
```sql
|
SELECT MAX("attendance") FROM "playoffs" WHERE "score"='4 – 5'; |
## Task
Generate a SQL query to answer the following question:
`How many Attendances have a Score of 4 – 5? Question 4`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Attendances have a Score of 4 – 5? Question 4`:
```sql
|
SELECT "visitor" FROM "playoffs" WHERE "home"='philadelphia' AND "series"='flyers lead 1–0'; |
## Task
Generate a SQL query to answer the following question:
`WHo has a Home of philadelphia and a Series of flyers lead 1–0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHo has a Home of philadelphia and a Series of flyers lead 1–0?`:
```sql
|
SELECT "class" FROM "schedule" WHERE "race"='charlotte camel gt 500'; |
## Task
Generate a SQL query to answer the following question:
`What is the class of the Charlotte Camel gt 500 race?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"race" text,
"length" text,
"class" text,
"circuit" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the class of the Charlotte Camel gt 500 race?`:
```sql
|
SELECT "race" FROM "schedule" WHERE "length"='12 hours'; |
## Task
Generate a SQL query to answer the following question:
`What is the race 12 hours in length?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"race" text,
"length" text,
"class" text,
"circuit" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the race 12 hours in length?`:
```sql
|
SELECT "class" FROM "schedule" WHERE "race"='coca-cola classic 12 hours of sebring'; |
## Task
Generate a SQL query to answer the following question:
`What is the class of the Coca-cola classic 12 hours of sebring race?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"race" text,
"length" text,
"class" text,
"circuit" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the class of the Coca-cola classic 12 hours of sebring race?`:
```sql
|
SELECT "class" FROM "schedule" WHERE "race"='budweiser grand prix of miami' AND "length"='3 hours'; |
## Task
Generate a SQL query to answer the following question:
`What is the class of the Budweiser Grand Prix of Miami race with a length of 3 hours?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"race" text,
"length" text,
"class" text,
"circuit" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the class of the Budweiser Grand Prix of Miami race with a length of 3 hours?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "circuit"='daytona international speedway' AND "race"='paul revere 250'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the Paul Revere 250 race in the Daytona International Speedway circuit?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"race" text,
"length" text,
"class" text,
"circuit" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the Paul Revere 250 race in the Daytona International Speedway circuit?`:
```sql
|
SELECT "race" FROM "schedule" WHERE "length"='12 hours'; |
## Task
Generate a SQL query to answer the following question:
`What race is 12 hours in length?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"race" text,
"length" text,
"class" text,
"circuit" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What race is 12 hours in length?`:
```sql
|
SELECT MAX("round") FROM "nhl_draft" WHERE "nationality"='finland'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest round for the pick from Finland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nhl_draft" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest round for the pick from Finland?`:
```sql
|
SELECT COUNT("round") FROM "nhl_draft" WHERE "player"='joe barnes'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of rounds that Joe Barnes was picked?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nhl_draft" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of rounds that Joe Barnes was picked?`:
```sql
|
SELECT COUNT("2nd_m") FROM "engelberg" WHERE "name"='thomas morgenstern' AND "1st_m"<132.5; |
## Task
Generate a SQL query to answer the following question:
`What is the total 2nd of Thomas Morgenstern, who has a 1st less than 132.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engelberg" (
"rank" real,
"name" text,
"nationality" text,
"1st_m" real,
"2nd_m" real,
"points" real,
"overall_wc_points_rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total 2nd of Thomas Morgenstern, who has a 1st less than 132.5?`:
```sql
|
SELECT "order" FROM "iaba_olympic_medals" WHERE "olympic_games"='tokyo'; |
## Task
Generate a SQL query to answer the following question:
`What was the order of the Tokyo olympic games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "iaba_olympic_medals" (
"order" text,
"year" real,
"olympic_games" text,
"medal" text,
"weight" text,
"boxer" text,
"club" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the order of the Tokyo olympic games?`:
```sql
|
SELECT "club" FROM "iaba_olympic_medals" WHERE "year"=2012 AND "order"='15th'; |
## Task
Generate a SQL query to answer the following question:
`What was the 15th club in 2012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "iaba_olympic_medals" (
"order" text,
"year" real,
"olympic_games" text,
"medal" text,
"weight" text,
"boxer" text,
"club" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the 15th club in 2012?`:
```sql
|
SELECT "medal" FROM "iaba_olympic_medals" WHERE "weight"='fly' AND "boxer"='michael conlon'; |
## Task
Generate a SQL query to answer the following question:
`What medal did Michael Conlon, with a weight of fly, win?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "iaba_olympic_medals" (
"order" text,
"year" real,
"olympic_games" text,
"medal" text,
"weight" text,
"boxer" text,
"club" text
);
### SQL
Given the database schema, here is the SQL query that answers `What medal did Michael Conlon, with a weight of fly, win?`:
```sql
|
SELECT "loss" FROM "game_log" WHERE "attendance">'45,036'; |
## Task
Generate a SQL query to answer the following question:
`How many losses have more than 45,036 attendance?`
### 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,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many losses have more than 45,036 attendance?`:
```sql
|
SELECT SUM("attendance") FROM "game_log" WHERE "date"='april 29'; |
## Task
Generate a SQL query to answer the following question:
`on april 29, what was the attendance?`
### 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,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `on april 29, what was the attendance?`:
```sql
|
SELECT AVG("attendance") FROM "game_log" WHERE "date"='april 9'; |
## Task
Generate a SQL query to answer the following question:
`on april 9 what was the attendance?`
### 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,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `on april 9 what was the attendance?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "score"='postponed (rain) rescheduled for august 7'; |
## Task
Generate a SQL query to answer the following question:
`What date has postponed (rain) rescheduled for august 7 as the score?`
### 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 date has postponed (rain) rescheduled for august 7 as the score?`:
```sql
|
SELECT MIN("partial_failures") FROM "by_country" WHERE "failures">0 AND "successes"=1; |
## Task
Generate a SQL query to answer the following question:
`Failures larger than 0, and a Successes of 1 has what lowest partial failures?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_country" (
"country" text,
"launches" real,
"successes" real,
"failures" real,
"partial_failures" real
);
### SQL
Given the database schema, here is the SQL query that answers `Failures larger than 0, and a Successes of 1 has what lowest partial failures?`:
```sql
|
SELECT SUM("partial_failures") FROM "by_country" WHERE "successes"<6 AND "launches">1 AND "failures"=2; |
## Task
Generate a SQL query to answer the following question:
`Successes smaller than 6, and Launches larger than 1, and a Failures of 2 is what sum of the partial failures?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_country" (
"country" text,
"launches" real,
"successes" real,
"failures" real,
"partial_failures" real
);
### SQL
Given the database schema, here is the SQL query that answers `Successes smaller than 6, and Launches larger than 1, and a Failures of 2 is what sum of the partial failures?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "location"='pontiac silverdome'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opposing team during a game in the Pontiac Silverdome?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opposing team during a game in the Pontiac Silverdome?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "date"='january 23'; |
## Task
Generate a SQL query to answer the following question:
`What was the final score for the January 23 game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the final score for the January 23 game?`:
```sql
|
SELECT MAX("february") FROM "schedule_and_results" WHERE "opponent"='philadelphia flyers' AND "game">63; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Feb value having an opponent of the Philadelphia Flyers and is after game 63?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"february" real,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Feb value having an opponent of the Philadelphia Flyers and is after game 63?`:
```sql
|
SELECT "opponent" FROM "schedule_and_results" WHERE "game">58 AND "february">16 AND "record"='40-20-4'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent in games over 58, after Feb 16, and having a record of 40-20-4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"february" real,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent in games over 58, after Feb 16, and having a record of 40-20-4?`:
```sql
|
SELECT SUM("year") FROM "grammy_hall_of_fame" WHERE "genre"='rock (track)'; |
## Task
Generate a SQL query to answer the following question:
`Which Year has a Genre of rock (track)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grammy_hall_of_fame" (
"year" real,
"title" text,
"genre" text,
"label" text,
"year_inducted" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Year has a Genre of rock (track)?`:
```sql
|
SELECT MAX("year_inducted") FROM "grammy_hall_of_fame" WHERE "year"<1965; |
## Task
Generate a SQL query to answer the following question:
`Which Year Inducted is the highest one that has a Year smaller than 1965?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grammy_hall_of_fame" (
"year" real,
"title" text,
"genre" text,
"label" text,
"year_inducted" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Year Inducted is the highest one that has a Year smaller than 1965?`:
```sql
|
SELECT MAX("overall") FROM "jacksonville_jaguars_draft_history" WHERE "pick_num"<9 AND "name"='mike pearson'; |
## Task
Generate a SQL query to answer the following question:
`Which Overall is the highest one that has a Pick # smaller than 9, and a Name of mike pearson?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jacksonville_jaguars_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Overall is the highest one that has a Pick # smaller than 9, and a Name of mike pearson?`:
```sql
|
SELECT MIN("round") FROM "jacksonville_jaguars_draft_history" WHERE "position"='wide receiver' AND "overall"<222; |
## Task
Generate a SQL query to answer the following question:
`Which Round is the lowest one that has a Position of wide receiver, and an Overall smaller than 222?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jacksonville_jaguars_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Round is the lowest one that has a Position of wide receiver, and an Overall smaller than 222?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "date"='september 21'; |
## Task
Generate a SQL query to answer the following question:
`What was the Record on September 21?`
### 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,
"save" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Record on September 21?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "save"='david weathers (15)'; |
## Task
Generate a SQL query to answer the following question:
`What was the record the day David Weathers (15) had a save?`
### 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,
"save" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the record the day David Weathers (15) had a save?`:
```sql
|
SELECT "save" FROM "game_log" WHERE "date"='september 2'; |
## Task
Generate a SQL query to answer the following question:
`Who had a save on September 2?`
### 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,
"save" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had a save on September 2?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.