output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "time_retired" FROM "classification" WHERE "driver"='emerson fittipaldi'; |
## Task
Generate a SQL query to answer the following question:
`What is the Time/Retired for emerson fittipaldi?`
### 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 Time/Retired for emerson fittipaldi?`:
```sql
|
SELECT "long" FROM "running_backs" WHERE "car"=26; |
## Task
Generate a SQL query to answer the following question:
`What is the long for the player with 26 carries?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "running_backs" (
"player" text,
"car" real,
"yards" text,
"avg" text,
"td_s" real,
"long" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the long for the player with 26 carries?`:
```sql
|
SELECT COUNT("car") FROM "running_backs" WHERE "long"='2'; |
## Task
Generate a SQL query to answer the following question:
`How many carries for the player with a 2 yard long?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "running_backs" (
"player" text,
"car" real,
"yards" text,
"avg" text,
"td_s" real,
"long" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many carries for the player with a 2 yard long?`:
```sql
|
SELECT "long" FROM "running_backs" WHERE "car"<30 AND "yards"='0'; |
## Task
Generate a SQL query to answer the following question:
`What is the long for the player with under 30 carries and 0 yards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "running_backs" (
"player" text,
"car" real,
"yards" text,
"avg" text,
"td_s" real,
"long" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the long for the player with under 30 carries and 0 yards?`:
```sql
|
SELECT AVG("wins") FROM "seasons" WHERE "division"='central' AND "reds_season"<2000 AND "losses"<81; |
## Task
Generate a SQL query to answer the following question:
`How many wins were there in the 2000 season in the central division with less than 81 losses?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seasons" (
"mlb_season" text,
"reds_season" real,
"league" text,
"division" text,
"finish" text,
"wins" real,
"losses" real,
"winpct" real,
"gb_c" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins were there in the 2000 season in the central division with less than 81 losses?`:
```sql
|
SELECT MIN("winpct") FROM "seasons" WHERE "gb_c"='17' AND "reds_season"=1989; |
## Task
Generate a SQL query to answer the following question:
`What was the lowest percentages of wins in 1989 with a GB [c] of 17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seasons" (
"mlb_season" text,
"reds_season" real,
"league" text,
"division" text,
"finish" text,
"wins" real,
"losses" real,
"winpct" real,
"gb_c" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the lowest percentages of wins in 1989 with a GB [c] of 17?`:
```sql
|
SELECT AVG("losses") FROM "seasons" WHERE "mlb_season"='1943'; |
## Task
Generate a SQL query to answer the following question:
`How many losses did the 1943 MLB have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seasons" (
"mlb_season" text,
"reds_season" real,
"league" text,
"division" text,
"finish" text,
"wins" real,
"losses" real,
"winpct" real,
"gb_c" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many losses did the 1943 MLB have?`:
```sql
|
SELECT MIN("wins") FROM "seasons" WHERE "finish"='7th' AND "winpct">0.429 AND "reds_season"<1915; |
## Task
Generate a SQL query to answer the following question:
`What was the lowest wins in a season less than 1915 with a 7th finish and 0.429 win %?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seasons" (
"mlb_season" text,
"reds_season" real,
"league" text,
"division" text,
"finish" text,
"wins" real,
"losses" real,
"winpct" real,
"gb_c" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the lowest wins in a season less than 1915 with a 7th finish and 0.429 win %?`:
```sql
|
SELECT "gb_c" FROM "seasons" WHERE "winpct"<0.457 AND "wins"=62 AND "reds_season"=1900; |
## Task
Generate a SQL query to answer the following question:
`In 1900 with 62 wins and a win percentage less than 0.457, what was the GB [c]?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seasons" (
"mlb_season" text,
"reds_season" real,
"league" text,
"division" text,
"finish" text,
"wins" real,
"losses" real,
"winpct" real,
"gb_c" text
);
### SQL
Given the database schema, here is the SQL query that answers `In 1900 with 62 wins and a win percentage less than 0.457, what was the GB [c]?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "score"='7–6 (12)'; |
## Task
Generate a SQL query to answer the following question:
`Which record has a score of 7–6 (12)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which record has a score of 7–6 (12)?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "record"='59–59'; |
## Task
Generate a SQL query to answer the following question:
`On what date was the record 59–59?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was the record 59–59?`:
```sql
|
SELECT "loss" FROM "game_log" WHERE "date"='august 21'; |
## Task
Generate a SQL query to answer the following question:
`What loss occurred on August 21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What loss occurred on August 21?`:
```sql
|
SELECT MAX("1985") FROM "provincial_percentage_share_of_average_c" WHERE "1990"=93; |
## Task
Generate a SQL query to answer the following question:
`What is the highest 1985 value that has a 1990 value of 93?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "provincial_percentage_share_of_average_c" (
"year" text,
"2010" real,
"2009" real,
"2008" real,
"2005" real,
"2000" real,
"1995" real,
"1990" real,
"1985" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest 1985 value that has a 1990 value of 93?`:
```sql
|
SELECT MAX("2000") FROM "provincial_percentage_share_of_average_c" WHERE "2010"=82 AND "2005"<74; |
## Task
Generate a SQL query to answer the following question:
`What is the highest 2000 value that has a 2010 value of 82 and a 2005 value less than 74?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "provincial_percentage_share_of_average_c" (
"year" text,
"2010" real,
"2009" real,
"2008" real,
"2005" real,
"2000" real,
"1995" real,
"1990" real,
"1985" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest 2000 value that has a 2010 value of 82 and a 2005 value less than 74?`:
```sql
|
SELECT SUM("1995") FROM "provincial_percentage_share_of_average_c" WHERE "year"='jiangxi' AND "2008">67; |
## Task
Generate a SQL query to answer the following question:
`What is the 1995 value with a Jiangxi year and a 2008 value bigger than 67?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "provincial_percentage_share_of_average_c" (
"year" text,
"2010" real,
"2009" real,
"2008" real,
"2005" real,
"2000" real,
"1995" real,
"1990" real,
"1985" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 1995 value with a Jiangxi year and a 2008 value bigger than 67?`:
```sql
|
SELECT MIN("2009") FROM "provincial_percentage_share_of_average_c" WHERE "2010"=141 AND "1985">165; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest 2009 value with a 2010 value of 141 and a 1985 value bigger than 165?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "provincial_percentage_share_of_average_c" (
"year" text,
"2010" real,
"2009" real,
"2008" real,
"2005" real,
"2000" real,
"1995" real,
"1990" real,
"1985" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest 2009 value with a 2010 value of 141 and a 1985 value bigger than 165?`:
```sql
|
SELECT SUM("1995") FROM "provincial_percentage_share_of_average_c" WHERE "2005">74 AND "2008"=84 AND "2000"<80; |
## Task
Generate a SQL query to answer the following question:
`What is the 1995 value with a 2005 value bigger than 74, a 2008 value of 84, and a 2000 value less than 80?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "provincial_percentage_share_of_average_c" (
"year" text,
"2010" real,
"2009" real,
"2008" real,
"2005" real,
"2000" real,
"1995" real,
"1990" real,
"1985" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 1995 value with a 2005 value bigger than 74, a 2008 value of 84, and a 2000 value less than 80?`:
```sql
|
SELECT "election" FROM "members_of_parliament" WHERE "1st_member"='sir christopher william codrington' AND "2nd_member"='robert stayner holford'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the election where Sir Christopher William Codrington was elected as First Member and Robert Stayner Holford as the Second Member?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members_of_parliament" (
"election" text,
"1st_member" text,
"1st_party" text,
"2nd_member" text,
"2nd_party" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the election where Sir Christopher William Codrington was elected as First Member and Robert Stayner Holford as the Second Member?`:
```sql
|
SELECT "2nd_party" FROM "members_of_parliament" WHERE "1st_member"='sir christopher william codrington' AND "2nd_member"='hon. francis charteris'; |
## Task
Generate a SQL query to answer the following question:
`What is the Second Party where Sir Christopher William Codrington is the First Member and Hon. Francis Charteris is the Second Member?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members_of_parliament" (
"election" text,
"1st_member" text,
"1st_party" text,
"2nd_member" text,
"2nd_party" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Second Party where Sir Christopher William Codrington is the First Member and Hon. Francis Charteris is the Second Member?`:
```sql
|
SELECT "election" FROM "members_of_parliament" WHERE "1st_member"='sir christopher william codrington' AND "2nd_party"='conservative'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the election where Sir Christopher William Codrington is elected First Member and the second party is Conservative?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members_of_parliament" (
"election" text,
"1st_member" text,
"1st_party" text,
"2nd_member" text,
"2nd_party" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the election where Sir Christopher William Codrington is elected First Member and the second party is Conservative?`:
```sql
|
SELECT "label" FROM "compilations" WHERE "year">2004; |
## Task
Generate a SQL query to answer the following question:
`What label is after 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "compilations" (
"year" real,
"tracks" text,
"title" text,
"format_special_notes" text,
"label" text
);
### SQL
Given the database schema, here is the SQL query that answers `What label is after 2004?`:
```sql
|
SELECT "format_special_notes" FROM "compilations" WHERE "title"='the pact: ...of the gods'; |
## Task
Generate a SQL query to answer the following question:
`What is the Format and Special Notes for of the pact: ...of the gods?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "compilations" (
"year" real,
"tracks" text,
"title" text,
"format_special_notes" text,
"label" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Format and Special Notes for of the pact: ...of the gods?`:
```sql
|
SELECT "title" FROM "compilations" WHERE "tracks"='noxialicht'; |
## Task
Generate a SQL query to answer the following question:
`What movie has noxialicht as a track?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "compilations" (
"year" real,
"tracks" text,
"title" text,
"format_special_notes" text,
"label" text
);
### SQL
Given the database schema, here is the SQL query that answers `What movie has noxialicht as a track?`:
```sql
|
SELECT MIN("gold") FROM "medal_table_2006_2009" WHERE "rank"='12'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest gold medals of a rank 12 team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table_2006_2009" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest gold medals of a rank 12 team?`:
```sql
|
SELECT COUNT("bronze") FROM "medal_table_2006_2009" WHERE "silver">8 AND "total"=50; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of bronze medals of the team with more than 8 silvers and a total of 50 medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table_2006_2009" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of bronze medals of the team with more than 8 silvers and a total of 50 medals?`:
```sql
|
SELECT AVG("gold") FROM "medal_table_2006_2009" WHERE "nation"='uzbekistan' AND "total"<24; |
## Task
Generate a SQL query to answer the following question:
`What is the average gold medals Uzbekistan, which has less than 24 total medals, has?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table_2006_2009" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average gold medals Uzbekistan, which has less than 24 total medals, has?`:
```sql
|
SELECT "open_cup" FROM "year_by_year" WHERE "year">1993; |
## Task
Generate a SQL query to answer the following question:
`Which open cup was after 1993?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year" (
"year" real,
"division" text,
"league" text,
"reg_season" text,
"playoffs" text,
"open_cup" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which open cup was after 1993?`:
```sql
|
SELECT AVG("year") FROM "year_by_year" WHERE "playoffs"='champion'; |
## Task
Generate a SQL query to answer the following question:
`Which year had playoffs of champion?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year" (
"year" real,
"division" text,
"league" text,
"reg_season" text,
"playoffs" text,
"open_cup" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which year had playoffs of champion?`:
```sql
|
SELECT "division" FROM "year_by_year" WHERE "year"=1993; |
## Task
Generate a SQL query to answer the following question:
`What divisions was in the year 1993?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year" (
"year" real,
"division" text,
"league" text,
"reg_season" text,
"playoffs" text,
"open_cup" text
);
### SQL
Given the database schema, here is the SQL query that answers `What divisions was in the year 1993?`:
```sql
|
SELECT "uk_base" FROM "air_movement_table_mission_albany" WHERE "troop_carrier_group"='441st tcg' AND "serial"='14'; |
## Task
Generate a SQL query to answer the following question:
`Which UK base has 441st tcg Troop carrier group and 14 as their seir serial?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "air_movement_table_mission_albany" (
"serial" text,
"airborne_unit" text,
"troop_carrier_group" text,
"num_of_c_47s" real,
"uk_base" text,
"drop_zone" text,
"drop_zone_time" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which UK base has 441st tcg Troop carrier group and 14 as their seir serial?`:
```sql
|
SELECT "drop_zone_time" FROM "air_movement_table_mission_albany" WHERE "troop_carrier_group"='439th tcg' AND "num_of_c_47s">36; |
## Task
Generate a SQL query to answer the following question:
`What is the Drop Zone time for the 439th tcg Troop Carrier Group with more tham 36 C-47s?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "air_movement_table_mission_albany" (
"serial" text,
"airborne_unit" text,
"troop_carrier_group" text,
"num_of_c_47s" real,
"uk_base" text,
"drop_zone" text,
"drop_zone_time" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Drop Zone time for the 439th tcg Troop Carrier Group with more tham 36 C-47s?`:
```sql
|
SELECT "grid" FROM "classification" WHERE "constructor"='maserati' AND "laps"=14; |
## Task
Generate a SQL query to answer the following question:
`What was the grid placement for the Maserati that completed 14 laps?`
### 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 was the grid placement for the Maserati that completed 14 laps?`:
```sql
|
SELECT "constructor" FROM "classification" WHERE "driver"='tony brooks'; |
## Task
Generate a SQL query to answer the following question:
`What company built the car driven by Tony Brooks?`
### 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 company built the car driven by Tony Brooks?`:
```sql
|
SELECT "score" FROM "eastern_conference_quarter_finals_vs_1_n" WHERE "date"='may 2'; |
## Task
Generate a SQL query to answer the following question:
`What is the score on the date of May 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eastern_conference_quarter_finals_vs_1_n" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score on the date of May 2?`:
```sql
|
SELECT "visitor" FROM "eastern_conference_quarter_finals_vs_1_n" WHERE "date"='april 30'; |
## Task
Generate a SQL query to answer the following question:
`What city was a visitor on the date of April 30?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eastern_conference_quarter_finals_vs_1_n" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What city was a visitor on the date of April 30?`:
```sql
|
SELECT "visitor" FROM "eastern_conference_quarter_finals_vs_1_n" WHERE "date"='april 22'; |
## Task
Generate a SQL query to answer the following question:
`On the date of April 22, which city was a visitor?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eastern_conference_quarter_finals_vs_1_n" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `On the date of April 22, which city was a visitor?`:
```sql
|
SELECT "visitor" FROM "eastern_conference_quarter_finals_vs_1_n" WHERE "home"='ottawa' AND "date"='april 26'; |
## Task
Generate a SQL query to answer the following question:
`What visitor has Ottawa as a home and a date of April 26?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eastern_conference_quarter_finals_vs_1_n" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What visitor has Ottawa as a home and a date of April 26?`:
```sql
|
SELECT "date_of_birth_age" FROM "2007_rugby_world_cup_squads" WHERE "player"='paino hehea'; |
## Task
Generate a SQL query to answer the following question:
`What is Paino Hehea's date of birth?`
### 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 Paino Hehea's date of birth?`:
```sql
|
SELECT "location" FROM "mixed_martial_arts_record" WHERE "record"='3-0'; |
## Task
Generate a SQL query to answer the following question:
`I want to know the location that has a record of 3-0`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want to know the location that has a record of 3-0`:
```sql
|
SELECT "record" FROM "mixed_martial_arts_record" WHERE "round">1; |
## Task
Generate a SQL query to answer the following question:
`Tell me the record for round more than 1`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the record for round more than 1`:
```sql
|
SELECT "method" FROM "mixed_martial_arts_record" WHERE "opponent"='jerry bohlander'; |
## Task
Generate a SQL query to answer the following question:
`I want to know the method for opponent of jerry bohlander`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want to know the method for opponent of jerry bohlander`:
```sql
|
SELECT "player" FROM "serie_a" WHERE "club"='bologna milan'; |
## Task
Generate a SQL query to answer the following question:
`Who belongs to the Bologna Milan club?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "serie_a" (
"season" text,
"player" text,
"nationality" text,
"club" text,
"goals" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who belongs to the Bologna Milan club?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "date"='june 6'; |
## Task
Generate a SQL query to answer the following question:
`Who is the opponent on June 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"home_away" text,
"field" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the opponent on June 6?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "field"='commerce bank ballpark'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the game at Commerce Bank Ballpark?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"home_away" text,
"field" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the game at Commerce Bank Ballpark?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "field"='bishop kearney field' AND "date"='august 2'; |
## Task
Generate a SQL query to answer the following question:
`What is the result of the game at Bishop Kearney Field on August 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"home_away" text,
"field" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result of the game at Bishop Kearney Field on August 2?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "field"='homewood field'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent of the game at Homewood field?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"home_away" text,
"field" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent of the game at Homewood field?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "field"='bishop kearney field' AND "date"='august 2'; |
## Task
Generate a SQL query to answer the following question:
`What is the result of the game at Bishop Kearney Field on August 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"home_away" text,
"field" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result of the game at Bishop Kearney Field on August 2?`:
```sql
|
SELECT "time" FROM "newcomers_race_a" WHERE "speed"='102.962mph'; |
## Task
Generate a SQL query to answer the following question:
`What is the time of the rider with a speed of 102.962mph?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "newcomers_race_a" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time of the rider with a speed of 102.962mph?`:
```sql
|
SELECT "rider" FROM "newcomers_race_a" WHERE "time"='1:27.37.22'; |
## Task
Generate a SQL query to answer the following question:
`Who is the rider who had the time of 1:27.37.22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "newcomers_race_a" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the rider who had the time of 1:27.37.22?`:
```sql
|
SELECT "rider" FROM "newcomers_race_a" WHERE "rank"<10 AND "time"='1:26.31.20'; |
## Task
Generate a SQL query to answer the following question:
`Who is the rider who has a rank lower than 10, and a time of 1:26.31.20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "newcomers_race_a" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the rider who has a rank lower than 10, and a time of 1:26.31.20?`:
```sql
|
SELECT "date" FROM "season_review" WHERE "circuit"='indianapolis'; |
## Task
Generate a SQL query to answer the following question:
`What date was the Circuit of Indianapolis?`
### 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,
"winning_driver" text,
"constructor" text,
"tyre" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the Circuit of Indianapolis?`:
```sql
|
SELECT "constructor" FROM "season_review" WHERE "race"='argentine grand prix'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Constructor at the Argentine Grand Prix?`
### 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,
"winning_driver" text,
"constructor" text,
"tyre" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Constructor at the Argentine Grand Prix?`:
```sql
|
SELECT "date" FROM "season_review" WHERE "circuit"='indianapolis'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the Circuit of Indianapolis?`
### 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,
"winning_driver" text,
"constructor" text,
"tyre" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the Circuit of Indianapolis?`:
```sql
|
SELECT "winning_driver" FROM "season_review" WHERE "race"='argentine grand prix'; |
## Task
Generate a SQL query to answer the following question:
`Who was the winning driver of the Argentine Grand Prix?`
### 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,
"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 Argentine Grand Prix?`:
```sql
|
SELECT "report" FROM "season_review" WHERE "pole_position"='juan manuel fangio' AND "tyre"='c'; |
## Task
Generate a SQL query to answer the following question:
`What was Juan Manuel Fangio's reported pole position and the tire of C?`
### 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,
"winning_driver" text,
"constructor" text,
"tyre" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Juan Manuel Fangio's reported pole position and the tire of C?`:
```sql
|
SELECT SUM("attendance") FROM "march" WHERE "home"='montreal' AND "date"='march 24'; |
## Task
Generate a SQL query to answer the following question:
`What was the Attendance when the Home team was Montreal, on the Date of March 24?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Attendance when the Home team was Montreal, on the Date of March 24?`:
```sql
|
SELECT "score" FROM "march" WHERE "date"='march 15'; |
## Task
Generate a SQL query to answer the following question:
`What was the Score on March 15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Score on March 15?`:
```sql
|
SELECT "school_club_team" FROM "c" WHERE "player"='dell curry'; |
## Task
Generate a SQL query to answer the following question:
`What school does Dell Curry play for?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "c" (
"player" text,
"nationality" text,
"position" text,
"years_for_jazz" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What school does Dell Curry play for?`:
```sql
|
SELECT "school_club_team" FROM "c" WHERE "player"='john crotty'; |
## Task
Generate a SQL query to answer the following question:
`What school does John Crotty play for?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "c" (
"player" text,
"nationality" text,
"position" text,
"years_for_jazz" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What school does John Crotty play for?`:
```sql
|
SELECT "school_club_team" FROM "c" WHERE "player"='wayne cooper'; |
## Task
Generate a SQL query to answer the following question:
`What school does Wayne Cooper play for?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "c" (
"player" text,
"nationality" text,
"position" text,
"years_for_jazz" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What school does Wayne Cooper play for?`:
```sql
|
SELECT "player" FROM "running_backs" WHERE "long">8 AND "yards"='73'; |
## Task
Generate a SQL query to answer the following question:
`Who has greater than 8 Long and a 73 Yards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "running_backs" (
"player" text,
"car" real,
"yards" text,
"avg" text,
"long" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who has greater than 8 Long and a 73 Yards?`:
```sql
|
SELECT MAX("long") FROM "running_backs" WHERE "yards"='26' AND "car"<9; |
## Task
Generate a SQL query to answer the following question:
`Who has a highest Long with 26 Yards and less than 9 Car?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "running_backs" (
"player" text,
"car" real,
"yards" text,
"avg" text,
"long" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who has a highest Long with 26 Yards and less than 9 Car?`:
```sql
|
SELECT MAX("long") FROM "running_backs" WHERE "car"=59; |
## Task
Generate a SQL query to answer the following question:
`Who has the highest Long with 59 Car?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "running_backs" (
"player" text,
"car" real,
"yards" text,
"avg" text,
"long" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who has the highest Long with 59 Car?`:
```sql
|
SELECT "team" FROM "individual_2007_uci_pro_tour_standings_a" WHERE "rank"<13 AND "points">79 AND "previous_rank"='4'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the team with a rank less than 13 and points more than 79 and previous rank of 4`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual_2007_uci_pro_tour_standings_a" (
"rank" real,
"previous_rank" text,
"name" text,
"nationality" text,
"team" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the team with a rank less than 13 and points more than 79 and previous rank of 4`:
```sql
|
SELECT SUM("points") FROM "individual_2007_uci_pro_tour_standings_a" WHERE "previous_rank"='3'; |
## Task
Generate a SQL query to answer the following question:
`I want to know the sum of points with a previous rank of 3`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual_2007_uci_pro_tour_standings_a" (
"rank" real,
"previous_rank" text,
"name" text,
"nationality" text,
"team" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `I want to know the sum of points with a previous rank of 3`:
```sql
|
SELECT "previous_rank" FROM "individual_2007_uci_pro_tour_standings_a" WHERE "nationality"='italy' AND "points">100; |
## Task
Generate a SQL query to answer the following question:
`Tell me the previous rank for italy with points more than 100`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual_2007_uci_pro_tour_standings_a" (
"rank" real,
"previous_rank" text,
"name" text,
"nationality" text,
"team" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the previous rank for italy with points more than 100`:
```sql
|
SELECT SUM("rank") FROM "individual_2007_uci_pro_tour_standings_a" WHERE "nationality"='australia' AND "points"<79; |
## Task
Generate a SQL query to answer the following question:
`Tell me the sum of rank for australia when points are less than 79`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual_2007_uci_pro_tour_standings_a" (
"rank" real,
"previous_rank" text,
"name" text,
"nationality" text,
"team" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the sum of rank for australia when points are less than 79`:
```sql
|
SELECT "s_motor_ship_s_naval_trawler" FROM "naval_forces_operation_mainbrace_1952_ci" WHERE "grand_total"=20; |
## Task
Generate a SQL query to answer the following question:
`How many ships for the nation with grand total of 20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "naval_forces_operation_mainbrace_1952_ci" (
"nato_member" text,
"aircraft_carriers" text,
"battleships" text,
"cruisers" text,
"escorts" text,
"submarines" text,
"torpedo_boat_squadrons" text,
"s_motor_ship_s_naval_trawler" text,
"grand_total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many ships for the nation with grand total of 20?`:
```sql
|
SELECT "escorts" FROM "naval_forces_operation_mainbrace_1952_ci" WHERE "cruisers"='6'; |
## Task
Generate a SQL query to answer the following question:
`How many escorts does the nation with 6 cruisers have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "naval_forces_operation_mainbrace_1952_ci" (
"nato_member" text,
"aircraft_carriers" text,
"battleships" text,
"cruisers" text,
"escorts" text,
"submarines" text,
"torpedo_boat_squadrons" text,
"s_motor_ship_s_naval_trawler" text,
"grand_total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many escorts does the nation with 6 cruisers have?`:
```sql
|
SELECT "street_address" FROM "timeline_of_tallest_buildings" WHERE "floors"=44; |
## Task
Generate a SQL query to answer the following question:
`Which address has 44 floors?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "timeline_of_tallest_buildings" (
"name" text,
"street_address" text,
"years_as_tallest" text,
"height_ft_m" text,
"floors" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which address has 44 floors?`:
```sql
|
SELECT AVG("total_kg") FROM "heavyweight_75_kg" WHERE "bodyweight"=73.28 AND "snatch"<75; |
## Task
Generate a SQL query to answer the following question:
`What is the total for the person with 73.28 bodyweight and fewer snatches than 75?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heavyweight_75_kg" (
"name" text,
"bodyweight" real,
"snatch" real,
"clean_jerk" real,
"total_kg" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total for the person with 73.28 bodyweight and fewer snatches than 75?`:
```sql
|
SELECT "name" FROM "heavyweight_75_kg" WHERE "bodyweight"=73.6; |
## Task
Generate a SQL query to answer the following question:
`Which person has a bodyweight of 73.6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heavyweight_75_kg" (
"name" text,
"bodyweight" real,
"snatch" real,
"clean_jerk" real,
"total_kg" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which person has a bodyweight of 73.6?`:
```sql
|
SELECT AVG("total_kg") FROM "heavyweight_75_kg" WHERE "snatch">87.5 AND "bodyweight">74.8; |
## Task
Generate a SQL query to answer the following question:
`What is the total for the player with more snatches than 87.5 and bodyweight more than 74.8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heavyweight_75_kg" (
"name" text,
"bodyweight" real,
"snatch" real,
"clean_jerk" real,
"total_kg" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total for the player with more snatches than 87.5 and bodyweight more than 74.8?`:
```sql
|
SELECT SUM("bodyweight") FROM "heavyweight_75_kg" WHERE "clean_jerk"=82.5 AND "total_kg"<152.5; |
## Task
Generate a SQL query to answer the following question:
`What is the bodyweight for the player with a clean & jerk of 82.5 and total smaller than 152.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heavyweight_75_kg" (
"name" text,
"bodyweight" real,
"snatch" real,
"clean_jerk" real,
"total_kg" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the bodyweight for the player with a clean & jerk of 82.5 and total smaller than 152.5?`:
```sql
|
SELECT "home_team_score" FROM "round_10" WHERE "away_team"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`Name the home team when the away team was essendon`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_10" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the home team when the away team was essendon`:
```sql
|
SELECT "away_team_score" FROM "round_10" WHERE "home_team"='university'; |
## Task
Generate a SQL query to answer the following question:
`Name the away team score for home team of university`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_10" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the away team score for home team of university`:
```sql
|
SELECT "venue" FROM "round_10" WHERE "away_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`Name the venue for geelong away team`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_10" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the venue for geelong away team`:
```sql
|
SELECT "venue" FROM "round_10" WHERE "away_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`Name the venue when the away team was richmond`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_10" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the venue when the away team was richmond`:
```sql
|
SELECT "away_team_score" FROM "round_10" WHERE "away_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`Name the away team score for geelong away team`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_10" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the away team score for geelong away team`:
```sql
|
SELECT "home_team_score" FROM "round_3" WHERE "venue"='brunswick street oval'; |
## Task
Generate a SQL query to answer the following question:
`When the venue was brunswick street oval 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_3" (
"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 brunswick street oval what was the home teams score?`:
```sql
|
SELECT "home_team" FROM "round_3" WHERE "crowd">'20,000' AND "away_team_score"='10.15 (75)'; |
## Task
Generate a SQL query to answer the following question:
`When the away team scored 10.15 (75) and the crowd was larger than 20,000 people, what was the home team playing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"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 10.15 (75) and the crowd was larger than 20,000 people, what was the home team playing?`:
```sql
|
SELECT "home_team_score" FROM "round_3" WHERE "away_team_score"='7.8 (50)'; |
## Task
Generate a SQL query to answer the following question:
`When the away team scored 7.8 (50), what was the opposing teams score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"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 7.8 (50), what was the opposing teams score?`:
```sql
|
SELECT "home_team" FROM "round_3" WHERE "away_team_score"='14.14 (98)'; |
## Task
Generate a SQL query to answer the following question:
`When the away team scored 14.14 (98), who was the Home team who played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"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 14.14 (98), who was the Home team who played?`:
```sql
|
SELECT "away_team" FROM "round_3" WHERE "home_team_score"='14.15 (99)'; |
## Task
Generate a SQL query to answer the following question:
`If the home team scored 14.15 (99), who was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"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 home team scored 14.15 (99), who was the away team?`:
```sql
|
SELECT SUM("draw") FROM "semi_final_2_14_february_1999" WHERE "artist"='wendy fierce'; |
## Task
Generate a SQL query to answer the following question:
`How many draws feature artist wendy fierce?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semi_final_2_14_february_1999" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many draws feature artist wendy fierce?`:
```sql
|
SELECT "song" FROM "semi_final_2_14_february_1999" WHERE "place">2 AND "draw"=1; |
## Task
Generate a SQL query to answer the following question:
`What song is later than place 2 and has a draw number of 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semi_final_2_14_february_1999" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `What song is later than place 2 and has a draw number of 1?`:
```sql
|
SELECT "date" FROM "round_7" WHERE "home_team"='collingwood'; |
## Task
Generate a SQL query to answer the following question:
`What day did Collingwood play as the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"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 day did Collingwood play as the home team?`:
```sql
|
SELECT "away_team" FROM "round_7" WHERE "venue"='princes park'; |
## Task
Generate a SQL query to answer the following question:
`Who was the away team at Princes Park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"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 away team at Princes Park?`:
```sql
|
SELECT "away_team" FROM "round_7" WHERE "home_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`Who was Hawthorn's away opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"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 Hawthorn's away opponent?`:
```sql
|
SELECT "record" FROM "march" WHERE "streak"='l1' AND "score"='l 95–111'; |
## Task
Generate a SQL query to answer the following question:
`Name the record that has a stream of l1 and score of l 95–111`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" text,
"record" text,
"streak" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the record that has a stream of l1 and score of l 95–111`:
```sql
|
SELECT "attendance" FROM "march" WHERE "visitor"='washington wizards'; |
## Task
Generate a SQL query to answer the following question:
`Name the attendance for when the washington wizards was visiting`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" text,
"record" text,
"streak" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the attendance for when the washington wizards was visiting`:
```sql
|
SELECT MIN("grid") FROM "race" WHERE "driver"='juan pablo montoya'; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest grid for driver of juan pablo montoya?`
### 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 `What is the smallest grid for driver of juan pablo montoya?`:
```sql
|
SELECT "driver" FROM "race" WHERE "time_retired"='+1 lap' AND "constructor"='bar - honda'; |
## Task
Generate a SQL query to answer the following question:
`What driver has a ime/Retired of +1 lap, and a Constructor of bar - honda?`
### 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 `What driver has a ime/Retired of +1 lap, and a Constructor of bar - honda?`:
```sql
|
SELECT "chinese_title" FROM "highest_rating_drama_series_of_2008" WHERE "premiere"=31; |
## Task
Generate a SQL query to answer the following question:
`What is the Chinese title with a premiere rating of 31?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_rating_drama_series_of_2008" (
"rank" real,
"english_title" text,
"chinese_title" text,
"average" real,
"peak" real,
"premiere" real,
"finale" real,
"hk_viewers" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Chinese title with a premiere rating of 31?`:
```sql
|
SELECT SUM("premiere") FROM "highest_rating_drama_series_of_2008" WHERE "chinese_title"='野蠻奶奶大戰戈師奶' AND "peak"<41; |
## Task
Generate a SQL query to answer the following question:
`What is the premiere rating for a Chinese title of 野蠻奶奶大戰戈師奶, and a Peak smaller than 41?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_rating_drama_series_of_2008" (
"rank" real,
"english_title" text,
"chinese_title" text,
"average" real,
"peak" real,
"premiere" real,
"finale" real,
"hk_viewers" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the premiere rating for a Chinese title of 野蠻奶奶大戰戈師奶, and a Peak smaller than 41?`:
```sql
|
SELECT MIN("premiere") FROM "highest_rating_drama_series_of_2008" WHERE "average"=35 AND "rank">1; |
## Task
Generate a SQL query to answer the following question:
`What is the premiere rating associated with an average of 35 ranked above 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_rating_drama_series_of_2008" (
"rank" real,
"english_title" text,
"chinese_title" text,
"average" real,
"peak" real,
"premiere" real,
"finale" real,
"hk_viewers" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the premiere rating associated with an average of 35 ranked above 1?`:
```sql
|
SELECT "date" FROM "round_5" WHERE "venue"='arden street oval'; |
## Task
Generate a SQL query to answer the following question:
`When was there a game at Arden Street Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_5" (
"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 was there a game at Arden Street Oval?`:
```sql
|
SELECT "crowd" FROM "round_5" WHERE "away_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`How big was the crowd when Richmond was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_5" (
"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 big was the crowd when Richmond was the away team?`:
```sql
|
SELECT "away_team" FROM "round_5" WHERE "venue"='arden street oval'; |
## Task
Generate a SQL query to answer the following question:
`Which away team plays at Arden Street Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_5" (
"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 plays at Arden Street Oval?`:
```sql
|
SELECT COUNT("crowd") FROM "round_5" WHERE "home_team"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`How many fans were at Essendon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_5" (
"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 fans were at Essendon?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.