output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "time_retired" FROM "race" WHERE "constructor"='bmw sauber' AND "driver"='nick heidfeld'; |
## Task
Generate a SQL query to answer the following question:
`What is the Time/Retired for the BMW Sauber, and Nick Heidfeld?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Time/Retired for the BMW Sauber, and Nick Heidfeld?`:
```sql
|
SELECT COUNT("april") FROM "schedule_and_results" WHERE "game">83; |
## Task
Generate a SQL query to answer the following question:
`What were the total number of games in April greater than 83?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"april" real,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the total number of games in April greater than 83?`:
```sql
|
SELECT MIN("games") FROM "defense" WHERE "position"='wlb'; |
## Task
Generate a SQL query to answer the following question:
`Which Games↑ is the lowest one that has a Position of wlb?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "defense" (
"position" text,
"number" real,
"name" text,
"height" text,
"weight" text,
"class" text,
"hometown" text,
"games" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Games↑ is the lowest one that has a Position of wlb?`:
```sql
|
SELECT MIN("games") FROM "defense" WHERE "number"=98; |
## Task
Generate a SQL query to answer the following question:
`Which Games↑ is the lowest one that has a Number of 98?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "defense" (
"position" text,
"number" real,
"name" text,
"height" text,
"weight" text,
"class" text,
"hometown" text,
"games" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Games↑ is the lowest one that has a Number of 98?`:
```sql
|
SELECT "height" FROM "roster_and_rotation" WHERE "name"='josh tabb'; |
## Task
Generate a SQL query to answer the following question:
`What is the height of Josh Tabb?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "roster_and_rotation" (
"name" text,
"number" real,
"team_position" real,
"height" text,
"year" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the height of Josh Tabb?`:
```sql
|
SELECT "series_ep" FROM "season_11_2008" WHERE "segment_c"='stetson hats (part 1)'; |
## Task
Generate a SQL query to answer the following question:
`What series episode has stetson hats (part 1) under segment C?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_11_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 series episode has stetson hats (part 1) under segment C?`:
```sql
|
SELECT "segment_c" FROM "season_11_2008" WHERE "segment_b"='s cuckoo clock'; |
## Task
Generate a SQL query to answer the following question:
`What is under segment C when s cuckoo clock is under segment B?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_11_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 is under segment C when s cuckoo clock is under segment B?`:
```sql
|
SELECT "segment_c" FROM "season_11_2008" WHERE "segment_b"='s pineapple'; |
## Task
Generate a SQL query to answer the following question:
`When segment B is s pineapple, what is the segment C?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_11_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 `When segment B is s pineapple, what is the segment C?`:
```sql
|
SELECT "series_ep" FROM "season_11_2008" WHERE "segment_b"='jukeboxes'; |
## Task
Generate a SQL query to answer the following question:
`What series episode has jukeboxes as segment B?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_11_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 series episode has jukeboxes as segment B?`:
```sql
|
SELECT MIN("week") FROM "schedule" WHERE "result"='w 30-3' AND "attendance"<'62,795'; |
## Task
Generate a SQL query to answer the following question:
`What week ended in a result of w 30-3, and had an attendance less than 62,795?`
### 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 week ended in a result of w 30-3, and had an attendance less than 62,795?`:
```sql
|
SELECT "format" FROM "release_history" WHERE "catalog"=61298 AND "date"='september 1984'; |
## Task
Generate a SQL query to answer the following question:
`Which Format has a Catalog of 61298, and a Date of september 1984?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Format has a Catalog of 61298, and a Date of september 1984?`:
```sql
|
SELECT "catalog" FROM "release_history" WHERE "format"='7\" single (second cover)'; |
## Task
Generate a SQL query to answer the following question:
`Which Catalog has a Format of 7" single (second cover)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Catalog has a Format of 7" single (second cover)?`:
```sql
|
SELECT "region" FROM "release_history" WHERE "label"='rca' AND "catalog"=61298 AND "format"='7\" single (first cover)'; |
## Task
Generate a SQL query to answer the following question:
`Which Region has a Label of rca, and a Catalog of 61298, and a Format of 7" single (first cover)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Region has a Label of rca, and a Catalog of 61298, and a Format of 7" single (first cover)?`:
```sql
|
SELECT "format" FROM "release_history" WHERE "catalog"<61298; |
## Task
Generate a SQL query to answer the following question:
`Which Format has a Catalog smaller than 61298?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Format has a Catalog smaller than 61298?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "points"=96; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game with 96 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game with 96 points?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "record"='34–17–11–2'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game with a record of 34–17–11–2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game with a record of 34–17–11–2?`:
```sql
|
SELECT "record" FROM "schedule" WHERE "game_site"='rich stadium'; |
## Task
Generate a SQL query to answer the following question:
`What was the record after the game at Rich Stadium?`
### 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 `What was the record after the game at Rich Stadium?`:
```sql
|
SELECT "first_cap" FROM "top_goalscorers" WHERE "caps"=74; |
## Task
Generate a SQL query to answer the following question:
`When was the first cap associated with 74 caps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_goalscorers" (
"name" text,
"goals" real,
"caps" real,
"first_cap" text,
"latest_cap" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the first cap associated with 74 caps?`:
```sql
|
SELECT AVG("goals") FROM "top_goalscorers" WHERE "latest_cap"='april 24, 2013' AND "caps">97; |
## Task
Generate a SQL query to answer the following question:
`How many goals are associated with over 97 caps and a Latest cap of april 24, 2013?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_goalscorers" (
"name" text,
"goals" real,
"caps" real,
"first_cap" text,
"latest_cap" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many goals are associated with over 97 caps and a Latest cap of april 24, 2013?`:
```sql
|
SELECT "first_cap" FROM "top_goalscorers" WHERE "goals"<33 AND "caps"=39; |
## Task
Generate a SQL query to answer the following question:
`When was the first cap associated with 39 caps and under 33 goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_goalscorers" (
"name" text,
"goals" real,
"caps" real,
"first_cap" text,
"latest_cap" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the first cap associated with 39 caps and under 33 goals?`:
```sql
|
SELECT MAX("goals") FROM "top_goalscorers" WHERE "caps"=39; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number of goals associated with 39 caps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_goalscorers" (
"name" text,
"goals" real,
"caps" real,
"first_cap" text,
"latest_cap" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of goals associated with 39 caps?`:
```sql
|
SELECT COUNT("april") FROM "regular_season" WHERE "record"='42–22–12–3' AND "points"<99; |
## Task
Generate a SQL query to answer the following question:
`How many days in April has a record of 42–22–12–3, and less than 99 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"april" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many days in April has a record of 42–22–12–3, and less than 99 points?`:
```sql
|
SELECT COUNT("points") FROM "regular_season" WHERE "game"=44 AND "january">15; |
## Task
Generate a SQL query to answer the following question:
`Name the total number of points for 44 game and january more than 15`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"january" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of points for 44 game and january more than 15`:
```sql
|
SELECT "men_s_doubles" FROM "past_winners" WHERE "men_s_singles"='kęstutis navickas' AND "women_s_singles"='ugnė urbonaitė' AND "year">2004; |
## Task
Generate a SQL query to answer the following question:
`Men's singles of kęstutis navickas, and a Women's singles of ugnė urbonaitė, and a Year larger than 2004 involved which mens double?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_winners" (
"year" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
### SQL
Given the database schema, here is the SQL query that answers `Men's singles of kęstutis navickas, and a Women's singles of ugnė urbonaitė, and a Year larger than 2004 involved which mens double?`:
```sql
|
SELECT "mixed_doubles" FROM "past_winners" WHERE "women_s_singles"='akvilė stapušaitytė' AND "year"=2010; |
## Task
Generate a SQL query to answer the following question:
`Women's singles of akvilė stapušaitytė, and a Year of 2010 had what mixed doubles?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_winners" (
"year" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
### SQL
Given the database schema, here is the SQL query that answers `Women's singles of akvilė stapušaitytė, and a Year of 2010 had what mixed doubles?`:
```sql
|
SELECT "women_s_doubles" FROM "past_winners" WHERE "year"<1993 AND "women_s_singles"='jūratė markaitytė' AND "men_s_singles"='arūnas petkevičius'; |
## Task
Generate a SQL query to answer the following question:
`Year smaller than 1993, and a Women's singles of jūratė markaitytė, and a Men's singles of arūnas petkevičius involved which women's doubles?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_winners" (
"year" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
### SQL
Given the database schema, here is the SQL query that answers `Year smaller than 1993, and a Women's singles of jūratė markaitytė, and a Men's singles of arūnas petkevičius involved which women's doubles?`:
```sql
|
SELECT "date" FROM "preseason" WHERE "result"='7–20'; |
## Task
Generate a SQL query to answer the following question:
`Which Date had a Result of 7–20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preseason" (
"week" text,
"date" text,
"kickoff" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text,
"nfl_recap" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date had a Result of 7–20?`:
```sql
|
SELECT "date" FROM "preseason" WHERE "opponent"='buffalo bills'; |
## Task
Generate a SQL query to answer the following question:
`Which Date had an Opponent of buffalo bills?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preseason" (
"week" text,
"date" text,
"kickoff" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text,
"nfl_recap" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date had an Opponent of buffalo bills?`:
```sql
|
SELECT "kickoff" FROM "preseason" WHERE "game_site"='bank of america stadium'; |
## Task
Generate a SQL query to answer the following question:
`Which Kickoff had a Game Site of bank of america stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preseason" (
"week" text,
"date" text,
"kickoff" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text,
"nfl_recap" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Kickoff had a Game Site of bank of america stadium?`:
```sql
|
SELECT "kickoff" FROM "preseason" WHERE "game_site"='fawcett stadium'; |
## Task
Generate a SQL query to answer the following question:
`Which Kickoff had a Game Site of fawcett stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preseason" (
"week" text,
"date" text,
"kickoff" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text,
"nfl_recap" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Kickoff had a Game Site of fawcett stadium?`:
```sql
|
SELECT "nfl_recap" FROM "preseason" WHERE "kickoff"='7:00pm edt'; |
## Task
Generate a SQL query to answer the following question:
`Which NFL Recap had a Kickoff of 7:00pm edt?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preseason" (
"week" text,
"date" text,
"kickoff" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text,
"nfl_recap" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which NFL Recap had a Kickoff of 7:00pm edt?`:
```sql
|
SELECT "nfl_recap" FROM "preseason" WHERE "record"='1–3'; |
## Task
Generate a SQL query to answer the following question:
`Which NFL Recap had a Record of 1–3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preseason" (
"week" text,
"date" text,
"kickoff" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text,
"nfl_recap" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which NFL Recap had a Record of 1–3?`:
```sql
|
SELECT "record" FROM "schedule_and_results" WHERE "game"=50; |
## Task
Generate a SQL query to answer the following question:
`What was the Record on Game 50?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"january" real,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Record on Game 50?`:
```sql
|
SELECT "player" FROM "nfl_draft" WHERE "round"=17; |
## Task
Generate a SQL query to answer the following question:
`what player score is higher than 17`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `what player score is higher than 17`:
```sql
|
SELECT MIN("total_population") FROM "distribution" WHERE "regional_percentage_of_population"=2.95; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest population associated with a Regional Percentage of Population of 2.95?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "distribution" (
"region" text,
"total_population" real,
"manchu" real,
"percentage_in_manchu_population" text,
"regional_percentage_of_population" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest population associated with a Regional Percentage of Population of 2.95?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "attendance"='17,015'; |
## Task
Generate a SQL query to answer the following question:
`Which opponent has an attendance of 17,015?`
### 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" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which opponent has an attendance of 17,015?`:
```sql
|
SELECT MAX("frequency_m_hz") FROM "translators" WHERE "call_sign"='k241an'; |
## Task
Generate a SQL query to answer the following question:
`Which Frequency MHz is the highest one that has a Call sign of k241an?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Frequency MHz is the highest one that has a Call sign of k241an?`:
```sql
|
SELECT MAX("erp_w") FROM "translators" WHERE "frequency_m_hz">88.3 AND "city_of_license"='lewis, kansas'; |
## Task
Generate a SQL query to answer the following question:
`Which ERP W is the highest one that has a Frequency MHz larger than 88.3, and a City of license of lewis, kansas?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which ERP W is the highest one that has a Frequency MHz larger than 88.3, and a City of license of lewis, kansas?`:
```sql
|
SELECT "fcc_info" FROM "translators" WHERE "erp_w"<222 AND "call_sign"='k297ai'; |
## Task
Generate a SQL query to answer the following question:
`Which FCC info has a ERP W smaller than 222, and a Call sign of k297ai?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which FCC info has a ERP W smaller than 222, and a Call sign of k297ai?`:
```sql
|
SELECT "city_of_license" FROM "translators" WHERE "call_sign"='k241an'; |
## Task
Generate a SQL query to answer the following question:
`Which City of license has a Call sign of k241an?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which City of license has a Call sign of k241an?`:
```sql
|
SELECT "class" FROM "translators" WHERE "erp_w"=222; |
## Task
Generate a SQL query to answer the following question:
`Which Class has an ERP W of 222?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Class has an ERP W of 222?`:
```sql
|
SELECT "score" FROM "grand_slam_tournament_performance_timeli" WHERE "surface"='clay' AND "year">2006 AND "opponent"='david ferrer'; |
## Task
Generate a SQL query to answer the following question:
`What was the score on a clay surface in a year later than 2006 with David Ferrer as an opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_slam_tournament_performance_timeli" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score on a clay surface in a year later than 2006 with David Ferrer as an opponent?`:
```sql
|
SELECT "championship" FROM "grand_slam_tournament_performance_timeli" WHERE "year">2010 AND "surface"='grass'; |
## Task
Generate a SQL query to answer the following question:
`Which championship is in a year later than 2010 on a grass surface?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_slam_tournament_performance_timeli" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which championship is in a year later than 2010 on a grass surface?`:
```sql
|
SELECT "championship" FROM "grand_slam_tournament_performance_timeli" WHERE "opponent"='roger federer' AND "surface"='clay' AND "year"<2007; |
## Task
Generate a SQL query to answer the following question:
`Which championship has Roger Federer as an opponent on a clay surface in a year earlier than 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_slam_tournament_performance_timeli" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which championship has Roger Federer as an opponent on a clay surface in a year earlier than 2007?`:
```sql
|
SELECT COUNT("week") FROM "schedule" WHERE "attendance">'21,231' AND "result"='l 38-10'; |
## Task
Generate a SQL query to answer the following question:
`How many weeks have an attendance greater than 21,231, with l 38-10 as the result?`
### 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 `How many weeks have an attendance greater than 21,231, with l 38-10 as the result?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "attendance">'57,491' AND "date"='october 28, 1962'; |
## Task
Generate a SQL query to answer the following question:
`Which opponent has an attendance greater than 57,491, with october 28, 1962 as the date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which opponent has an attendance greater than 57,491, with october 28, 1962 as the date?`:
```sql
|
SELECT MAX("attendance") FROM "schedule" WHERE "date"='december 16, 1962'; |
## Task
Generate a SQL query to answer the following question:
`What is the largest attendance that has December 16, 1962 as the date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest attendance that has December 16, 1962 as the date?`:
```sql
|
SELECT MAX("week") FROM "schedule" WHERE "result"='t 35-35'; |
## Task
Generate a SQL query to answer the following question:
`What is the largest week that has t 35-35 as the result?`
### 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 largest week that has t 35-35 as the result?`:
```sql
|
SELECT COUNT("no_result") FROM "summary_of_results_by_season" WHERE "losses">1 AND "played"=38 AND "wins"<19; |
## Task
Generate a SQL query to answer the following question:
`Name the total number of no result for losses more than 1 and played of 38 and wins less than 19`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary_of_results_by_season" (
"played" real,
"wins" real,
"losses" real,
"no_result" real,
"pct_win" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of no result for losses more than 1 and played of 38 and wins less than 19`:
```sql
|
SELECT SUM("played") FROM "summary_of_results_by_season" WHERE "wins">19; |
## Task
Generate a SQL query to answer the following question:
`Name the sum of played with wins more than 19`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary_of_results_by_season" (
"played" real,
"wins" real,
"losses" real,
"no_result" real,
"pct_win" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sum of played with wins more than 19`:
```sql
|
SELECT COUNT("losses") FROM "summary_of_results_by_season" WHERE "no_result"<0; |
## Task
Generate a SQL query to answer the following question:
`Name the total number of losses with number result less than 0`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary_of_results_by_season" (
"played" real,
"wins" real,
"losses" real,
"no_result" real,
"pct_win" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of losses with number result less than 0`:
```sql
|
SELECT "rank" FROM "top_scorers" WHERE "goals">4 AND "scorer"='oh seok-jae'; |
## Task
Generate a SQL query to answer the following question:
`Which Rank has Goals larger than 4, and a Scorer of oh seok-jae?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_scorers" (
"rank" text,
"scorer" text,
"club" text,
"goals" real,
"matches" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank has Goals larger than 4, and a Scorer of oh seok-jae?`:
```sql
|
SELECT MIN("goals") FROM "top_scorers" WHERE "matches"='16' AND "scorer"='park sang-in'; |
## Task
Generate a SQL query to answer the following question:
`Which Goals is the lowest one that has Matches of 16, and a Scorer of park sang-in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_scorers" (
"rank" text,
"scorer" text,
"club" text,
"goals" real,
"matches" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Goals is the lowest one that has Matches of 16, and a Scorer of park sang-in?`:
```sql
|
SELECT "club" FROM "top_scorers" WHERE "rank"='1'; |
## Task
Generate a SQL query to answer the following question:
`Which Club has a Rank of 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_scorers" (
"rank" text,
"scorer" text,
"club" text,
"goals" real,
"matches" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Club has a Rank of 1?`:
```sql
|
SELECT SUM("goals") FROM "top_scorers" WHERE "club"='hallelujah fc' AND "rank"='7'; |
## Task
Generate a SQL query to answer the following question:
`Which Goals have a Club of hallelujah fc, and a Rank of 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_scorers" (
"rank" text,
"scorer" text,
"club" text,
"goals" real,
"matches" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Goals have a Club of hallelujah fc, and a Rank of 7?`:
```sql
|
SELECT COUNT("extra_points") FROM "michigan_86_ohio_state_0" WHERE "touchdowns">2 AND "field_goals">0; |
## Task
Generate a SQL query to answer the following question:
`How many Extra points have Touchdowns larger than 2, and Field goals larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "michigan_86_ohio_state_0" (
"player" text,
"touchdowns" real,
"extra_points" real,
"field_goals" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Extra points have Touchdowns larger than 2, and Field goals larger than 0?`:
```sql
|
SELECT MAX("field_goals") FROM "michigan_86_ohio_state_0" WHERE "touchdowns"=0 AND "points">4; |
## Task
Generate a SQL query to answer the following question:
`Which Field goals is the highest one that has Touchdowns of 0, and Points larger than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "michigan_86_ohio_state_0" (
"player" text,
"touchdowns" real,
"extra_points" real,
"field_goals" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Field goals is the highest one that has Touchdowns of 0, and Points larger than 4?`:
```sql
|
SELECT COUNT("totals") FROM "statistics_at_michigan" WHERE "high_game_tackles"='19 (purdue)' AND "interceptions"<3; |
## Task
Generate a SQL query to answer the following question:
`How many Totals have a High Game Tackles of 19 (purdue), and Interceptions smaller than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics_at_michigan" (
"year" text,
"tackles" real,
"assists" real,
"totals" real,
"interceptions" real,
"high_game_tackles" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Totals have a High Game Tackles of 19 (purdue), and Interceptions smaller than 3?`:
```sql
|
SELECT SUM("grid") FROM "125cc_classification" WHERE "manufacturer"='aprilia' AND "laps"<19 AND "rider"='sandro cortese'; |
## Task
Generate a SQL query to answer the following question:
`What is the grid number of Sandro Cortese, who has Aprilia as the manufacturer and less than 19 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "125cc_classification" (
"rider" text,
"manufacturer" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the grid number of Sandro Cortese, who has Aprilia as the manufacturer and less than 19 laps?`:
```sql
|
SELECT MAX("rank") FROM "all_time_ranking_in_the_championship_pla" WHERE "lost"<12 AND "played">20 AND "avg_points">1.73; |
## Task
Generate a SQL query to answer the following question:
`Which Rank has a Lost smaller than 12, and a Played larger than 20, and an Avg Points larger than 1.73?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_ranking_in_the_championship_pla" (
"rank" real,
"club" text,
"seasons" real,
"played" real,
"drew" real,
"lost" real,
"points" real,
"avg_points" real,
"goals_for" real,
"goals_against" real,
"goal_diff" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank has a Lost smaller than 12, and a Played larger than 20, and an Avg Points larger than 1.73?`:
```sql
|
SELECT COUNT("drew") FROM "all_time_ranking_in_the_championship_pla" WHERE "rank"=5 AND "played">30; |
## Task
Generate a SQL query to answer the following question:
`Which Drew has a Rank of 5, and a Played larger than 30?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_ranking_in_the_championship_pla" (
"rank" real,
"club" text,
"seasons" real,
"played" real,
"drew" real,
"lost" real,
"points" real,
"avg_points" real,
"goals_for" real,
"goals_against" real,
"goal_diff" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Drew has a Rank of 5, and a Played larger than 30?`:
```sql
|
SELECT COUNT("rank") FROM "all_time_ranking_in_the_championship_pla" WHERE "club"='zulte waregem' AND "points">22; |
## Task
Generate a SQL query to answer the following question:
`Which Rank has a Club of zulte waregem, and Points larger than 22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_ranking_in_the_championship_pla" (
"rank" real,
"club" text,
"seasons" real,
"played" real,
"drew" real,
"lost" real,
"points" real,
"avg_points" real,
"goals_for" real,
"goals_against" real,
"goal_diff" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank has a Club of zulte waregem, and Points larger than 22?`:
```sql
|
SELECT MAX("lost") FROM "all_time_ranking_in_the_championship_pla" WHERE "seasons"=2 AND "goals_against">43; |
## Task
Generate a SQL query to answer the following question:
`Which Lost has Seasons of 2, and Goals against larger than 43?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_ranking_in_the_championship_pla" (
"rank" real,
"club" text,
"seasons" real,
"played" real,
"drew" real,
"lost" real,
"points" real,
"avg_points" real,
"goals_for" real,
"goals_against" real,
"goal_diff" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Lost has Seasons of 2, and Goals against larger than 43?`:
```sql
|
SELECT SUM("drew") FROM "all_time_ranking_in_the_championship_pla" WHERE "lost">14; |
## Task
Generate a SQL query to answer the following question:
`Which Drew has a Lost larger than 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_ranking_in_the_championship_pla" (
"rank" real,
"club" text,
"seasons" real,
"played" real,
"drew" real,
"lost" real,
"points" real,
"avg_points" real,
"goals_for" real,
"goals_against" real,
"goal_diff" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Drew has a Lost larger than 14?`:
```sql
|
SELECT "record" FROM "schedule" WHERE "week"<15 AND "opponent"='at new york jets'; |
## Task
Generate a SQL query to answer the following question:
`Which Record has a Week smaller than 15, and an Opponent of at new york jets?`
### 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,
"location" text,
"time_et" text,
"result" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Record has a Week smaller than 15, and an Opponent of at new york jets?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "record"='5–4'; |
## Task
Generate a SQL query to answer the following question:
`Which Result has a Record of 5–4?`
### 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,
"location" text,
"time_et" text,
"result" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Result has a Record of 5–4?`:
```sql
|
SELECT "record" FROM "schedule" WHERE "time_et"='1:00pm' AND "opponent"='kansas city chiefs'; |
## Task
Generate a SQL query to answer the following question:
`Which Record has a Time (ET) of 1:00pm, and an Opponent of kansas city chiefs?`
### 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,
"location" text,
"time_et" text,
"result" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Record has a Time (ET) of 1:00pm, and an Opponent of kansas city chiefs?`:
```sql
|
SELECT "7_30" FROM "monday" WHERE "8_30"='melrose place'; |
## Task
Generate a SQL query to answer the following question:
`What is the 7:30 feature with an 8:30 feature Melrose Place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "monday" (
"7_00" text,
"7_30" text,
"8_00" text,
"8_30" text,
"9_00" text,
"9_30" text,
"10_00" text,
"10_30" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 7:30 feature with an 8:30 feature Melrose Place?`:
```sql
|
SELECT "8_30" FROM "monday" WHERE "7_00"='loft story'; |
## Task
Generate a SQL query to answer the following question:
`What is the 8:30 feature with a 7:00 feature Loft Story?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "monday" (
"7_00" text,
"7_30" text,
"8_00" text,
"8_30" text,
"9_00" text,
"9_30" text,
"10_00" text,
"10_30" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 8:30 feature with a 7:00 feature Loft Story?`:
```sql
|
SELECT "8_00" FROM "monday" WHERE "7_00"='air farce'; |
## Task
Generate a SQL query to answer the following question:
`What is the 8:00 feature with a 7:00 feature Air Farce?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "monday" (
"7_00" text,
"7_30" text,
"8_00" text,
"8_30" text,
"9_00" text,
"9_30" text,
"10_00" text,
"10_30" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 8:00 feature with a 7:00 feature Air Farce?`:
```sql
|
SELECT "10_30" FROM "monday" WHERE "7_30"='hercule'; |
## Task
Generate a SQL query to answer the following question:
`What is the 10:30 feature with Hercule as the 7:30 feature?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "monday" (
"7_00" text,
"7_30" text,
"8_00" text,
"8_30" text,
"9_00" text,
"9_30" text,
"10_00" text,
"10_30" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 10:30 feature with Hercule as the 7:30 feature?`:
```sql
|
SELECT "8_00" FROM "monday" WHERE "8_30"='mad about you'; |
## Task
Generate a SQL query to answer the following question:
`What is the 8:00 feature with Mad About You as the 8:30 feature?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "monday" (
"7_00" text,
"7_30" text,
"8_00" text,
"8_30" text,
"9_00" text,
"9_30" text,
"10_00" text,
"10_30" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 8:00 feature with Mad About You as the 8:30 feature?`:
```sql
|
SELECT "7_30" FROM "monday" WHERE "8_00"='cosby'; |
## Task
Generate a SQL query to answer the following question:
`What is the 7:30 feature with an 8:00 feature of Cosby?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "monday" (
"7_00" text,
"7_30" text,
"8_00" text,
"8_30" text,
"9_00" text,
"9_30" text,
"10_00" text,
"10_30" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 7:30 feature with an 8:00 feature of Cosby?`:
```sql
|
SELECT "hindi" FROM "classification" WHERE "domari"='tærən'; |
## Task
Generate a SQL query to answer the following question:
`What is the Hindi associated with a Domari of tærən?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"hindi" text,
"romani" text,
"domari" text,
"lomavren" text,
"persian" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Hindi associated with a Domari of tærən?`:
```sql
|
SELECT "lomavren" FROM "classification" WHERE "persian"='se'; |
## Task
Generate a SQL query to answer the following question:
`What is the Lomavren associated with a Persian of se?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"hindi" text,
"romani" text,
"domari" text,
"lomavren" text,
"persian" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Lomavren associated with a Persian of se?`:
```sql
|
SELECT "romani" FROM "classification" WHERE "domari"='na'; |
## Task
Generate a SQL query to answer the following question:
`What is the Romani associated with a Domari of na?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"hindi" text,
"romani" text,
"domari" text,
"lomavren" text,
"persian" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Romani associated with a Domari of na?`:
```sql
|
SELECT "domari" FROM "classification" WHERE "persian"='yak, yek'; |
## Task
Generate a SQL query to answer the following question:
`What is the Domari associated with a Persian of yak, yek?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"hindi" text,
"romani" text,
"domari" text,
"lomavren" text,
"persian" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Domari associated with a Persian of yak, yek?`:
```sql
|
SELECT "lomavren" FROM "classification" WHERE "hindi"='sāt'; |
## Task
Generate a SQL query to answer the following question:
`What is the Lomavren associated with a Hindi of sāt?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"hindi" text,
"romani" text,
"domari" text,
"lomavren" text,
"persian" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Lomavren associated with a Hindi of sāt?`:
```sql
|
SELECT "version" FROM "official_versions" WHERE "year"<2001 AND "length"='7:42'; |
## Task
Generate a SQL query to answer the following question:
`What is the Version before 2001 with a Length of 7:42?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "official_versions" (
"version" text,
"length" text,
"album" text,
"remixed_by" text,
"year" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Version before 2001 with a Length of 7:42?`:
```sql
|
SELECT AVG("year") FROM "official_versions" WHERE "length"='7:42'; |
## Task
Generate a SQL query to answer the following question:
`In what Year is the length of the Song 7:42?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "official_versions" (
"version" text,
"length" text,
"album" text,
"remixed_by" text,
"year" real
);
### SQL
Given the database schema, here is the SQL query that answers `In what Year is the length of the Song 7:42?`:
```sql
|
SELECT "college_junior_club_team_league" FROM "draft_picks" WHERE "position"='right wing' AND "round"<3; |
## Task
Generate a SQL query to answer the following question:
`Which College/Junior/Club Team (League) has a Position of right wing, and a Round smaller than 3?`
### 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 College/Junior/Club Team (League) has a Position of right wing, and a Round smaller than 3?`:
```sql
|
SELECT "orbital_regime" FROM "by_orbit" WHERE "launches">4 AND "failures"<2; |
## Task
Generate a SQL query to answer the following question:
`What is the orbital regime of launches greater than 4 and failures less than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_orbit" (
"orbital_regime" text,
"launches" real,
"successes" real,
"failures" real,
"accidentally_achieved" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the orbital regime of launches greater than 4 and failures less than 2?`:
```sql
|
SELECT SUM("accidentally_achieved") FROM "by_orbit" WHERE "orbital_regime"='medium earth' AND "successes">3; |
## Task
Generate a SQL query to answer the following question:
`What is the total of medium earth orbital regime, accidentally achieved and successes greater than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_orbit" (
"orbital_regime" text,
"launches" real,
"successes" real,
"failures" real,
"accidentally_achieved" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total of medium earth orbital regime, accidentally achieved and successes greater than 3?`:
```sql
|
SELECT MAX("successes") FROM "by_orbit" WHERE "failures">1 AND "launches"<28; |
## Task
Generate a SQL query to answer the following question:
`What is the greatest successes that have failures greater than 1 and launches less than 28?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_orbit" (
"orbital_regime" text,
"launches" real,
"successes" real,
"failures" real,
"accidentally_achieved" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the greatest successes that have failures greater than 1 and launches less than 28?`:
```sql
|
SELECT SUM("failures") FROM "by_orbit" WHERE "orbital_regime"='heliocentric orbit' AND "launches"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the total failures of heliocentric orbit orbital regimes and launches less than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_orbit" (
"orbital_regime" text,
"launches" real,
"successes" real,
"failures" real,
"accidentally_achieved" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total failures of heliocentric orbit orbital regimes and launches less than 1?`:
```sql
|
SELECT "rank" FROM "see_also" WHERE "player"='tris speaker' AND "bb_so"=7; |
## Task
Generate a SQL query to answer the following question:
`What was the rank of tris speaker when BB/SO was 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"rank" real,
"player" text,
"team" text,
"year" real,
"bb_so" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the rank of tris speaker when BB/SO was 7?`:
```sql
|
SELECT AVG("rank") FROM "see_also" WHERE "team"='cle' AND "bb_so"=10.89; |
## Task
Generate a SQL query to answer the following question:
`What is the average rank for team cle when the BB/SO is 10.89?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"rank" real,
"player" text,
"team" text,
"year" real,
"bb_so" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average rank for team cle when the BB/SO is 10.89?`:
```sql
|
SELECT "partner" FROM "futures_titles" WHERE "surface"='hard' AND "date"='18 april 2011'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of a partner that played on a hard surface on 18 April 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "futures_titles" (
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of a partner that played on a hard surface on 18 April 2011?`:
```sql
|
SELECT "score" FROM "futures_titles" WHERE "date"='2 july 2012'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the final played on 2 July 2012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "futures_titles" (
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score for the final played on 2 July 2012?`:
```sql
|
SELECT "score" FROM "doubles_15_10_5" WHERE "date"='february 18, 2008'; |
## Task
Generate a SQL query to answer the following question:
`What was the Score on February 18, 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_15_10_5" (
"outcome" text,
"date" text,
"surface" text,
"partner" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Score on February 18, 2008?`:
```sql
|
SELECT "opponent_in_the_final" FROM "doubles_15_10_5" WHERE "surface"='hard' AND "score"='3–6, 6–3, [7–10]'; |
## Task
Generate a SQL query to answer the following question:
`What was the Opponent on the game played on a Hard Surface with a Score of 3–6, 6–3, [7–10]?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_15_10_5" (
"outcome" text,
"date" text,
"surface" text,
"partner" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Opponent on the game played on a Hard Surface with a Score of 3–6, 6–3, [7–10]?`:
```sql
|
SELECT "surface" FROM "doubles_15_10_5" WHERE "partner"='david martin' AND "score"='4–6, 6–7 (4-7)'; |
## Task
Generate a SQL query to answer the following question:
`On what Surface was the game with Partner David Martin played Scoring 4–6, 6–7 (4-7)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_15_10_5" (
"outcome" text,
"date" text,
"surface" text,
"partner" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what Surface was the game with Partner David Martin played Scoring 4–6, 6–7 (4-7)?`:
```sql
|
SELECT "outcome" FROM "doubles_15_10_5" WHERE "score"='3–6, 4–6'; |
## Task
Generate a SQL query to answer the following question:
`What was the Outcome of the game with a Score of 3–6, 4–6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_15_10_5" (
"outcome" text,
"date" text,
"surface" text,
"partner" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Outcome of the game with a Score of 3–6, 4–6?`:
```sql
|
SELECT "partner" FROM "doubles_15_10_5" WHERE "date"='june 17, 2012'; |
## Task
Generate a SQL query to answer the following question:
`What was the Partner on June 17, 2012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_15_10_5" (
"outcome" text,
"date" text,
"surface" text,
"partner" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Partner on June 17, 2012?`:
```sql
|
SELECT "record" FROM "april" WHERE "leading_scorer"='glenn robinson (16)'; |
## Task
Generate a SQL query to answer the following question:
`What record has Glenn Robinson (16) as the leading scorer?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "april" (
"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 record has Glenn Robinson (16) as the leading scorer?`:
```sql
|
SELECT "date" FROM "april" WHERE "score"='136-134'; |
## Task
Generate a SQL query to answer the following question:
`What date has 136-134 as the score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "april" (
"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 date has 136-134 as the score?`:
```sql
|
SELECT "home" FROM "april" WHERE "score"='136-134'; |
## Task
Generate a SQL query to answer the following question:
`What home has 136-134 as the score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "april" (
"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 home has 136-134 as the score?`:
```sql
|
SELECT MAX("year") FROM "team" WHERE "bronze"='china'; |
## Task
Generate a SQL query to answer the following question:
`What is the most recent year that China won a 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 is the most recent year that China won a bronze?`:
```sql
|
SELECT MIN("year") FROM "team" WHERE "location"='guangzhou'; |
## Task
Generate a SQL query to answer the following question:
`What is the oldest year that the location was at Guangzhou?`
### 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 is the oldest year that the location was at Guangzhou?`:
```sql
|
SELECT SUM("year") FROM "team" WHERE "location"='beijing'; |
## Task
Generate a SQL query to answer the following question:
`For how many years was the location at Beijing?`
### 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 `For how many years was the location at Beijing?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.