output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "score" FROM "regular_season" WHERE "points">8; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game that had more than 8 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"october" 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 that had more than 8 points?`:
```sql
|
SELECT "result" FROM "results" WHERE "round"='final'; |
## Task
Generate a SQL query to answer the following question:
`The round that had the final, what was the result?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"event" text,
"round" text,
"result" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `The round that had the final, what was the result?`:
```sql
|
SELECT "score" FROM "results" WHERE "opponent"='andry laffita'; |
## Task
Generate a SQL query to answer the following question:
`Opponent of andry laffita had what score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"event" text,
"round" text,
"result" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Opponent of andry laffita had what score?`:
```sql
|
SELECT "result" FROM "results" WHERE "opponent"='igor samoilenco'; |
## Task
Generate a SQL query to answer the following question:
`Opponent of igor samoilenco had what result?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"event" text,
"round" text,
"result" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Opponent of igor samoilenco had what result?`:
```sql
|
SELECT "round" FROM "results" WHERE "score"='33-22'; |
## Task
Generate a SQL query to answer the following question:
`Score of 33-22 had what round?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"event" text,
"round" text,
"result" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Score of 33-22 had what round?`:
```sql
|
SELECT "opponent" FROM "results" WHERE "round"='first'; |
## Task
Generate a SQL query to answer the following question:
`Round of first had what opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"event" text,
"round" text,
"result" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Round of first had what opponent?`:
```sql
|
SELECT "event" FROM "results" WHERE "result"='win' AND "score"='33-22'; |
## Task
Generate a SQL query to answer the following question:
`Result of win, and a Score of 33-22 involved what event?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"event" text,
"round" text,
"result" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Result of win, and a Score of 33-22 involved what event?`:
```sql
|
SELECT MIN("points") FROM "regular_season" WHERE "game"=60; |
## Task
Generate a SQL query to answer the following question:
`What were the lowest points of game 60?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"february" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What were the lowest points of game 60?`:
```sql
|
SELECT "championship" FROM "singles_5_2_3" WHERE "opponent_in_the_final"='francesca schiavone'; |
## Task
Generate a SQL query to answer the following question:
`What championship had Francesca Schiavone in the finals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_5_2_3" (
"outcome" text,
"date" text,
"championship" text,
"surface" text,
"opponent_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What championship had Francesca Schiavone in the finals?`:
```sql
|
SELECT COUNT("national_titles") FROM "college_sports" WHERE "mascot"='doane tigers'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of national titles for the team with doane tigers as the mascot?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "college_sports" (
"school" text,
"mascot" text,
"conference" text,
"national_titles" real,
"founded" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of national titles for the team with doane tigers as the mascot?`:
```sql
|
SELECT "year" FROM "season_by_season_results" WHERE "crew"='varsity 8+' AND "record"='7-3'; |
## Task
Generate a SQL query to answer the following question:
`Which year's crew is varsity 8+ when the record is 7-3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_by_season_results" (
"year" text,
"coach" text,
"crew" text,
"record" text,
"win_pct" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which year's crew is varsity 8+ when the record is 7-3?`:
```sql
|
SELECT SUM("win_pct") FROM "season_by_season_results" WHERE "coach"='john gartin' AND "crew"='varsity 8+' AND "year"='2005'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of win % when John Gartin is coach, the crew is varsity 8+, and the year is 2005?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_by_season_results" (
"year" text,
"coach" text,
"crew" text,
"record" text,
"win_pct" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of win % when John Gartin is coach, the crew is varsity 8+, and the year is 2005?`:
```sql
|
SELECT MAX("win_pct") FROM "season_by_season_results" WHERE "coach"='john gartin' AND "record"='11-0' AND "year"='2009'; |
## Task
Generate a SQL query to answer the following question:
`What is the largest win percentage when John Gartin is coach, the record is 11-0, and the year is 2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_by_season_results" (
"year" text,
"coach" text,
"crew" text,
"record" text,
"win_pct" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest win percentage when John Gartin is coach, the record is 11-0, and the year is 2009?`:
```sql
|
SELECT SUM("win_pct") FROM "season_by_season_results" WHERE "year"='2008' AND "crew"='varsity 8+'; |
## Task
Generate a SQL query to answer the following question:
`What is the total of win percentages when the year is 2008 and the crew is varsity 8+?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_by_season_results" (
"year" text,
"coach" text,
"crew" text,
"record" text,
"win_pct" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total of win percentages when the year is 2008 and the crew is varsity 8+?`:
```sql
|
SELECT COUNT("pick") FROM "nfl_draft" WHERE "round">6 AND "position"='tight end'; |
## Task
Generate a SQL query to answer the following question:
`What is the pick number for the tight end who was picked after round 6?`
### 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" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the pick number for the tight end who was picked after round 6?`:
```sql
|
SELECT MIN("round") FROM "nfl_draft" WHERE "position"='guard' AND "pick"<144; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest round for the player whose position is guard and had a pick number smaller than 144?`
### 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" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest round for the player whose position is guard and had a pick number smaller than 144?`:
```sql
|
SELECT "position" FROM "nfl_draft" WHERE "pick">256 AND "player"='terry jones'; |
## Task
Generate a SQL query to answer the following question:
`What was the position of terry jones whose pick number was after 256?`
### 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" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the position of terry jones whose pick number was after 256?`:
```sql
|
SELECT "loss" FROM "game_log" WHERE "record"='30-32'; |
## Task
Generate a SQL query to answer the following question:
`Which Loss has a Record of 30-32?`
### 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 `Which Loss has a Record of 30-32?`:
```sql
|
SELECT MAX("attendance") FROM "game_log" WHERE "record"='37-38'; |
## Task
Generate a SQL query to answer the following question:
`Which Attendance is the highest one that has a Record of 37-38?`
### 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 `Which Attendance is the highest one that has a Record of 37-38?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "loss"='buehrle (7-2)'; |
## Task
Generate a SQL query to answer the following question:
`Which Score has a Loss of buehrle (7-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,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Score has a Loss of buehrle (7-2)?`:
```sql
|
SELECT AVG("overall") FROM "atlanta_falcons_draft_history" WHERE "pick_num">7 AND "round">4 AND "name"='glen howe'; |
## Task
Generate a SQL query to answer the following question:
`Which Overall is the average one that has a Pick # larger than 7, and a Round larger than 4, and a Name of glen howe?`
### 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 `Which Overall is the average one that has a Pick # larger than 7, and a Round larger than 4, and a Name of glen howe?`:
```sql
|
SELECT MIN("round") FROM "atlanta_falcons_draft_history" WHERE "pick_num">10 AND "position"='tight end' AND "overall"<132; |
## Task
Generate a SQL query to answer the following question:
`Which Round is the lowest one that has a Pick # larger than 10, and a Position of tight end, and an Overall smaller than 132?`
### 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 `Which Round is the lowest one that has a Pick # larger than 10, and a Position of tight end, and an Overall smaller than 132?`:
```sql
|
SELECT MAX("round") FROM "atlanta_falcons_draft_history" WHERE "overall"=32 AND "pick_num"<4; |
## Task
Generate a SQL query to answer the following question:
`Which Round is the highest one that has an Overall of 32, and a Pick # smaller than 4?`
### 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 `Which Round is the highest one that has an Overall of 32, and a Pick # smaller than 4?`:
```sql
|
SELECT COUNT("pick_num") FROM "atlanta_falcons_draft_history" WHERE "round">8 AND "college"='fresno state'; |
## Task
Generate a SQL query to answer the following question:
`How many Picks have a Round larger than 8, and a College of fresno state?`
### 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 `How many Picks have a Round larger than 8, and a College of fresno state?`:
```sql
|
SELECT MAX("overall") FROM "atlanta_falcons_draft_history" WHERE "college"='oklahoma' AND "pick_num"<4; |
## Task
Generate a SQL query to answer the following question:
`Which Overall is the highest one that has a College of oklahoma, and a Pick # smaller than 4?`
### 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 `Which Overall is the highest one that has a College of oklahoma, and a Pick # smaller than 4?`:
```sql
|
SELECT "result" FROM "under_23" WHERE "date"='30 july 2004'; |
## Task
Generate a SQL query to answer the following question:
`What is the result of the match on 30 July 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "under_23" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result of the match on 30 July 2004?`:
```sql
|
SELECT "result" FROM "under_23" WHERE "date"='3 march 2004'; |
## Task
Generate a SQL query to answer the following question:
`What is the result of the match on 3 March 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "under_23" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result of the match on 3 March 2004?`:
```sql
|
SELECT "score" FROM "under_23" WHERE "competition"='friendly match'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the friendly match?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "under_23" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the friendly match?`:
```sql
|
SELECT COUNT("week") FROM "schedule" WHERE "result"='w 10-0' AND "attendance"<'58,571'; |
## Task
Generate a SQL query to answer the following question:
`Which Week had a Result of w 10-0, and an Attendance smaller than 58,571?`
### 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 Week had a Result of w 10-0, and an Attendance smaller than 58,571?`:
```sql
|
SELECT SUM("week") FROM "schedule" WHERE "result"='w 23-17'; |
## Task
Generate a SQL query to answer the following question:
`Which Week had a Result of w 23-17?`
### 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 Week had a Result of w 23-17?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "date"='october 2, 1977'; |
## Task
Generate a SQL query to answer the following question:
`What was the Attendance on october 2, 1977?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Attendance on october 2, 1977?`:
```sql
|
SELECT SUM("gold") FROM "medal_table" WHERE "bronze"=2 AND "silver"<0; |
## Task
Generate a SQL query to answer the following question:
`Bronze of 2, and a Silver smaller than 0 then what is the sum of the gold?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Bronze of 2, and a Silver smaller than 0 then what is the sum of the gold?`:
```sql
|
SELECT SUM("total") FROM "medal_table" WHERE "gold"<4 AND "silver">0 AND "rank"='3' AND "bronze"<6; |
## Task
Generate a SQL query to answer the following question:
`Smaller than 4, and a Silver larger than 0, and a Rank of 3, and a Bronze smaller than 6 then what is the sum of the gold?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Smaller than 4, and a Silver larger than 0, and a Rank of 3, and a Bronze smaller than 6 then what is the sum of the gold?`:
```sql
|
SELECT AVG("gold") FROM "medal_table" WHERE "total">3 AND "rank"='4' AND "silver">0; |
## Task
Generate a SQL query to answer the following question:
`Total larger than 3, and a Rank of 4, and a Silver larger than 0 has what average gold?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Total larger than 3, and a Rank of 4, and a Silver larger than 0 has what average gold?`:
```sql
|
SELECT MIN("silver") FROM "medal_table" WHERE "total"<10 AND "gold">1; |
## Task
Generate a SQL query to answer the following question:
`Total smaller than 10, and a Gold larger than 1 then what is the lowest silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Total smaller than 10, and a Gold larger than 1 then what is the lowest silver?`:
```sql
|
SELECT "date" FROM "season_schedule" WHERE "week"=9; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the week 9 game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the week 9 game?`:
```sql
|
SELECT "class" FROM "grand_prix_motorcycle_racing_results" WHERE "wins">0 AND "points"=42; |
## Task
Generate a SQL query to answer the following question:
`What class has over 0 wins and 42 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_motorcycle_racing_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"rank" text,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What class has over 0 wins and 42 points?`:
```sql
|
SELECT "team" FROM "grand_prix_motorcycle_racing_results" WHERE "class"='350cc' AND "points">2 AND "wins"=1; |
## Task
Generate a SQL query to answer the following question:
`What team was the bike with a 350cc class, over 2 points, and 1 win?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_motorcycle_racing_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"rank" text,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the bike with a 350cc class, over 2 points, and 1 win?`:
```sql
|
SELECT MIN("year") FROM "grand_prix_motorcycle_racing_results" WHERE "wins">0 AND "points"=42; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year associated with 0 wins and 42 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_motorcycle_racing_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"rank" text,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year associated with 0 wins and 42 points?`:
```sql
|
SELECT "nationality" FROM "player_of_the_year" WHERE "player"='marcus walker'; |
## Task
Generate a SQL query to answer the following question:
`What Nationality has the Player of Marcus Walker?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "player_of_the_year" (
"season" text,
"player" text,
"position" text,
"nationality" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Nationality has the Player of Marcus Walker?`:
```sql
|
SELECT "season" FROM "player_of_the_year" WHERE "player"='jon stefansson'; |
## Task
Generate a SQL query to answer the following question:
`What Season is listed for the Player of Jon Stefansson?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "player_of_the_year" (
"season" text,
"player" text,
"position" text,
"nationality" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Season is listed for the Player of Jon Stefansson?`:
```sql
|
SELECT "team" FROM "player_of_the_year" WHERE "player"='a.j. moye'; |
## Task
Generate a SQL query to answer the following question:
`Which Team has the Player of A.J. Moye?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "player_of_the_year" (
"season" text,
"player" text,
"position" text,
"nationality" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Team has the Player of A.J. Moye?`:
```sql
|
SELECT "position" FROM "player_of_the_year" WHERE "team"='kr' AND "player"='marcus walker'; |
## Task
Generate a SQL query to answer the following question:
`What Position does the Team of KR and the Player of Marcus Walker have listed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "player_of_the_year" (
"season" text,
"player" text,
"position" text,
"nationality" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Position does the Team of KR and the Player of Marcus Walker have listed?`:
```sql
|
SELECT "name" FROM "tallest_proposed" WHERE "location"='ljubljana' AND "year_proposed"='2010' AND "floors"='15'; |
## Task
Generate a SQL query to answer the following question:
`What building is in ljubljana, proposed in 2010, and has 15 floors?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tallest_proposed" (
"rank" real,
"name" text,
"location" text,
"height_feet_metres" text,
"floors" text,
"year_proposed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What building is in ljubljana, proposed in 2010, and has 15 floors?`:
```sql
|
SELECT "revenue_millions" FROM "table_of_federal_taxation_and_spending_b" WHERE "population">'1,499,402' AND "spending_millions"='$13,986'; |
## Task
Generate a SQL query to answer the following question:
`What is the Revenue of the population of more than 1,499,402, with Spending (millions) of $13,986?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table_of_federal_taxation_and_spending_b" (
"state" text,
"revenue_millions" text,
"population" real,
"revenue_per_capita" text,
"spending_millions" text,
"spending_per_capita" text,
"net_contribution_per_capita" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Revenue of the population of more than 1,499,402, with Spending (millions) of $13,986?`:
```sql
|
SELECT "revenue_per_capita" FROM "table_of_federal_taxation_and_spending_b" WHERE "state"='vermont'; |
## Task
Generate a SQL query to answer the following question:
`What is the Revenue per capita for Vermont?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table_of_federal_taxation_and_spending_b" (
"state" text,
"revenue_millions" text,
"population" real,
"revenue_per_capita" text,
"spending_millions" text,
"spending_per_capita" text,
"net_contribution_per_capita" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Revenue per capita for Vermont?`:
```sql
|
SELECT "state" FROM "table_of_federal_taxation_and_spending_b" WHERE "net_contribution_per_capita"='$-171'; |
## Task
Generate a SQL query to answer the following question:
`What state has a Net contribution per capita of $-171?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table_of_federal_taxation_and_spending_b" (
"state" text,
"revenue_millions" text,
"population" real,
"revenue_per_capita" text,
"spending_millions" text,
"spending_per_capita" text,
"net_contribution_per_capita" text
);
### SQL
Given the database schema, here is the SQL query that answers `What state has a Net contribution per capita of $-171?`:
```sql
|
SELECT "pba_team" FROM "round_2" WHERE "college"='mlqu'; |
## Task
Generate a SQL query to answer the following question:
`Who is the PBA team with Mlqu college?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the PBA team with Mlqu college?`:
```sql
|
SELECT "country_of_origin" FROM "round_2" WHERE "college"='far eastern'; |
## Task
Generate a SQL query to answer the following question:
`Which country of origin corresponds to Far Eastern college?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which country of origin corresponds to Far Eastern college?`:
```sql
|
SELECT "player" FROM "round_2" WHERE "pba_team"='barangay ginebra kings'; |
## Task
Generate a SQL query to answer the following question:
`Who is the player with the PBA team of Barangay Ginebra Kings?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the player with the PBA team of Barangay Ginebra Kings?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "date"='april 28'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent on April 28?`
### 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,
"stadium" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent on April 28?`:
```sql
|
SELECT COUNT("highest_position") FROM "top_10_albums" WHERE "issue_date"<9 AND "album_title"='where we belong'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest position the album Where we belong, which had an issue date higher than 9, had?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_10_albums" (
"issue_date" real,
"album_title" text,
"artist" text,
"sales" real,
"highest_position" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest position the album Where we belong, which had an issue date higher than 9, had?`:
```sql
|
SELECT MAX("issue_date") FROM "top_10_albums" WHERE "artist"='madonna' AND "sales"<'1,060,000'; |
## Task
Generate a SQL query to answer the following question:
`What is the biggest issue date Madonna, who had less than 1,060,000 sales, had?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_10_albums" (
"issue_date" real,
"album_title" text,
"artist" text,
"sales" real,
"highest_position" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the biggest issue date Madonna, who had less than 1,060,000 sales, had?`:
```sql
|
SELECT COUNT("highest_position") FROM "top_10_albums" WHERE "album_title"='talk on corners' AND "issue_date">1; |
## Task
Generate a SQL query to answer the following question:
`What is the highest position Talk on Corners, which had an issue date greater than 1, had?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_10_albums" (
"issue_date" real,
"album_title" text,
"artist" text,
"sales" real,
"highest_position" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest position Talk on Corners, which had an issue date greater than 1, had?`:
```sql
|
SELECT MAX("sales") FROM "top_10_albums" WHERE "album_title"='all saints'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest sales All Saints had?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_10_albums" (
"issue_date" real,
"album_title" text,
"artist" text,
"sales" real,
"highest_position" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest sales All Saints had?`:
```sql
|
SELECT "driver" FROM "teams_and_drivers" WHERE "car_model"='commodore vs'; |
## Task
Generate a SQL query to answer the following question:
`Who is the Driver that has Car Model Commodore VS?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_drivers" (
"team" text,
"manufacturer" text,
"car_model" text,
"engine" text,
"driver" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the Driver that has Car Model Commodore VS?`:
```sql
|
SELECT "car_model" FROM "teams_and_drivers" WHERE "manufacturer"='saab' AND "driver"='dean randle'; |
## Task
Generate a SQL query to answer the following question:
`What Car Model has the Manufacturer of Saab, and Driver Dean Randle?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_drivers" (
"team" text,
"manufacturer" text,
"car_model" text,
"engine" text,
"driver" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Car Model has the Manufacturer of Saab, and Driver Dean Randle?`:
```sql
|
SELECT "driver" FROM "teams_and_drivers" WHERE "team"='p & l mechanical services'; |
## Task
Generate a SQL query to answer the following question:
`Who is the Driver with the Team of P & L Mechanical Services?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_drivers" (
"team" text,
"manufacturer" text,
"car_model" text,
"engine" text,
"driver" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the Driver with the Team of P & L Mechanical Services?`:
```sql
|
SELECT "car_model" FROM "teams_and_drivers" WHERE "engine"='ford 6.0 v8'; |
## Task
Generate a SQL query to answer the following question:
`What Car Model has the Engine of Ford 6.0 V8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_drivers" (
"team" text,
"manufacturer" text,
"car_model" text,
"engine" text,
"driver" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Car Model has the Engine of Ford 6.0 V8?`:
```sql
|
SELECT "team" FROM "teams_and_drivers" WHERE "engine"='chevrolet 6.0 v8' AND "manufacturer"='opel' AND "driver"='chris jackson'; |
## Task
Generate a SQL query to answer the following question:
`What Team has the Engine of Chevrolet 6.0 V8, the Manufacturer of Opel, and the Driver Chris Jackson?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_drivers" (
"team" text,
"manufacturer" text,
"car_model" text,
"engine" text,
"driver" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Team has the Engine of Chevrolet 6.0 V8, the Manufacturer of Opel, and the Driver Chris Jackson?`:
```sql
|
SELECT "segment_a" FROM "season_21_2013" WHERE "segment_d"='diesel filters'; |
## Task
Generate a SQL query to answer the following question:
`What is the Segment A entry for the episode that has an entry of Diesel filters for Segment D?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_21_2013" (
"series_ep" text,
"episode" real,
"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 the Segment A entry for the episode that has an entry of Diesel filters for Segment D?`:
```sql
|
SELECT "series_ep" FROM "season_21_2013" WHERE "episode">262 AND "segment_a"='aluminium s canoe'; |
## Task
Generate a SQL query to answer the following question:
`What is the series episode number that is larger than 262 and has a Segment A entry of Aluminium s canoe?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_21_2013" (
"series_ep" text,
"episode" real,
"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 the series episode number that is larger than 262 and has a Segment A entry of Aluminium s canoe?`:
```sql
|
SELECT MIN("first_elected") FROM "south_carolina" WHERE "district"='south carolina 2'; |
## Task
Generate a SQL query to answer the following question:
`Which First elected has a District of south carolina 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which First elected has a District of south carolina 2?`:
```sql
|
SELECT "incumbent" FROM "south_carolina" WHERE "first_elected">1884; |
## Task
Generate a SQL query to answer the following question:
`Which Incumbent has a First elected larger than 1884?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Incumbent has a First elected larger than 1884?`:
```sql
|
SELECT "english_title" FROM "2000s" WHERE "director"='ang lee'; |
## Task
Generate a SQL query to answer the following question:
`What is the English title with a Director named ang lee?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000s" (
"year" real,
"english_title" text,
"original_title" text,
"country" text,
"director" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the English title with a Director named ang lee?`:
```sql
|
SELECT "original_title" FROM "2000s" WHERE "country"='canada'; |
## Task
Generate a SQL query to answer the following question:
`What is the Original title with a Country that is canada?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000s" (
"year" real,
"english_title" text,
"original_title" text,
"country" text,
"director" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Original title with a Country that is canada?`:
```sql
|
SELECT "architecture_and_modelling" FROM "editions_feature_grid" WHERE "unit_test"='no' AND "projects_templates"='limited'; |
## Task
Generate a SQL query to answer the following question:
`Which Architecture and modelling has a Unit test of no, and a Projects templates of limited?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "editions_feature_grid" (
"product" text,
"extensions" text,
"projects_templates" text,
"msdn_integration" text,
"debugging" text,
"profiling" text,
"intelli_trace" text,
"unit_test" text,
"code_coverage" text,
"test_impact_analysis" text,
"load_testing" text,
"lab_management" text,
"architecture_and_modelling" text,
"windows_phone_development" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Architecture and modelling has a Unit test of no, and a Projects templates of limited?`:
```sql
|
SELECT "msdn_integration" FROM "editions_feature_grid" WHERE "load_testing"='no' AND "test_impact_analysis"='no'; |
## Task
Generate a SQL query to answer the following question:
`which MSDN integration has a Load testing of no, and a Test impact analysis of no?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "editions_feature_grid" (
"product" text,
"extensions" text,
"projects_templates" text,
"msdn_integration" text,
"debugging" text,
"profiling" text,
"intelli_trace" text,
"unit_test" text,
"code_coverage" text,
"test_impact_analysis" text,
"load_testing" text,
"lab_management" text,
"architecture_and_modelling" text,
"windows_phone_development" text
);
### SQL
Given the database schema, here is the SQL query that answers `which MSDN integration has a Load testing of no, and a Test impact analysis of no?`:
```sql
|
SELECT "unit_test" FROM "editions_feature_grid" WHERE "msdn_integration"='full' AND "projects_templates"='yes'; |
## Task
Generate a SQL query to answer the following question:
`Which Unit test has a MSDN integration of full, and a Projects templates of yes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "editions_feature_grid" (
"product" text,
"extensions" text,
"projects_templates" text,
"msdn_integration" text,
"debugging" text,
"profiling" text,
"intelli_trace" text,
"unit_test" text,
"code_coverage" text,
"test_impact_analysis" text,
"load_testing" text,
"lab_management" text,
"architecture_and_modelling" text,
"windows_phone_development" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Unit test has a MSDN integration of full, and a Projects templates of yes?`:
```sql
|
SELECT "intelli_trace" FROM "editions_feature_grid" WHERE "extensions"='no' AND "windows_phone_development"='no'; |
## Task
Generate a SQL query to answer the following question:
`Which Intelli Trace has a No Extension and Windows Phone development of no?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "editions_feature_grid" (
"product" text,
"extensions" text,
"projects_templates" text,
"msdn_integration" text,
"debugging" text,
"profiling" text,
"intelli_trace" text,
"unit_test" text,
"code_coverage" text,
"test_impact_analysis" text,
"load_testing" text,
"lab_management" text,
"architecture_and_modelling" text,
"windows_phone_development" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Intelli Trace has a No Extension and Windows Phone development of no?`:
```sql
|
SELECT "projects_templates" FROM "editions_feature_grid" WHERE "intelli_trace"='no' AND "windows_phone_development"='yes' AND "test_impact_analysis"='no'; |
## Task
Generate a SQL query to answer the following question:
`Which Projects template has an IntelliTrace of no, and a Windows Phone development of yes, and a Test impact analysis of no?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "editions_feature_grid" (
"product" text,
"extensions" text,
"projects_templates" text,
"msdn_integration" text,
"debugging" text,
"profiling" text,
"intelli_trace" text,
"unit_test" text,
"code_coverage" text,
"test_impact_analysis" text,
"load_testing" text,
"lab_management" text,
"architecture_and_modelling" text,
"windows_phone_development" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Projects template has an IntelliTrace of no, and a Windows Phone development of yes, and a Test impact analysis of no?`:
```sql
|
SELECT "msdn_integration" FROM "editions_feature_grid" WHERE "intelli_trace"='yes'; |
## Task
Generate a SQL query to answer the following question:
`Which MSDN integration has a IntelliTrace of yes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "editions_feature_grid" (
"product" text,
"extensions" text,
"projects_templates" text,
"msdn_integration" text,
"debugging" text,
"profiling" text,
"intelli_trace" text,
"unit_test" text,
"code_coverage" text,
"test_impact_analysis" text,
"load_testing" text,
"lab_management" text,
"architecture_and_modelling" text,
"windows_phone_development" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which MSDN integration has a IntelliTrace of yes?`:
```sql
|
SELECT "years_of_operation" FROM "historical_list_of_princeton_eating_club" WHERE "location"='prospect 33 prospect ave'; |
## Task
Generate a SQL query to answer the following question:
`During what Years of Operation was the location prospect 33 prospect ave?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "historical_list_of_princeton_eating_club" (
"name" text,
"years_of_operation" text,
"location" text,
"historical_photos" text,
"year_clubhouse_constructed" text,
"sign_in_bicker" text,
"year_co_ed" text
);
### SQL
Given the database schema, here is the SQL query that answers `During what Years of Operation was the location prospect 33 prospect ave?`:
```sql
|
SELECT "location" FROM "historical_list_of_princeton_eating_club" WHERE "name"='the ivy club'; |
## Task
Generate a SQL query to answer the following question:
`What is the location of the ivy club?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "historical_list_of_princeton_eating_club" (
"name" text,
"years_of_operation" text,
"location" text,
"historical_photos" text,
"year_clubhouse_constructed" text,
"sign_in_bicker" text,
"year_co_ed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the location of the ivy club?`:
```sql
|
SELECT "sign_in_bicker" FROM "historical_list_of_princeton_eating_club" WHERE "location"='wash50 on washington rd'; |
## Task
Generate a SQL query to answer the following question:
`What is the Sign-in/Bicker at wash50 on washington rd?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "historical_list_of_princeton_eating_club" (
"name" text,
"years_of_operation" text,
"location" text,
"historical_photos" text,
"year_clubhouse_constructed" text,
"sign_in_bicker" text,
"year_co_ed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Sign-in/Bicker at wash50 on washington rd?`:
```sql
|
SELECT "year_clubhouse_constructed" FROM "historical_list_of_princeton_eating_club" WHERE "sign_in_bicker"='bicker' AND "name"='cannon club'; |
## Task
Generate a SQL query to answer the following question:
`When was the Clubhouse built with a Sign-in/Bicker of bicker, and Named cannon club?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "historical_list_of_princeton_eating_club" (
"name" text,
"years_of_operation" text,
"location" text,
"historical_photos" text,
"year_clubhouse_constructed" text,
"sign_in_bicker" text,
"year_co_ed" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the Clubhouse built with a Sign-in/Bicker of bicker, and Named cannon club?`:
```sql
|
SELECT "sign_in_bicker" FROM "historical_list_of_princeton_eating_club" WHERE "location"='wash50 on washington rd'; |
## Task
Generate a SQL query to answer the following question:
`Which Sign-in/Bicker is at of wash50 on washington rd?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "historical_list_of_princeton_eating_club" (
"name" text,
"years_of_operation" text,
"location" text,
"historical_photos" text,
"year_clubhouse_constructed" text,
"sign_in_bicker" text,
"year_co_ed" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Sign-in/Bicker is at of wash50 on washington rd?`:
```sql
|
SELECT "historical_photos" FROM "historical_list_of_princeton_eating_club" WHERE "location"='prospect 43 prospect ave'; |
## Task
Generate a SQL query to answer the following question:
`Which Historical Photos were taken at prospect 43 prospect ave?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "historical_list_of_princeton_eating_club" (
"name" text,
"years_of_operation" text,
"location" text,
"historical_photos" text,
"year_clubhouse_constructed" text,
"sign_in_bicker" text,
"year_co_ed" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Historical Photos were taken at prospect 43 prospect ave?`:
```sql
|
SELECT "1st_leg" FROM "first_knockout_round" WHERE "team_1"='lyon'; |
## Task
Generate a SQL query to answer the following question:
`What is the 1st leg of team 1 Lyon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_knockout_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 1st leg of team 1 Lyon?`:
```sql
|
SELECT "1st_leg" FROM "first_knockout_round" WHERE "team_1"='liverpool'; |
## Task
Generate a SQL query to answer the following question:
`What is the 1st leg of team 1 Liverpool?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_knockout_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 1st leg of team 1 Liverpool?`:
```sql
|
SELECT COUNT("events") FROM "summary" WHERE "top_25"<2; |
## Task
Generate a SQL query to answer the following question:
`How many events resulted in a top-25 less than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_5" real,
"top_10" real,
"top_25" real,
"events" real,
"cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many events resulted in a top-25 less than 2?`:
```sql
|
SELECT MIN("wins") FROM "summary" WHERE "top_25">5 AND "cuts_made">38; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest number of wins for a top-25 value greater than 5 and more than 38 cuts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_5" real,
"top_10" real,
"top_25" real,
"events" real,
"cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest number of wins for a top-25 value greater than 5 and more than 38 cuts?`:
```sql
|
SELECT COUNT("bronze") FROM "medal_table" WHERE "nation"='chinese taipei' AND "gold"<0; |
## Task
Generate a SQL query to answer the following question:
`How many bronze medals did Chinese Taipei win with less than 0 gold?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many bronze medals did Chinese Taipei win with less than 0 gold?`:
```sql
|
SELECT COUNT("silver") FROM "medal_table" WHERE "rank"=3 AND "bronze">0; |
## Task
Generate a SQL query to answer the following question:
`How many silver medals had a rank of 3 with bronze larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many silver medals had a rank of 3 with bronze larger than 0?`:
```sql
|
SELECT COUNT("silver") FROM "medal_table" WHERE "nation"='china'; |
## Task
Generate a SQL query to answer the following question:
`How many silver medals does China have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many silver medals does China have?`:
```sql
|
SELECT SUM("position") FROM "torneo_apertura" WHERE "losses"=11 AND "played">22; |
## Task
Generate a SQL query to answer the following question:
`Which Position has Losses of 11, and a Played larger than 22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneo_apertura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Position has Losses of 11, and a Played larger than 22?`:
```sql
|
SELECT COUNT("wins") FROM "torneo_apertura" WHERE "scored"<24 AND "conceded">25 AND "draws">5 AND "position"<9; |
## Task
Generate a SQL query to answer the following question:
`How many Wins have a Scored smaller than 24, and a Conceded larger than 25, and Draws larger than 5, and a Position smaller than 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneo_apertura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Wins have a Scored smaller than 24, and a Conceded larger than 25, and Draws larger than 5, and a Position smaller than 9?`:
```sql
|
SELECT AVG("points") FROM "torneo_apertura" WHERE "position"=8; |
## Task
Generate a SQL query to answer the following question:
`How many Points has a Position of 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneo_apertura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Points has a Position of 8?`:
```sql
|
SELECT COUNT("wins") FROM "torneo_apertura" WHERE "scored"=27 AND "draws"<5; |
## Task
Generate a SQL query to answer the following question:
`How many Wins has a Scored of 27 and Draws smaller than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneo_apertura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Wins has a Scored of 27 and Draws smaller than 5?`:
```sql
|
SELECT AVG("position") FROM "torneo_apertura" WHERE "draws"<7 AND "played">22; |
## Task
Generate a SQL query to answer the following question:
`Which Position has Draws smaller than 7 and a Played larger than 22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneo_apertura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Position has Draws smaller than 7 and a Played larger than 22?`:
```sql
|
SELECT MAX("played") FROM "torneo_apertura" WHERE "scored">25 AND "position"=1 AND "draws"<5; |
## Task
Generate a SQL query to answer the following question:
`Which Played has a Scored larger than 25 and a Position of 1, and Draws smaller than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneo_apertura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Played has a Scored larger than 25 and a Position of 1, and Draws smaller than 5?`:
```sql
|
SELECT "date_of_birth_age" FROM "2008_six_nations_championship_squads" WHERE "caps"=51 AND "club_province"='clermont'; |
## Task
Generate a SQL query to answer the following question:
`When was the player with 51 caps from a Club/province of clermont born?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_six_nations_championship_squads" (
"player" text,
"position" text,
"date_of_birth_age" text,
"caps" real,
"club_province" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the player with 51 caps from a Club/province of clermont born?`:
```sql
|
SELECT COUNT("episode_count") FROM "overview_of_main_characters" WHERE "actor"='liz carr'; |
## Task
Generate a SQL query to answer the following question:
`How many Episode Counts have an Actor of liz carr?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "overview_of_main_characters" (
"character" text,
"actor" text,
"years" text,
"series" text,
"episode_count" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Episode Counts have an Actor of liz carr?`:
```sql
|
SELECT "years" FROM "overview_of_main_characters" WHERE "character"='dr trevor stewart'; |
## Task
Generate a SQL query to answer the following question:
`Which Years have a Character of dr trevor stewart?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "overview_of_main_characters" (
"character" text,
"actor" text,
"years" text,
"series" text,
"episode_count" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Years have a Character of dr trevor stewart?`:
```sql
|
SELECT "series" FROM "overview_of_main_characters" WHERE "actor"='tom ward'; |
## Task
Generate a SQL query to answer the following question:
`Which Series has an Actor of tom ward?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "overview_of_main_characters" (
"character" text,
"actor" text,
"years" text,
"series" text,
"episode_count" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Series has an Actor of tom ward?`:
```sql
|
SELECT SUM("pick_num") FROM "round_two" WHERE "player"='joe germanese'; |
## Task
Generate a SQL query to answer the following question:
`How many picks involved the player Joe Germanese?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_two" (
"pick_num" real,
"mls_team" text,
"player" text,
"position" text,
"affiliation" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many picks involved the player Joe Germanese?`:
```sql
|
SELECT "player" FROM "round_two" WHERE "pick_num"=25; |
## Task
Generate a SQL query to answer the following question:
`Which player's pick number was 25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_two" (
"pick_num" real,
"mls_team" text,
"player" text,
"position" text,
"affiliation" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player's pick number was 25?`:
```sql
|
SELECT "home" FROM "montreal_canadiens_4_chicago_black_hawks" WHERE "visitor"='montreal canadiens' AND "record"='0-3'; |
## Task
Generate a SQL query to answer the following question:
`What team did the Montreal Canadiens visit when the record was 0-3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "montreal_canadiens_4_chicago_black_hawks" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team did the Montreal Canadiens visit when the record was 0-3?`:
```sql
|
SELECT "score" FROM "montreal_canadiens_4_chicago_black_hawks" WHERE "date"='april 23'; |
## Task
Generate a SQL query to answer the following question:
`What was the score on April 23?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "montreal_canadiens_4_chicago_black_hawks" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score on April 23?`:
```sql
|
SELECT "home" FROM "montreal_canadiens_4_chicago_black_hawks" WHERE "visitor"='chicago black hawks' AND "date"='april 20'; |
## Task
Generate a SQL query to answer the following question:
`What team did the Chicago Black Hawks visit on April 20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "montreal_canadiens_4_chicago_black_hawks" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team did the Chicago Black Hawks visit on April 20?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.