output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "visitor" FROM "february" WHERE "home"='buffalo'; |
## Task
Generate a SQL query to answer the following question:
`Who is the visitor team of the game where Buffalo was the home team?`
### 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,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the visitor team of the game where Buffalo was the home team?`:
```sql
|
SELECT "driver" FROM "race" WHERE "grid"=18; |
## Task
Generate a SQL query to answer the following question:
`What driver has grid number 18?`
### 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 grid number 18?`:
```sql
|
SELECT "time_retired" FROM "race" WHERE "laps"<70 AND "grid">15 AND "driver"='timo glock'; |
## Task
Generate a SQL query to answer the following question:
`What is the time or retired time for timo glock with under 70 laps and a grid number greater than 15?`
### 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 time or retired time for timo glock with under 70 laps and a grid number greater than 15?`:
```sql
|
SELECT SUM("area_in_km") FROM "districts_of_bogor_city" WHERE "original_name"='kecamatan bogor timur' AND "number_of_settlements_and_villages">6; |
## Task
Generate a SQL query to answer the following question:
`Kecamatan Bogor Timur has more than 6 villages, what is the area in km²?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "districts_of_bogor_city" (
"english_name" text,
"original_name" text,
"area_in_km" real,
"population_at_2010_census" real,
"number_of_settlements_and_villages" real
);
### SQL
Given the database schema, here is the SQL query that answers `Kecamatan Bogor Timur has more than 6 villages, what is the area in km²?`:
```sql
|
SELECT SUM("area_in_km") FROM "districts_of_bogor_city" WHERE "original_name"='kecamatan bogor tengah' AND "number_of_settlements_and_villages"<11; |
## Task
Generate a SQL query to answer the following question:
`There are less than 11 settlements in Kecamatan Bogor Tengah, what is the area in km²?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "districts_of_bogor_city" (
"english_name" text,
"original_name" text,
"area_in_km" real,
"population_at_2010_census" real,
"number_of_settlements_and_villages" real
);
### SQL
Given the database schema, here is the SQL query that answers `There are less than 11 settlements in Kecamatan Bogor Tengah, what is the area in km²?`:
```sql
|
SELECT AVG("gold") FROM "medal_count" WHERE "nation"='luxembourg'; |
## Task
Generate a SQL query to answer the following question:
`Luxembourg received how many gold medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Luxembourg received how many gold medals?`:
```sql
|
SELECT SUM("tonnage") FROM "ships_operated_by_zeeland_steamship_comp" WHERE "type_of_ship"='twin screw ro-ro motorship' AND "date_entered_service"='11 february 1983'; |
## Task
Generate a SQL query to answer the following question:
`what is the sum of tonnage when the type of ship is twin screw ro-ro motorship and the date entered service is 11 february 1983?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships_operated_by_zeeland_steamship_comp" (
"ship_s_name" text,
"date_entered_service" text,
"date_withdrawn" text,
"tonnage" real,
"type_of_ship" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the sum of tonnage when the type of ship is twin screw ro-ro motorship and the date entered service is 11 february 1983?`:
```sql
|
SELECT "ship_s_name" FROM "ships_operated_by_zeeland_steamship_comp" WHERE "type_of_ship"='twin screw ro-ro motorship' AND "date_entered_service"='11 february 1983'; |
## Task
Generate a SQL query to answer the following question:
`what is the ships name that is a twin screw ro-ro motorship and entered service on 11 february 1983?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships_operated_by_zeeland_steamship_comp" (
"ship_s_name" text,
"date_entered_service" text,
"date_withdrawn" text,
"tonnage" real,
"type_of_ship" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the ships name that is a twin screw ro-ro motorship and entered service on 11 february 1983?`:
```sql
|
SELECT MIN("tonnage") FROM "ships_operated_by_zeeland_steamship_comp" WHERE "date_entered_service"='11 february 1983'; |
## Task
Generate a SQL query to answer the following question:
`what is the least tonnage for the ship(s) that entered service on 11 february 1983?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships_operated_by_zeeland_steamship_comp" (
"ship_s_name" text,
"date_entered_service" text,
"date_withdrawn" text,
"tonnage" real,
"type_of_ship" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the least tonnage for the ship(s) that entered service on 11 february 1983?`:
```sql
|
SELECT "ship_s_name" FROM "ships_operated_by_zeeland_steamship_comp" WHERE "date_withdrawn"='25 march 1986'; |
## Task
Generate a SQL query to answer the following question:
`what is the name of the ship that was withdrawn from service on 25 march 1986?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships_operated_by_zeeland_steamship_comp" (
"ship_s_name" text,
"date_entered_service" text,
"date_withdrawn" text,
"tonnage" real,
"type_of_ship" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the name of the ship that was withdrawn from service on 25 march 1986?`:
```sql
|
SELECT "tonnage" FROM "ships_operated_by_zeeland_steamship_comp" WHERE "ship_s_name"='koningin juliana'; |
## Task
Generate a SQL query to answer the following question:
`what is the tonnage of the ship koningin juliana?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships_operated_by_zeeland_steamship_comp" (
"ship_s_name" text,
"date_entered_service" text,
"date_withdrawn" text,
"tonnage" real,
"type_of_ship" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the tonnage of the ship koningin juliana?`:
```sql
|
SELECT SUM("gold") FROM "medal_count" WHERE "silver">2 AND "total"=12; |
## Task
Generate a SQL query to answer the following question:
`What's the sum of gold where silver is more than 2 and the total is 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the sum of gold where silver is more than 2 and the total is 12?`:
```sql
|
SELECT MIN("gold") FROM "medal_count" WHERE "total"=4 AND "nation"='liechtenstein' AND "silver"<2; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest gold with a total of 4 and less than 2 silver for liechtenstein?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the lowest gold with a total of 4 and less than 2 silver for liechtenstein?`:
```sql
|
SELECT COUNT("gold") FROM "medal_count" WHERE "total"<23 AND "rank">10; |
## Task
Generate a SQL query to answer the following question:
`What's the total number of gold where the total is less than 23 and the rank is over 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the total number of gold where the total is less than 23 and the rank is over 10?`:
```sql
|
SELECT COUNT("total") FROM "medal_count" WHERE "rank">9 AND "gold"<1; |
## Task
Generate a SQL query to answer the following question:
`What's the sum of total where the rank is over 9 and the gold is less than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the sum of total where the rank is over 9 and the gold is less than 1?`:
```sql
|
SELECT SUM("location_attendance") FROM "standings" WHERE "team"='timberwolves'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance number for the Timberwolves game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "standings" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"location_attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance number for the Timberwolves game?`:
```sql
|
SELECT "home_team_score" FROM "round_10" WHERE "away_team_score"='13.8 (86)'; |
## Task
Generate a SQL query to answer the following question:
`What did the team score when playing at home with a score of 13.8 (86)?`
### 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,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What did the team score when playing at home with a score of 13.8 (86)?`:
```sql
|
SELECT MIN("crowd") FROM "round_10" WHERE "home_team_score"='15.8 (98)'; |
## Task
Generate a SQL query to answer the following question:
`What was the smallest crowd at home with a score of 15.8 (98)?`
### 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,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the smallest crowd at home with a score of 15.8 (98)?`:
```sql
|
SELECT COUNT("crowd") FROM "round_10" WHERE "home_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What is the combined of Crowd when richmond played at home?`
### 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,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the combined of Crowd when richmond played at home?`:
```sql
|
SELECT "home_team_score" FROM "round_10" WHERE "away_team_score"='13.8 (86)'; |
## Task
Generate a SQL query to answer the following question:
`What did the team score when playing against an away team with a score of 13.8 (86)?`
### 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,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What did the team score when playing against an away team with a score of 13.8 (86)?`:
```sql
|
SELECT "opponent" FROM "singles_21_5" WHERE "result"='3–6, 6–2, 4–6'; |
## Task
Generate a SQL query to answer the following question:
`What opponent has a result of 3–6, 6–2, 4–6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_21_5" (
"edition" text,
"round" text,
"date" text,
"surface" text,
"opponent" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What opponent has a result of 3–6, 6–2, 4–6?`:
```sql
|
SELECT "date" FROM "singles_21_5" WHERE "edition"='1991 world group i' AND "opponent"='li fang'; |
## Task
Generate a SQL query to answer the following question:
`When was the 1991 world group I with the opponent of Li Fang?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_21_5" (
"edition" text,
"round" text,
"date" text,
"surface" text,
"opponent" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the 1991 world group I with the opponent of Li Fang?`:
```sql
|
SELECT "surface" FROM "singles_21_5" WHERE "date"='july 15, 1984'; |
## Task
Generate a SQL query to answer the following question:
`On July 15, 1984 what surface was used?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_21_5" (
"edition" text,
"round" text,
"date" text,
"surface" text,
"opponent" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `On July 15, 1984 what surface was used?`:
```sql
|
SELECT "round" FROM "singles_21_5" WHERE "opponent"='mercedes paz' AND "result"='4–6, 6–1, 6–3'; |
## Task
Generate a SQL query to answer the following question:
`For what round was the opponent mercedes paz with a result of 4–6, 6–1, 6–3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_21_5" (
"edition" text,
"round" text,
"date" text,
"surface" text,
"opponent" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `For what round was the opponent mercedes paz with a result of 4–6, 6–1, 6–3?`:
```sql
|
SELECT "surface" FROM "singles_21_5" WHERE "date"='july 17, 1983'; |
## Task
Generate a SQL query to answer the following question:
`What surface was used on July 17, 1983?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_21_5" (
"edition" text,
"round" text,
"date" text,
"surface" text,
"opponent" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What surface was used on July 17, 1983?`:
```sql
|
SELECT "result" FROM "singles_21_5" WHERE "date"='october 8, 1985'; |
## Task
Generate a SQL query to answer the following question:
`What was the result on October 8, 1985?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_21_5" (
"edition" text,
"round" text,
"date" text,
"surface" text,
"opponent" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result on October 8, 1985?`:
```sql
|
SELECT MAX("pick_num") FROM "list_of_vancouver_canucks_draft_picks" WHERE "pl_gp">55; |
## Task
Generate a SQL query to answer the following question:
`Name the highest pick number for PI GP more than 55`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_vancouver_canucks_draft_picks" (
"rd_num" real,
"pick_num" real,
"player" text,
"team_league" text,
"reg_gp" real,
"pl_gp" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the highest pick number for PI GP more than 55`:
```sql
|
SELECT MIN("rd_num") FROM "list_of_vancouver_canucks_draft_picks" WHERE "pl_gp">0 AND "pick_num">51; |
## Task
Generate a SQL query to answer the following question:
`Name the least RD number that has PI GP more than 0 and pick # more than 51`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_vancouver_canucks_draft_picks" (
"rd_num" real,
"pick_num" real,
"player" text,
"team_league" text,
"reg_gp" real,
"pl_gp" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least RD number that has PI GP more than 0 and pick # more than 51`:
```sql
|
SELECT "date" FROM "round_12" WHERE "away_team"='footscray'; |
## Task
Generate a SQL query to answer the following question:
`What day did Footscray play as the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_12" (
"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 Footscray play as the away team?`:
```sql
|
SELECT "away_team_score" FROM "round_12" WHERE "home_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What was Hawthorn's away teams opponents score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_12" (
"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 Hawthorn's away teams opponents score?`:
```sql
|
SELECT SUM("attendance") FROM "playoffs" WHERE "date"='april 17'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance of april 17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance of april 17?`:
```sql
|
SELECT "loss" FROM "game_log" WHERE "record"='21-34'; |
## Task
Generate a SQL query to answer the following question:
`What was the loss of the Mariners game when they had a record of 21-34?`
### 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 loss of the Mariners game when they had a record of 21-34?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "record"='33-45'; |
## Task
Generate a SQL query to answer the following question:
`Who did the Mariners play when they had a record of 33-45?`
### 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 `Who did the Mariners play when they had a record of 33-45?`:
```sql
|
SELECT "loss" FROM "game_log" WHERE "record"='22-35'; |
## Task
Generate a SQL query to answer the following question:
`What was the loss of the Mariners game when they had a record of 22-35?`
### 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 loss of the Mariners game when they had a record of 22-35?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "attendance"='35,614'; |
## Task
Generate a SQL query to answer the following question:
`What was the record for the game attended by 35,614 spectators?`
### 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 record for the game attended by 35,614 spectators?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "date"='april 8'; |
## Task
Generate a SQL query to answer the following question:
`What is the record for April 8?`
### 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 record for April 8?`:
```sql
|
SELECT "attendance" FROM "game_log" WHERE "record"='1-1'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance for the game that has a record of 1-1?`
### 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 for the game that has a record of 1-1?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "attendance"='35,305'; |
## Task
Generate a SQL query to answer the following question:
`What is the record for the game with an attendance of 35,305?`
### 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 record for the game with an attendance of 35,305?`:
```sql
|
SELECT MIN("grid") FROM "classification" WHERE "driver"='louis rosier' AND "laps">78; |
## Task
Generate a SQL query to answer the following question:
`what is the grid when the driver is louis rosier and the laps is more than 78?`
### 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 grid when the driver is louis rosier and the laps is more than 78?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "driver"='toulo de graffenried'; |
## Task
Generate a SQL query to answer the following question:
`what is the time/retired when the driver is toulo de graffenried?`
### 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 when the driver is toulo de graffenried?`:
```sql
|
SELECT SUM("laps") FROM "classification" WHERE "driver"='tony rolt' AND "grid"<10; |
## Task
Generate a SQL query to answer the following question:
`what is the laps when the driver is tony rolt and the grid is less than 10?`
### 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 laps when the driver is tony rolt and the grid is less than 10?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "constructor"='maserati' AND "laps"=90; |
## Task
Generate a SQL query to answer the following question:
`what is the time/retired when the constructor is maserati and the laps is 90?`
### 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 when the constructor is maserati and the laps is 90?`:
```sql
|
SELECT AVG("attendance") FROM "matches" WHERE "venue"='a' AND "date"='16 october 2004'; |
## Task
Generate a SQL query to answer the following question:
`What is the average Attendance at Venue A on 16 October 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "matches" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Attendance at Venue A on 16 October 2004?`:
```sql
|
SELECT MIN("attendance") FROM "matches" WHERE "opponent"='middlesbrough' AND "venue"='a'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Attendance when Middlesbrough played at Venue A?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "matches" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Attendance when Middlesbrough played at Venue A?`:
```sql
|
SELECT "home_team_score" FROM "round_13" WHERE "away_team_score"='14.21 (105)'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home team when the away team scored 14.21 (105)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"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 team when the away team scored 14.21 (105)?`:
```sql
|
SELECT "sponsor_s" FROM "legislative_history" WHERE "num_of_cosponsors"<200 AND "date_introduced"='february 28, 2005'; |
## Task
Generate a SQL query to answer the following question:
`Who was the sponsor for the bill introduced February 28, 2005 with cosponsors less than 200?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "legislative_history" (
"congress" text,
"short_title" text,
"bill_number_s" text,
"date_introduced" text,
"sponsor_s" text,
"num_of_cosponsors" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the sponsor for the bill introduced February 28, 2005 with cosponsors less than 200?`:
```sql
|
SELECT MAX("year") FROM "awards_and_nominations" WHERE "nominated_work"='herself' AND "event"='mtv movie awards'; |
## Task
Generate a SQL query to answer the following question:
`What year was Herself nominated at the MTV Movie Awards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_and_nominations" (
"year" real,
"nominated_work" text,
"event" text,
"award" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was Herself nominated at the MTV Movie Awards?`:
```sql
|
SELECT AVG("crowd") FROM "round_16" WHERE "home_team"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`What is the average amount of spectators when Essendon played as the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"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 average amount of spectators when Essendon played as the home team?`:
```sql
|
SELECT "away_team_score" FROM "round_16" WHERE "venue"='mcg'; |
## Task
Generate a SQL query to answer the following question:
`What did the away team score at MCG?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"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 at MCG?`:
```sql
|
SELECT "home_team_score" FROM "round_16" WHERE "away_team"='collingwood'; |
## Task
Generate a SQL query to answer the following question:
`What did the home team score when playing against Collingwood?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"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 when playing against Collingwood?`:
```sql
|
SELECT "venue" FROM "round_16" WHERE "away_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`Where was the game when Geelong was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"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 was the game when Geelong was the away team?`:
```sql
|
SELECT "away_team" FROM "round_16" WHERE "venue"='arden street oval'; |
## Task
Generate a SQL query to answer the following question:
`What team was the away team at Arden Street Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"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 was the away team at Arden Street Oval?`:
```sql
|
SELECT COUNT("diameter_km") FROM "x" WHERE "latitude"<14 AND "name"='xenia' AND "longitude">249.4; |
## Task
Generate a SQL query to answer the following question:
`What in Xenia's Diameter in km, with a latitude of 14 and a longitude of 249.4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "x" (
"name" text,
"latitude" real,
"longitude" real,
"diameter_km" real,
"named_after" text
);
### SQL
Given the database schema, here is the SQL query that answers `What in Xenia's Diameter in km, with a latitude of 14 and a longitude of 249.4?`:
```sql
|
SELECT AVG("latitude") FROM "x" WHERE "diameter_km"<12.8 AND "longitude"<208; |
## Task
Generate a SQL query to answer the following question:
`What is the latitude for a crater with a diameter of 12.8 km and a longitude of 208?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "x" (
"name" text,
"latitude" real,
"longitude" real,
"diameter_km" real,
"named_after" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the latitude for a crater with a diameter of 12.8 km and a longitude of 208?`:
```sql
|
SELECT "runner_s_up" FROM "european_tour_wins_9" WHERE "winning_score"='67-66-65-69=267'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Runner(s)-up in the race with a winning score of 67-66-65-69=267?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_9" (
"date" text,
"tournament" text,
"winning_score" text,
"to_par" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Runner(s)-up in the race with a winning score of 67-66-65-69=267?`:
```sql
|
SELECT "date" FROM "european_tour_wins_9" WHERE "tournament"='masters tournament'; |
## Task
Generate a SQL query to answer the following question:
`When was the Masters Tournament?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_9" (
"date" text,
"tournament" text,
"winning_score" text,
"to_par" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the Masters Tournament?`:
```sql
|
SELECT "margin_of_victory" FROM "european_tour_wins_9" WHERE "runner_s_up"='justin rose'; |
## Task
Generate a SQL query to answer the following question:
`What is the margin of victory in the race where Justin Rose was the runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_9" (
"date" text,
"tournament" text,
"winning_score" text,
"to_par" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the margin of victory in the race where Justin Rose was the runner-up?`:
```sql
|
SELECT "tournament" FROM "european_tour_wins_9" WHERE "date"='7 aug 2011'; |
## Task
Generate a SQL query to answer the following question:
`What tournament took place on 7 Aug 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_9" (
"date" text,
"tournament" text,
"winning_score" text,
"to_par" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What tournament took place on 7 Aug 2011?`:
```sql
|
SELECT "day_2" FROM "qualifying_times" WHERE "day_1"='4:05.096'; |
## Task
Generate a SQL query to answer the following question:
`For the team that had 4:05.096, what was their day 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_times" (
"team" text,
"class" text,
"day_1" text,
"day_2" text,
"behind" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the team that had 4:05.096, what was their day 2?`:
```sql
|
SELECT "team" FROM "qualifying_times" WHERE "day_1"='3:18.513'; |
## Task
Generate a SQL query to answer the following question:
`Which team had 3:18.513 on day 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_times" (
"team" text,
"class" text,
"day_1" text,
"day_2" text,
"behind" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team had 3:18.513 on day 1?`:
```sql
|
SELECT "behind" FROM "qualifying_times" WHERE "class"='gt2' AND "day_2"='3:59.820'; |
## Task
Generate a SQL query to answer the following question:
`For the team with a class of gt2 and 3:59.820 on day 2, what was the behind?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_times" (
"team" text,
"class" text,
"day_1" text,
"day_2" text,
"behind" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the team with a class of gt2 and 3:59.820 on day 2, what was the behind?`:
```sql
|
SELECT "team" FROM "qualifying_times" WHERE "day_2"='3:47.761'; |
## Task
Generate a SQL query to answer the following question:
`Which team was 3:47.761 on day 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_times" (
"team" text,
"class" text,
"day_1" text,
"day_2" text,
"behind" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team was 3:47.761 on day 2?`:
```sql
|
SELECT "class" FROM "qualifying_times" WHERE "behind"='+44.780'; |
## Task
Generate a SQL query to answer the following question:
`What is the class of the team that has a behind of +44.780?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_times" (
"team" text,
"class" text,
"day_1" text,
"day_2" text,
"behind" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the class of the team that has a behind of +44.780?`:
```sql
|
SELECT "behind" FROM "qualifying_times" WHERE "day_2"='3:42.162'; |
## Task
Generate a SQL query to answer the following question:
`For the team with 3:42.162 on day 2, what was the behind?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_times" (
"team" text,
"class" text,
"day_1" text,
"day_2" text,
"behind" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the team with 3:42.162 on day 2, what was the behind?`:
```sql
|
SELECT "tournament" FROM "juniors" WHERE "1996"='qf'; |
## Task
Generate a SQL query to answer the following question:
`Which one of the tournaments had a QF in 1996?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "juniors" (
"tournament" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which one of the tournaments had a QF in 1996?`:
```sql
|
SELECT "1996" FROM "juniors" WHERE "tournament"='wimbledon'; |
## Task
Generate a SQL query to answer the following question:
`What is the value for the Wimbledon tournament in 1996?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "juniors" (
"tournament" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the value for the Wimbledon tournament in 1996?`:
```sql
|
SELECT SUM("year") FROM "see_also" WHERE "position"='center' AND "player"='ann wauters'; |
## Task
Generate a SQL query to answer the following question:
`What year is center Ann Wauters?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"year" real,
"player" text,
"position" text,
"college_country" text,
"wnba_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year is center Ann Wauters?`:
```sql
|
SELECT MIN("year") FROM "see_also" WHERE "position"='guard' AND "wnba_team"='seattle storm'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year that includes a Seattle Storm guard?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"year" real,
"player" text,
"position" text,
"college_country" text,
"wnba_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year that includes a Seattle Storm guard?`:
```sql
|
SELECT "position" FROM "see_also" WHERE "year"<2000 AND "college_country"='usc'; |
## Task
Generate a SQL query to answer the following question:
`Regarding players before 2000, what is the USC player's position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"year" real,
"player" text,
"position" text,
"college_country" text,
"wnba_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Regarding players before 2000, what is the USC player's position?`:
```sql
|
SELECT MIN("year") FROM "see_also" WHERE "college_country"='baylor'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year a Baylor player made the list?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"year" real,
"player" text,
"position" text,
"college_country" text,
"wnba_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year a Baylor player made the list?`:
```sql
|
SELECT "position" FROM "see_also" WHERE "player"='sue bird'; |
## Task
Generate a SQL query to answer the following question:
`What is Sue Bird's position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"year" real,
"player" text,
"position" text,
"college_country" text,
"wnba_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Sue Bird's position?`:
```sql
|
SELECT "builder" FROM "1899_1913" WHERE "class"='terrier'; |
## Task
Generate a SQL query to answer the following question:
`Which Builder has a Class of Terrier?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1899_1913" (
"class" text,
"wheels" text,
"date" text,
"builder" text,
"no_built" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Builder has a Class of Terrier?`:
```sql
|
SELECT "constructor" FROM "classification" WHERE "laps"<68 AND "grid">20 AND "driver"='thierry boutsen'; |
## Task
Generate a SQL query to answer the following question:
`who is the constructor when the laps is less than 68, the grid is more than 20 and the driver is thierry boutsen?`
### 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 is the constructor when the laps is less than 68, the grid is more than 20 and the driver is thierry boutsen?`:
```sql
|
SELECT "laps" FROM "classification" WHERE "time_retired"='turbo' AND "grid"<14; |
## Task
Generate a SQL query to answer the following question:
`what is the laps when the time/retired is turbo and the grid is less than 14?`
### 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 laps when the time/retired is turbo and the grid is less than 14?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "laps"<4; |
## Task
Generate a SQL query to answer the following question:
`what is the time/retired when the laps is less than 4?`
### 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 when the laps is less than 4?`:
```sql
|
SELECT MAX("goals") FROM "statistics" WHERE "club"='total' AND "apps"<120; |
## Task
Generate a SQL query to answer the following question:
`Name the most goals for total club and apps less than 120`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics" (
"season" text,
"club" text,
"competition" text,
"apps" real,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most goals for total club and apps less than 120`:
```sql
|
SELECT MAX("goals") FROM "afl_draftees" WHERE "games"=75; |
## Task
Generate a SQL query to answer the following question:
`How many goals are associated with 75 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "afl_draftees" (
"draft" text,
"pick" real,
"player" text,
"club" text,
"games" real,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many goals are associated with 75 games?`:
```sql
|
SELECT "position" FROM "g" WHERE "years_for_rockets"='2004-05'; |
## Task
Generate a SQL query to answer the following question:
`What is the position for the Rockets years of 2004-05?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "g" (
"player" text,
"no_s" real,
"height_in_ft" text,
"position" text,
"years_for_rockets" text,
"school_club_team_country" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the position for the Rockets years of 2004-05?`:
```sql
|
SELECT AVG("no_s") FROM "g" WHERE "years_for_rockets"='2004-05'; |
## Task
Generate a SQL query to answer the following question:
`What is the average number of years for the Houston Rockets 2004-05?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "g" (
"player" text,
"no_s" real,
"height_in_ft" text,
"position" text,
"years_for_rockets" text,
"school_club_team_country" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of years for the Houston Rockets 2004-05?`:
```sql
|
SELECT "position" FROM "g" WHERE "years_for_rockets"='1992-93'; |
## Task
Generate a SQL query to answer the following question:
`For the years 1992-93, what position did he play for the Houston Rockets?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "g" (
"player" text,
"no_s" real,
"height_in_ft" text,
"position" text,
"years_for_rockets" text,
"school_club_team_country" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the years 1992-93, what position did he play for the Houston Rockets?`:
```sql
|
SELECT SUM("no_s") FROM "g" WHERE "position"='forward' AND "school_club_team_country"='oregon state'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of years did he play the forward position and what school/club/team/country of Oregon State did he play?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "g" (
"player" text,
"no_s" real,
"height_in_ft" text,
"position" text,
"years_for_rockets" text,
"school_club_team_country" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of years did he play the forward position and what school/club/team/country of Oregon State did he play?`:
```sql
|
SELECT AVG("wins") FROM "leaders" WHERE "player"='bruce fleisher' AND "events">31; |
## Task
Generate a SQL query to answer the following question:
`How many wins for bruce fleisher with over 31 events?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"events" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins for bruce fleisher with over 31 events?`:
```sql
|
SELECT AVG("rank") FROM "leaders" WHERE "events"<26 AND "wins"<2; |
## Task
Generate a SQL query to answer the following question:
`What is the average rank for players with under 26 events and less than 2 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"events" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average rank for players with under 26 events and less than 2 wins?`:
```sql
|
SELECT MAX("earnings") FROM "leaders" WHERE "events"=34 AND "wins">2; |
## Task
Generate a SQL query to answer the following question:
`What is the high earnings for players with 34 events and over 2 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"events" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the high earnings for players with 34 events and over 2 wins?`:
```sql
|
SELECT SUM("rank") FROM "leaders" WHERE "player"='bruce fleisher' AND "earnings">'2,411,543'; |
## Task
Generate a SQL query to answer the following question:
`What is the ranking for bruce fleisher with over $2,411,543?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"events" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the ranking for bruce fleisher with over $2,411,543?`:
```sql
|
SELECT "tournament" FROM "doubles_performance_timeline" WHERE "2009"='2r' AND "2010"='sf'; |
## Task
Generate a SQL query to answer the following question:
`Which tournament had a 2R categorization in 2009 and SF in 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_performance_timeline" (
"tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which tournament had a 2R categorization in 2009 and SF in 2010?`:
```sql
|
SELECT "2009" FROM "doubles_performance_timeline" WHERE "2008"='2r' AND "2011"='2r'; |
## Task
Generate a SQL query to answer the following question:
`What is the categorization in 2009 when it was 2R in 2008 and 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_performance_timeline" (
"tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the categorization in 2009 when it was 2R in 2008 and 2011?`:
```sql
|
SELECT "2012" FROM "doubles_performance_timeline" WHERE "2008"='a' AND "2011"='1r'; |
## Task
Generate a SQL query to answer the following question:
`What is the categorization in 2012 when it was A in 2008 and 1R in 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_performance_timeline" (
"tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the categorization in 2012 when it was A in 2008 and 1R in 2011?`:
```sql
|
SELECT "2010" FROM "doubles_performance_timeline" WHERE "2008"='a' AND "2011"='a' AND "2012"='qf'; |
## Task
Generate a SQL query to answer the following question:
`What is the categorization in 2010 when it was A in 2008 and 20011 while being QF in 2012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_performance_timeline" (
"tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the categorization in 2010 when it was A in 2008 and 20011 while being QF in 2012?`:
```sql
|
SELECT "city" FROM "2007_08_teams" WHERE "2006_2007_season"='16th in serie a' AND "club"='cagliari'; |
## Task
Generate a SQL query to answer the following question:
`What city in the 06/07 season had cagliari and finished 16th in serie a?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007_08_teams" (
"club" text,
"city" text,
"stadium" text,
"capacity" real,
"2006_2007_season" text
);
### SQL
Given the database schema, here is the SQL query that answers `What city in the 06/07 season had cagliari and finished 16th in serie a?`:
```sql
|
SELECT "away_team_score" FROM "round_3" WHERE "home_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What was the score against home team, Richmond?`
### 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 `What was the score against home team, Richmond?`:
```sql
|
SELECT MIN("crowd") FROM "round_3" WHERE "home_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`What is Fitzroy's smallest crowd size?`
### 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 `What is Fitzroy's smallest crowd size?`:
```sql
|
SELECT COUNT("crowd") FROM "round_3" WHERE "away_team_score"='16.7 (103)'; |
## Task
Generate a SQL query to answer the following question:
`How many people attended the game where the away team scored 16.7 (103) points?`
### 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 `How many people attended the game where the away team scored 16.7 (103) points?`:
```sql
|
SELECT "date" FROM "singles_18_5_13" WHERE "opponent"='naomi cavaday'; |
## Task
Generate a SQL query to answer the following question:
`When was naomi cavaday the opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_18_5_13" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was naomi cavaday the opponent?`:
```sql
|
SELECT "date" FROM "singles_18_5_13" WHERE "opponent"='andrea gámiz'; |
## Task
Generate a SQL query to answer the following question:
`When was andrea gámiz the opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_18_5_13" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was andrea gámiz the opponent?`:
```sql
|
SELECT "opponent" FROM "singles_18_5_13" WHERE "score"='6–4, 6–2' AND "surface"='clay'; |
## Task
Generate a SQL query to answer the following question:
`Who is the opponent when the score was 6–4, 6–2 and the surface was clay?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_18_5_13" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the opponent when the score was 6–4, 6–2 and the surface was clay?`:
```sql
|
SELECT "venue" FROM "round_22" WHERE "home_team_score"='18.16 (124)'; |
## Task
Generate a SQL query to answer the following question:
`Where was game that had a home team score 18.16 (124)?`
### 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 `Where was game that had a home team score 18.16 (124)?`:
```sql
|
SELECT "away_team_score" FROM "round_22" WHERE "home_team_score"='16.14 (110)'; |
## Task
Generate a SQL query to answer the following question:
`How many points did the away team score when the home team scored 16.14 (110)?`
### 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 `How many points did the away team score when the home team scored 16.14 (110)?`:
```sql
|
SELECT MIN("crowd") FROM "round_22" WHERE "home_team"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`What was the smallest crowd at a home game for essendon?`
### 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 `What was the smallest crowd at a home game for essendon?`:
```sql
|
SELECT "time_retired" FROM "race" WHERE "driver"='riccardo patrese'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the time/retired for riccardo patrese`
### 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 `Tell me the time/retired for riccardo patrese`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.