output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "2004" FROM "port_statistics" WHERE "product"='oil terminal'; |
## Task
Generate a SQL query to answer the following question:
`What is the amount of oil terminal in 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "port_statistics" (
"product" text,
"2004" text,
"2003" text,
"2002" text,
"2001" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the amount of oil terminal in 2004?`:
```sql
|
SELECT "2003" FROM "port_statistics" WHERE "2001"='514,000 tonnes'; |
## Task
Generate a SQL query to answer the following question:
`What is the 2003 statistic for the product that had 514,000 tonnes in 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "port_statistics" (
"product" text,
"2004" text,
"2003" text,
"2002" text,
"2001" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 2003 statistic for the product that had 514,000 tonnes in 2001?`:
```sql
|
SELECT "2002" FROM "port_statistics" WHERE "2001"='452,000 tonnes'; |
## Task
Generate a SQL query to answer the following question:
`What is the 2002 statistic for the product that had 452,000 tonnes in 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "port_statistics" (
"product" text,
"2004" text,
"2003" text,
"2002" text,
"2001" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 2002 statistic for the product that had 452,000 tonnes in 2001?`:
```sql
|
SELECT "2001" FROM "port_statistics" WHERE "2002"='2,360,000 tonnes'; |
## Task
Generate a SQL query to answer the following question:
`What is the 2001 statistic for the product that had 2,360,000 tonnes in 2002?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "port_statistics" (
"product" text,
"2004" text,
"2003" text,
"2002" text,
"2001" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 2001 statistic for the product that had 2,360,000 tonnes in 2002?`:
```sql
|
SELECT "2003" FROM "port_statistics" WHERE "product"='general cargo'; |
## Task
Generate a SQL query to answer the following question:
`What is the 2003 statistic for general cargo?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "port_statistics" (
"product" text,
"2004" text,
"2003" text,
"2002" text,
"2001" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 2003 statistic for general cargo?`:
```sql
|
SELECT "home_team_score" FROM "round_1" WHERE "venue"='mcg'; |
## Task
Generate a SQL query to answer the following question:
`What did the home team score at MCG?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What did the home team score at MCG?`:
```sql
|
SELECT "away_team_score" FROM "round_1" WHERE "home_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What did the away team score when playing South Melbourne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What did the away team score when playing South Melbourne?`:
```sql
|
SELECT "date" FROM "round_1" WHERE "away_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`When did the game with North Melbourne as the away team take place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the game with North Melbourne as the away team take place?`:
```sql
|
SELECT "date" FROM "round_6" WHERE "away_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`If the Away team was south melbourne what Date did they play?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the Away team was south melbourne what Date did they play?`:
```sql
|
SELECT "away_team_score" FROM "round_6" WHERE "crowd">'16,437' AND "venue"='kardinia park'; |
## Task
Generate a SQL query to answer the following question:
`When the venue was kardinia park and the Crowd was larger than 16,437, what was the Away team score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the venue was kardinia park and the Crowd was larger than 16,437, what was the Away team score?`:
```sql
|
SELECT "home_team_score" FROM "round_6" WHERE "away_team_score"='6.13 (49)'; |
## Task
Generate a SQL query to answer the following question:
`When the Away team scored 6.13 (49), what was the Home teams score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the Away team scored 6.13 (49), what was the Home teams score?`:
```sql
|
SELECT "away_team_score" FROM "round_6" WHERE "home_team"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`When the Home team of essendon is playing what is the Away team score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the Home team of essendon is playing what is the Away team score?`:
```sql
|
SELECT "date_of_vacancy" FROM "managerial_changes" WHERE "manner_of_departure"='resigned' AND "outgoing_manager"='gordon wylde'; |
## Task
Generate a SQL query to answer the following question:
`I wan the date of vacancy for departure of resigned and outgoing manager of gordon wylde`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "managerial_changes" (
"team" text,
"outgoing_manager" text,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `I wan the date of vacancy for departure of resigned and outgoing manager of gordon wylde`:
```sql
|
SELECT "replaced_by" FROM "managerial_changes" WHERE "date_of_appointment"='12 october 2007'; |
## Task
Generate a SQL query to answer the following question:
`I want the replaced for date of appointment being 12 october 2007`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "managerial_changes" (
"team" text,
"outgoing_manager" text,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the replaced for date of appointment being 12 october 2007`:
```sql
|
SELECT "team" FROM "managerial_changes" WHERE "date_of_vacancy"='28 february'; |
## Task
Generate a SQL query to answer the following question:
`I want the team for date of vacancy being 28 february`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "managerial_changes" (
"team" text,
"outgoing_manager" text,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the team for date of vacancy being 28 february`:
```sql
|
SELECT "manner_of_departure" FROM "managerial_changes" WHERE "date_of_appointment"='12 october 2007'; |
## Task
Generate a SQL query to answer the following question:
`I want the manner of departure for date of appointment being 12 october 2007`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "managerial_changes" (
"team" text,
"outgoing_manager" text,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the manner of departure for date of appointment being 12 october 2007`:
```sql
|
SELECT "date" FROM "non_championship_race_results" WHERE "circuit"='syracuse'; |
## Task
Generate a SQL query to answer the following question:
`Which date was the syracuse circuit?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_race_results" (
"race_name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which date was the syracuse circuit?`:
```sql
|
SELECT "date" FROM "non_championship_race_results" WHERE "race_name"='x gran premio di napoli'; |
## Task
Generate a SQL query to answer the following question:
`Which date was the x gran premio di napoli?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_race_results" (
"race_name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which date was the x gran premio di napoli?`:
```sql
|
SELECT "report" FROM "non_championship_race_results" WHERE "date"='22 september'; |
## Task
Generate a SQL query to answer the following question:
`What report happened on 22 september?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_race_results" (
"race_name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What report happened on 22 september?`:
```sql
|
SELECT "report" FROM "non_championship_race_results" WHERE "winning_driver"='peter collins' AND "circuit"='syracuse'; |
## Task
Generate a SQL query to answer the following question:
`Which report has a Winning driver of peter collins, and a Circuit of syracuse?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_race_results" (
"race_name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which report has a Winning driver of peter collins, and a Circuit of syracuse?`:
```sql
|
SELECT "appointed_by" FROM "former_judges" WHERE "judge"='edward e. cushman'; |
## Task
Generate a SQL query to answer the following question:
`Who appointed Judge Edward E. Cushman?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "former_judges" (
"judge" text,
"state" text,
"born_died" text,
"active_service" text,
"chief_judge" text,
"senior_status" text,
"appointed_by" text,
"reason_for_termination" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who appointed Judge Edward E. Cushman?`:
```sql
|
SELECT "chief_judge" FROM "former_judges" WHERE "judge"='jack edward tanner'; |
## Task
Generate a SQL query to answer the following question:
`Who was Judge Jack Edward Tanner's chief judge?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "former_judges" (
"judge" text,
"state" text,
"born_died" text,
"active_service" text,
"chief_judge" text,
"senior_status" text,
"appointed_by" text,
"reason_for_termination" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was Judge Jack Edward Tanner's chief judge?`:
```sql
|
SELECT "date_of_birth_age" FROM "2007_rugby_world_cup_squads" WHERE "caps"=11 AND "position"='prop'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of birth of the player that has 11 caps and plays the prop position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007_rugby_world_cup_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 `What is the date of birth of the player that has 11 caps and plays the prop position?`:
```sql
|
SELECT "club_province" FROM "2007_rugby_world_cup_squads" WHERE "caps"=12; |
## Task
Generate a SQL query to answer the following question:
`What club or province is the player with 12 caps from?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007_rugby_world_cup_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 `What club or province is the player with 12 caps from?`:
```sql
|
SELECT "position" FROM "2007_rugby_world_cup_squads" WHERE "club_province"='newcastle' AND "caps"<24 AND "player"='toby flood'; |
## Task
Generate a SQL query to answer the following question:
`What position does Toby Flood, who is from Newcastle and has fewer than 24 caps, play?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007_rugby_world_cup_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 `What position does Toby Flood, who is from Newcastle and has fewer than 24 caps, play?`:
```sql
|
SELECT "winning_team" FROM "nsl_cup_winners" WHERE "losing_team"='newcastle breakers'; |
## Task
Generate a SQL query to answer the following question:
`Which team beat the Newcastle Breakers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nsl_cup_winners" (
"season" text,
"cup_final_date" text,
"winning_team" text,
"score" text,
"losing_team" text,
"cup_final_attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team beat the Newcastle Breakers?`:
```sql
|
SELECT "losing_team" FROM "nsl_cup_winners" WHERE "cup_final_date"='20 august 1989'; |
## Task
Generate a SQL query to answer the following question:
`What team lost on 20 August 1989?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nsl_cup_winners" (
"season" text,
"cup_final_date" text,
"winning_team" text,
"score" text,
"losing_team" text,
"cup_final_attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team lost on 20 August 1989?`:
```sql
|
SELECT "cup_final_date" FROM "nsl_cup_winners" WHERE "winning_team"='brisbane lions (1)'; |
## Task
Generate a SQL query to answer the following question:
`On what date did the Brisbane Lions (1) win?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nsl_cup_winners" (
"season" text,
"cup_final_date" text,
"winning_team" text,
"score" text,
"losing_team" text,
"cup_final_attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date did the Brisbane Lions (1) win?`:
```sql
|
SELECT "winning_team" FROM "nsl_cup_winners" WHERE "cup_final_attendance"='8,132'; |
## Task
Generate a SQL query to answer the following question:
`What was the winning team with the 8,132 final attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nsl_cup_winners" (
"season" text,
"cup_final_date" text,
"winning_team" text,
"score" text,
"losing_team" text,
"cup_final_attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the winning team with the 8,132 final attendance?`:
```sql
|
SELECT "attendance" FROM "game_log" WHERE "date"='august 2'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance on August 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" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance on August 2?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "attendance"='31,220'; |
## Task
Generate a SQL query to answer the following question:
`What is the date where the attendance was 31,220?`
### 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 `What is the date where the attendance was 31,220?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "date"='august 4'; |
## Task
Generate a SQL query to answer the following question:
`What was the team's record on August 4?`
### 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 `What was the team's record on August 4?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "attendance"='48,041'; |
## Task
Generate a SQL query to answer the following question:
`What was the date when the attendance was 48,041?`
### 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 `What was the date when the attendance was 48,041?`:
```sql
|
SELECT "opponents_in_the_final" FROM "doubles_12" WHERE "partnering"='ricardo hocevar'; |
## Task
Generate a SQL query to answer the following question:
`Who are the finals opponents for the match with partner Ricardo Hocevar?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_12" (
"date" text,
"tournament" text,
"surface" text,
"partnering" text,
"opponents_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the finals opponents for the match with partner Ricardo Hocevar?`:
```sql
|
SELECT "opponents_in_the_final" FROM "doubles_12" WHERE "date"='june 23, 2003'; |
## Task
Generate a SQL query to answer the following question:
`Who were the opponents of the final on June 23, 2003?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_12" (
"date" text,
"tournament" text,
"surface" text,
"partnering" text,
"opponents_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the opponents of the final on June 23, 2003?`:
```sql
|
SELECT "home_team" FROM "round_21" WHERE "venue"='glenferrie oval'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home side at glenferrie oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_21" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the home side at glenferrie oval?`:
```sql
|
SELECT SUM("crowd") FROM "round_21" WHERE "home_team_score"='18.14 (122)'; |
## Task
Generate a SQL query to answer the following question:
`How many people attended the game with the home side scoring 18.14 (122)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_21" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people attended the game with the home side scoring 18.14 (122)?`:
```sql
|
SELECT "written_by" FROM "season_2_1998" WHERE "episode_num"='38 (16)'; |
## Task
Generate a SQL query to answer the following question:
`Who is the author of Episode 38 (16)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_2_1998" (
"episode_num" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the author of Episode 38 (16)?`:
```sql
|
SELECT "original_airdate" FROM "season_2_1998" WHERE "episode_num"='29 (7)'; |
## Task
Generate a SQL query to answer the following question:
`When did Episode 29 (7) originally air?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_2_1998" (
"episode_num" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did Episode 29 (7) originally air?`:
```sql
|
SELECT "directed_by" FROM "season_2_1998" WHERE "title"='\"approaching zero\"'; |
## Task
Generate a SQL query to answer the following question:
`Who directed the episode "Approaching Zero"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_2_1998" (
"episode_num" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed the episode "Approaching Zero"?`:
```sql
|
SELECT "episode_num" FROM "season_2_1998" WHERE "original_airdate"='april 5, 1998'; |
## Task
Generate a SQL query to answer the following question:
`What is the episode # of the episode that aired on April 5, 1998?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_2_1998" (
"episode_num" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the episode # of the episode that aired on April 5, 1998?`:
```sql
|
SELECT "written_by" FROM "season_2_1998" WHERE "original_airdate"='march 1, 1998'; |
## Task
Generate a SQL query to answer the following question:
`Who wrote the episode that originally aired on March 1, 1998?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_2_1998" (
"episode_num" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who wrote the episode that originally aired on March 1, 1998?`:
```sql
|
SELECT "tournament" FROM "grand_slam_singles_performance_timeline" WHERE "2000"='3r'; |
## Task
Generate a SQL query to answer the following question:
`what tournament has 2000 of 3r?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_slam_singles_performance_timeline" (
"tournament" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text
);
### SQL
Given the database schema, here is the SQL query that answers `what tournament has 2000 of 3r?`:
```sql
|
SELECT "2001" FROM "grand_slam_singles_performance_timeline" WHERE "1991"='4r'; |
## Task
Generate a SQL query to answer the following question:
`what 2001 has 1991 of 4r?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_slam_singles_performance_timeline" (
"tournament" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text
);
### SQL
Given the database schema, here is the SQL query that answers `what 2001 has 1991 of 4r?`:
```sql
|
SELECT "1989" FROM "grand_slam_singles_performance_timeline" WHERE "2002"='4r' AND "2005"='4r'; |
## Task
Generate a SQL query to answer the following question:
`what 1989 has 2002 of 4r and 2005 of 4r?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_slam_singles_performance_timeline" (
"tournament" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text
);
### SQL
Given the database schema, here is the SQL query that answers `what 1989 has 2002 of 4r and 2005 of 4r?`:
```sql
|
SELECT "away_team_score" FROM "round_4" WHERE "crowd">'28,536'; |
## Task
Generate a SQL query to answer the following question:
`What team played in front of 28,536 at an away stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team played in front of 28,536 at an away stadium?`:
```sql
|
SELECT "home_team_score" FROM "round_4" WHERE "home_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`What was Fitzroy score at their home stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Fitzroy score at their home stadium?`:
```sql
|
SELECT "date" FROM "round_4" WHERE "away_team_score"='12.14 (86)' AND "home_team_score"='15.10 (100)'; |
## Task
Generate a SQL query to answer the following question:
`When did an away team score 12.14 (86) against a home team with 15.10 (100)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did an away team score 12.14 (86) against a home team with 15.10 (100)?`:
```sql
|
SELECT "away_team_score" FROM "round_4" WHERE "home_team"='st kilda'; |
## Task
Generate a SQL query to answer the following question:
`Who faced off against St Kilda at their home?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who faced off against St Kilda at their home?`:
```sql
|
SELECT "venue" FROM "round_4" WHERE "home_team_score"='15.14 (104)'; |
## Task
Generate a SQL query to answer the following question:
`Where did a home team score 15.14 (104)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did a home team score 15.14 (104)?`:
```sql
|
SELECT "date" FROM "round_4" WHERE "away_team_score"='12.14 (86)' AND "venue"='windy hill'; |
## Task
Generate a SQL query to answer the following question:
`When did an away team score 12.14 (86) at Windy Hill?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did an away team score 12.14 (86) at Windy Hill?`:
```sql
|
SELECT MIN("top_25") FROM "summary" WHERE "events">15; |
## Task
Generate a SQL query to answer the following question:
`What is the low number of top 25s in an event with over 15 appearances?`
### 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 low number of top 25s in an event with over 15 appearances?`:
```sql
|
SELECT AVG("rank") FROM "biggest_opening_day_gross" WHERE "day_of_week"='wednesday' AND "year"<2012 AND "studio_s"='reliance entertainment'; |
## Task
Generate a SQL query to answer the following question:
`What is the average rank of the Reliance Entertainment movie with an opening day on Wednesday before 2012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "biggest_opening_day_gross" (
"rank" real,
"movie" text,
"year" real,
"studio_s" text,
"opening_day_net_gross" real,
"day_of_week" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average rank of the Reliance Entertainment movie with an opening day on Wednesday before 2012?`:
```sql
|
SELECT "day_of_week" FROM "biggest_opening_day_gross" WHERE "opening_day_net_gross">'14,76,00,000' AND "year"=2013 AND "movie"='chennai express'; |
## Task
Generate a SQL query to answer the following question:
`What is the opening day of the week of Chennai Express, which had an opening day net gross larger than 14,76,00,000 in 2013?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "biggest_opening_day_gross" (
"rank" real,
"movie" text,
"year" real,
"studio_s" text,
"opening_day_net_gross" real,
"day_of_week" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the opening day of the week of Chennai Express, which had an opening day net gross larger than 14,76,00,000 in 2013?`:
```sql
|
SELECT SUM("opening_day_net_gross") FROM "biggest_opening_day_gross" WHERE "studio_s"='reliance entertainment' AND "year"<2011; |
## Task
Generate a SQL query to answer the following question:
`What is the opening day net gross a Reliance Entertainment movie before 2011 had?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "biggest_opening_day_gross" (
"rank" real,
"movie" text,
"year" real,
"studio_s" text,
"opening_day_net_gross" real,
"day_of_week" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the opening day net gross a Reliance Entertainment movie before 2011 had?`:
```sql
|
SELECT "studio_s" FROM "biggest_opening_day_gross" WHERE "movie"='ra.one'; |
## Task
Generate a SQL query to answer the following question:
`What is the studio of ra.one?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "biggest_opening_day_gross" (
"rank" real,
"movie" text,
"year" real,
"studio_s" text,
"opening_day_net_gross" real,
"day_of_week" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the studio of ra.one?`:
```sql
|
SELECT COUNT("year") FROM "biggest_opening_day_gross" WHERE "day_of_week"='friday' AND "rank"=10; |
## Task
Generate a SQL query to answer the following question:
`What is the year of the movie with an opening day on Friday with a rank 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "biggest_opening_day_gross" (
"rank" real,
"movie" text,
"year" real,
"studio_s" text,
"opening_day_net_gross" real,
"day_of_week" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the year of the movie with an opening day on Friday with a rank 10?`:
```sql
|
SELECT MIN("sack") FROM "defense" WHERE "solo"=24 AND "tackles">25.5 AND "yards">0; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Sack with a Solo of 24, with Tackles larger than 25.5, with Yards larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "defense" (
"player" text,
"tackles" real,
"solo" real,
"assisted" real,
"sack" real,
"yards" real,
"td_s" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Sack with a Solo of 24, with Tackles larger than 25.5, with Yards larger than 0?`:
```sql
|
SELECT COUNT("solo") FROM "defense" WHERE "player"='sean mcinerney' AND "yards">0; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Solo with a Player with sean mcinerney, and Yards larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "defense" (
"player" text,
"tackles" real,
"solo" real,
"assisted" real,
"sack" real,
"yards" real,
"td_s" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Solo with a Player with sean mcinerney, and Yards larger than 0?`:
```sql
|
SELECT MAX("sack") FROM "defense" WHERE "assisted">4 AND "td_s"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Sack with an Assisted larger than 4, with TD's smaller than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "defense" (
"player" text,
"tackles" real,
"solo" real,
"assisted" real,
"sack" real,
"yards" real,
"td_s" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Sack with an Assisted larger than 4, with TD's smaller than 0?`:
```sql
|
SELECT SUM("total_capacity_m_we") FROM "projects_in_india" WHERE "power_plant"='ramakkalmedu'; |
## Task
Generate a SQL query to answer the following question:
`At the power plant located in ramakkalmedu, what is the sum of the total capacity (MWe)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "projects_in_india" (
"power_plant" text,
"producer" text,
"location" text,
"state" text,
"total_capacity_m_we" real
);
### SQL
Given the database schema, here is the SQL query that answers `At the power plant located in ramakkalmedu, what is the sum of the total capacity (MWe)?`:
```sql
|
SELECT "producer" FROM "projects_in_india" WHERE "power_plant"='chennai mohan'; |
## Task
Generate a SQL query to answer the following question:
`What company is the producer in the chennai mohan power plant?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "projects_in_india" (
"power_plant" text,
"producer" text,
"location" text,
"state" text,
"total_capacity_m_we" real
);
### SQL
Given the database schema, here is the SQL query that answers `What company is the producer in the chennai mohan power plant?`:
```sql
|
SELECT "producer" FROM "projects_in_india" WHERE "location"='poolavadi'; |
## Task
Generate a SQL query to answer the following question:
`What company is the producer at the poolavadi location`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "projects_in_india" (
"power_plant" text,
"producer" text,
"location" text,
"state" text,
"total_capacity_m_we" real
);
### SQL
Given the database schema, here is the SQL query that answers `What company is the producer at the poolavadi location`:
```sql
|
SELECT "producer" FROM "projects_in_india" WHERE "location"='kethanur'; |
## Task
Generate a SQL query to answer the following question:
`What company is known as the producer at the kethanur location?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "projects_in_india" (
"power_plant" text,
"producer" text,
"location" text,
"state" text,
"total_capacity_m_we" real
);
### SQL
Given the database schema, here is the SQL query that answers `What company is known as the producer at the kethanur location?`:
```sql
|
SELECT "away_team" FROM "round_22" WHERE "away_team_score"='18.11 (119)'; |
## Task
Generate a SQL query to answer the following question:
`Which away team scored 18.11 (119)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_22" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which away team scored 18.11 (119)?`:
```sql
|
SELECT "home_team" FROM "round_22" WHERE "home_team_score"='18.11 (119)'; |
## Task
Generate a SQL query to answer the following question:
`Which home team scored 18.11 (119)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_22" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which home team scored 18.11 (119)?`:
```sql
|
SELECT "feathered_fxx" FROM "list_of_test_flights" WHERE "duration"='11 min, 34 sec'; |
## Task
Generate a SQL query to answer the following question:
`When the duration was 11 min, 34 sec, what was the feathered (Fxx)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_test_flights" (
"flight_designation" text,
"date" text,
"duration" text,
"pilot_co_pilot" text,
"feathered_fxx" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the duration was 11 min, 34 sec, what was the feathered (Fxx)?`:
```sql
|
SELECT "city" FROM "uncials_with_sigla" WHERE "date"='5th' AND "name"='guelferbytanus b'; |
## Task
Generate a SQL query to answer the following question:
`I want to know the city for guelferbytanus b and the 5th`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "uncials_with_sigla" (
"sign" text,
"name" text,
"date" text,
"content" text,
"city" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want to know the city for guelferbytanus b and the 5th`:
```sql
|
SELECT "country" FROM "uncials_with_sigla" WHERE "date"='9th' AND "sign"='g e'; |
## Task
Generate a SQL query to answer the following question:
`Name the country for the 9th and sign of g e`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "uncials_with_sigla" (
"sign" text,
"name" text,
"date" text,
"content" text,
"city" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the country for the 9th and sign of g e`:
```sql
|
SELECT "content" FROM "uncials_with_sigla" WHERE "sign"='g e'; |
## Task
Generate a SQL query to answer the following question:
`Name the content for sign of g e`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "uncials_with_sigla" (
"sign" text,
"name" text,
"date" text,
"content" text,
"city" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the content for sign of g e`:
```sql
|
SELECT "city" FROM "uncials_with_sigla" WHERE "name"='athous lavrensis'; |
## Task
Generate a SQL query to answer the following question:
`Name the city for athous lavrensis`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "uncials_with_sigla" (
"sign" text,
"name" text,
"date" text,
"content" text,
"city" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the city for athous lavrensis`:
```sql
|
SELECT "race_name" FROM "summary" WHERE "dist_miles"='4' AND "runner_up"='not known'; |
## Task
Generate a SQL query to answer the following question:
`Which race had a distance of 4 miles where the runner-up was not known?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary" (
"race_name" text,
"dist_miles" text,
"course" text,
"prize" text,
"odds" text,
"runners" real,
"place" real,
"runner_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which race had a distance of 4 miles where the runner-up was not known?`:
```sql
|
SELECT "date" FROM "february" WHERE "home"='jazz' AND "visitor"='bulls'; |
## Task
Generate a SQL query to answer the following question:
`What date did the Jazz play the Bulls at home?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"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 did the Jazz play the Bulls at home?`:
```sql
|
SELECT "leading_scorer" FROM "february" WHERE "date"='february 26'; |
## Task
Generate a SQL query to answer the following question:
`On February 26, who was the leading scorer?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"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 `On February 26, who was the leading scorer?`:
```sql
|
SELECT "record" FROM "february" WHERE "leading_scorer"='carlos boozer (23)'; |
## Task
Generate a SQL query to answer the following question:
`What's the record of Carlos Boozer (23) as the leading scorer?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"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's the record of Carlos Boozer (23) as the leading scorer?`:
```sql
|
SELECT "date" FROM "february" WHERE "leading_scorer"='carlos boozer (23)'; |
## Task
Generate a SQL query to answer the following question:
`What date was Carlos Boozer (23) the leading scorer?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"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 was Carlos Boozer (23) the leading scorer?`:
```sql
|
SELECT "leading_scorer" FROM "february" WHERE "date"='february 9'; |
## Task
Generate a SQL query to answer the following question:
`Who was the leading scorer on February 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"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 `Who was the leading scorer on February 9?`:
```sql
|
SELECT "date" FROM "february" WHERE "leading_scorer"='deron williams (29)' AND "visitor"='hornets'; |
## Task
Generate a SQL query to answer the following question:
`While the Hornets were visiting, what date was Deron Williams (29) the leading scorer?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"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 `While the Hornets were visiting, what date was Deron Williams (29) the leading scorer?`:
```sql
|
SELECT "ships_in_class" FROM "minesweepers" WHERE "class"='kuha class'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the ships in classs for kuha class`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "minesweepers" (
"class" text,
"ships_in_class" text,
"pennant_number" real,
"builder" text,
"commissioned" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the ships in classs for kuha class`:
```sql
|
SELECT COUNT("grid") FROM "race" WHERE "constructor"='talbot-lago - talbot' AND "laps"<83 AND "driver"='johnny claes'; |
## Task
Generate a SQL query to answer the following question:
`How many grids have a Constructor of talbot-lago - talbot, a Laps under 83, and a driver of johnny claes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many grids have a Constructor of talbot-lago - talbot, a Laps under 83, and a driver of johnny claes?`:
```sql
|
SELECT MAX("crowd") FROM "round_9" WHERE "away_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`When the away team is Geelong, what is the highest crowd count?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_9" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the away team is Geelong, what is the highest crowd count?`:
```sql
|
SELECT SUM("crowd") FROM "round_9" WHERE "venue"='princes park'; |
## Task
Generate a SQL query to answer the following question:
`What is the total crowd count for the venue Princes Park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_9" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total crowd count for the venue Princes Park?`:
```sql
|
SELECT SUM("crowd") FROM "round_9" WHERE "away_team_score"='16.13 (109)'; |
## Task
Generate a SQL query to answer the following question:
`For the away team with a score of 16.13 (109), what is the total crowd count?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_9" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the away team with a score of 16.13 (109), what is the total crowd count?`:
```sql
|
SELECT "home_port" FROM "ships" WHERE "pennant"='m40'; |
## Task
Generate a SQL query to answer the following question:
`What is the home port of m40?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships" (
"navy" text,
"name" text,
"pennant" text,
"commissioned" real,
"home_port" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home port of m40?`:
```sql
|
SELECT "navy" FROM "ships" WHERE "home_port"='portsmouth' AND "commissioned">1983 AND "name"='middleton'; |
## Task
Generate a SQL query to answer the following question:
`What is the navy for middleton with a home port of portsmouth after 1983?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships" (
"navy" text,
"name" text,
"pennant" text,
"commissioned" real,
"home_port" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the navy for middleton with a home port of portsmouth after 1983?`:
```sql
|
SELECT "date_of_death" FROM "house_of_habsburg_1482_1678" WHERE "name"='charles iii'; |
## Task
Generate a SQL query to answer the following question:
`When did Charles III die?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "house_of_habsburg_1482_1678" (
"name" text,
"date_of_birth" text,
"date_of_death" text,
"reign" text,
"relationship_with_predecessor" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did Charles III die?`:
```sql
|
SELECT "fastest_lap" FROM "season_review" WHERE "winning_driver"='giuseppe farina'; |
## Task
Generate a SQL query to answer the following question:
`What is the fastest lap of the race where Giuseppe Farina was the winning driver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"tyre" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the fastest lap of the race where Giuseppe Farina was the winning driver?`:
```sql
|
SELECT "report" FROM "season_review" WHERE "constructor"='ferrari' AND "circuit"='monza'; |
## Task
Generate a SQL query to answer the following question:
`What is the report status of the race with Ferrari as the constructor and a monza circuit?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"tyre" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the report status of the race with Ferrari as the constructor and a monza circuit?`:
```sql
|
SELECT "constructor" FROM "season_review" WHERE "fastest_lap"='juan manuel fangio' AND "winning_driver"='giuseppe farina'; |
## Task
Generate a SQL query to answer the following question:
`What is the constructor of the race with Juan Manuel Fangio as the fastest lap and Giuseppe Farina as the winning driver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"tyre" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the constructor of the race with Juan Manuel Fangio as the fastest lap and Giuseppe Farina as the winning driver?`:
```sql
|
SELECT "winning_driver" FROM "season_review" WHERE "fastest_lap"='giuseppe farina' AND "race"='british grand prix'; |
## Task
Generate a SQL query to answer the following question:
`Who was the winning driver of the British Grand Prix where Giuseppe Farina had the fastest lap?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"tyre" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the winning driver of the British Grand Prix where Giuseppe Farina had the fastest lap?`:
```sql
|
SELECT "race" FROM "season_review" WHERE "tyre"='p' AND "winning_driver"='juan manuel fangio'; |
## Task
Generate a SQL query to answer the following question:
`What is the race that had a tyre of p and Juan Manuel Fangio as the winning driver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"tyre" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the race that had a tyre of p and Juan Manuel Fangio as the winning driver?`:
```sql
|
SELECT SUM("quantity") FROM "1893_1900" WHERE "type"='2-4-2t'; |
## Task
Generate a SQL query to answer the following question:
`What is the Quantity of Type 2-4-2t?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1893_1900" (
"class" text,
"type" text,
"quantity" real,
"date" text,
"lner_class" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Quantity of Type 2-4-2t?`:
```sql
|
SELECT SUM("quantity") FROM "1893_1900" WHERE "date"='1900'; |
## Task
Generate a SQL query to answer the following question:
`What was the Quantity on Date 1900?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1893_1900" (
"class" text,
"type" text,
"quantity" real,
"date" text,
"lner_class" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Quantity on Date 1900?`:
```sql
|
SELECT COUNT("quantity") FROM "1893_1900" WHERE "type"='2-4-2t'; |
## Task
Generate a SQL query to answer the following question:
`What is the Quantity of type 2-4-2t?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1893_1900" (
"class" text,
"type" text,
"quantity" real,
"date" text,
"lner_class" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Quantity of type 2-4-2t?`:
```sql
|
SELECT MIN("grid") FROM "classification" WHERE "time_retired"='engine' AND "qual"<138.75; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest grid with a Time/Retired of engine, and a qual of less than 138.75?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"grid" real,
"constructor" text,
"qual" real,
"rank" real,
"laps" real,
"time_retired" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest grid with a Time/Retired of engine, and a qual of less than 138.75?`:
```sql
|
SELECT "laps" FROM "classification" WHERE "rank">13 AND "time_retired"='accident' AND "qual"<136.98; |
## Task
Generate a SQL query to answer the following question:
`What laps have a rank larger than 13 and the Time/Retired is accident, and a Qual smaller than 136.98?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"grid" real,
"constructor" text,
"qual" real,
"rank" real,
"laps" real,
"time_retired" text
);
### SQL
Given the database schema, here is the SQL query that answers `What laps have a rank larger than 13 and the Time/Retired is accident, and a Qual smaller than 136.98?`:
```sql
|
SELECT "position" FROM "2011_team" WHERE "player"='sal martinez'; |
## Task
Generate a SQL query to answer the following question:
`What position is Sal Martinez?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_team" (
"player" text,
"position" text,
"school" text,
"hometown" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What position is Sal Martinez?`:
```sql
|
SELECT "compatibility" FROM "chimney_bombs" WHERE "mnemonic"='d for \"dynamite\"'; |
## Task
Generate a SQL query to answer the following question:
`What is the compatibility for the Mnemonic d for "dynamite"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "chimney_bombs" (
"fire_class" text,
"geometric_symbol" text,
"intended_use" text,
"mnemonic" text,
"compatibility" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the compatibility for the Mnemonic d for "dynamite"?`:
```sql
|
SELECT "constructor" FROM "classification" WHERE "time_retired"='+2:06.0'; |
## Task
Generate a SQL query to answer the following question:
`Who constructed the car that has a Time/Retired of +2:06.0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who constructed the car that has a Time/Retired of +2:06.0?`:
```sql
|
SELECT SUM("laps") FROM "classification" WHERE "grid"<15 AND "time_retired"='transmission'; |
## Task
Generate a SQL query to answer the following question:
`What is the lap total for the grid under 15 that retired due to transmission?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lap total for the grid under 15 that retired due to transmission?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.