output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "incumbent" FROM "connecticut" WHERE "first_elected"=1987; |
## Task
Generate a SQL query to answer the following question:
`Which incumbent was first elected in 1987?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "connecticut" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which incumbent was first elected in 1987?`:
```sql
|
SELECT "country" FROM "final_leaderboard" WHERE "money"<216; |
## Task
Generate a SQL query to answer the following question:
`From which country is the player who made less than $216?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `From which country is the player who made less than $216?`:
```sql
|
SELECT "place" FROM "final_leaderboard" WHERE "country"='united states' AND "money">216 AND "score"='74-70-71-69=284'; |
## Task
Generate a SQL query to answer the following question:
`Where did the player place who is from the United States, who made more than $216, and whose score was 74-70-71-69=284?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `Where did the player place who is from the United States, who made more than $216, and whose score was 74-70-71-69=284?`:
```sql
|
SELECT "player" FROM "final_leaderboard" WHERE "place"='t5' AND "score"='72-71-73-78=294'; |
## Task
Generate a SQL query to answer the following question:
`Which player placed in t5 and had a score of 72-71-73-78=294?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which player placed in t5 and had a score of 72-71-73-78=294?`:
```sql
|
SELECT SUM("year_of_recording") FROM "recordings" WHERE "conductor"='libor pesek'; |
## Task
Generate a SQL query to answer the following question:
`What is the year that a record was recorded with Libor Pesek as conductor?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "recordings" (
"pianist" text,
"conductor" text,
"record_company" text,
"year_of_recording" real,
"format" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the year that a record was recorded with Libor Pesek as conductor?`:
```sql
|
SELECT "record_company" FROM "recordings" WHERE "pianist"='solomon cutner'; |
## Task
Generate a SQL query to answer the following question:
`What record company did pianist Solomon Cutner record for?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "recordings" (
"pianist" text,
"conductor" text,
"record_company" text,
"year_of_recording" real,
"format" text
);
### SQL
Given the database schema, here is the SQL query that answers `What record company did pianist Solomon Cutner record for?`:
```sql
|
SELECT "record_company" FROM "recordings" WHERE "year_of_recording">1996 AND "conductor"='mikhail snitko'; |
## Task
Generate a SQL query to answer the following question:
`What record company did conductor Mikhail Snitko record for after 1996?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "recordings" (
"pianist" text,
"conductor" text,
"record_company" text,
"year_of_recording" real,
"format" text
);
### SQL
Given the database schema, here is the SQL query that answers `What record company did conductor Mikhail Snitko record for after 1996?`:
```sql
|
SELECT "event" FROM "qualification" WHERE "total"='28'; |
## Task
Generate a SQL query to answer the following question:
`Which event had a total of 28?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualification" (
"shooter" text,
"event" text,
"rank_points" text,
"score_points" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which event had a total of 28?`:
```sql
|
SELECT "shooter" FROM "qualification" WHERE "rank_points"='8' AND "event"='wc kerrville'; |
## Task
Generate a SQL query to answer the following question:
`Who was the shooter when the rank points was 8 and the event was WC Kerrville?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualification" (
"shooter" text,
"event" text,
"rank_points" text,
"score_points" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the shooter when the rank points was 8 and the event was WC Kerrville?`:
```sql
|
SELECT "total" FROM "qualification" WHERE "score_points"='12' AND "rank_points"='15'; |
## Task
Generate a SQL query to answer the following question:
`What was the total when the score points was 12 and the rank points was 15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualification" (
"shooter" text,
"event" text,
"rank_points" text,
"score_points" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the total when the score points was 12 and the rank points was 15?`:
```sql
|
SELECT "score" FROM "european_cup_goals" WHERE "competition"='champions league' AND "result"='win'; |
## Task
Generate a SQL query to answer the following question:
`What is the score at the Champions League, when the result shows win?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_cup_goals" (
"date" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score at the Champions League, when the result shows win?`:
```sql
|
SELECT "competition" FROM "european_cup_goals" WHERE "opponent"='randers'; |
## Task
Generate a SQL query to answer the following question:
`What was the competition when the opponent was the Randers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_cup_goals" (
"date" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the competition when the opponent was the Randers?`:
```sql
|
SELECT "result" FROM "european_cup_goals" WHERE "competition"='uefa cup' AND "opponent"='palermo'; |
## Task
Generate a SQL query to answer the following question:
`What is the result of the UEFA Cup, against Palermo?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_cup_goals" (
"date" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result of the UEFA Cup, against Palermo?`:
```sql
|
SELECT "date" FROM "european_cup_goals" WHERE "competition"='uefa cup' AND "opponent"='panathinaikos'; |
## Task
Generate a SQL query to answer the following question:
`What date was the UEFA Cup against Panathinaikos?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_cup_goals" (
"date" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the UEFA Cup against Panathinaikos?`:
```sql
|
SELECT "total_deaths" FROM "attacks_against_israeli_diplomatic_missi" WHERE "israeli_and_or_foreigner_wounded"='0' AND "other_deaths"='0' AND "total_casualties"='1'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of deaths of the attack with 0 Israelis or foreigners wounded, 0 other deaths, and a total casualty of 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "attacks_against_israeli_diplomatic_missi" (
"israeli_deaths" real,
"other_deaths" text,
"total_deaths" text,
"israeli_and_or_foreigner_wounded" text,
"total_casualties" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of deaths of the attack with 0 Israelis or foreigners wounded, 0 other deaths, and a total casualty of 1?`:
```sql
|
SELECT "israeli_and_or_foreigner_wounded" FROM "attacks_against_israeli_diplomatic_missi" WHERE "israeli_deaths">1; |
## Task
Generate a SQL query to answer the following question:
`How many Israelis and or foreigners were wounded in the attack with more than 1 Israeli death?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "attacks_against_israeli_diplomatic_missi" (
"israeli_deaths" real,
"other_deaths" text,
"total_deaths" text,
"israeli_and_or_foreigner_wounded" text,
"total_casualties" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Israelis and or foreigners were wounded in the attack with more than 1 Israeli death?`:
```sql
|
SELECT "other_deaths" FROM "attacks_against_israeli_diplomatic_missi" WHERE "israeli_and_or_foreigner_wounded"='242'; |
## Task
Generate a SQL query to answer the following question:
`How many other deaths were in the attack with 242 Israelis and/or foreigners wounded?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "attacks_against_israeli_diplomatic_missi" (
"israeli_deaths" real,
"other_deaths" text,
"total_deaths" text,
"israeli_and_or_foreigner_wounded" text,
"total_casualties" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many other deaths were in the attack with 242 Israelis and/or foreigners wounded?`:
```sql
|
SELECT COUNT("israeli_deaths") FROM "attacks_against_israeli_diplomatic_missi" WHERE "total_casualties"='0' AND "total_deaths"='0'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Israeli deaths in the attack with 0 total casulaties and 0 total deaths?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "attacks_against_israeli_diplomatic_missi" (
"israeli_deaths" real,
"other_deaths" text,
"total_deaths" text,
"israeli_and_or_foreigner_wounded" text,
"total_casualties" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Israeli deaths in the attack with 0 total casulaties and 0 total deaths?`:
```sql
|
SELECT "place" FROM "final_round" WHERE "score"='69-68-69-70=276'; |
## Task
Generate a SQL query to answer the following question:
`What place did the golfer who had a score of 69-68-69-70=276 finish in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `What place did the golfer who had a score of 69-68-69-70=276 finish in?`:
```sql
|
SELECT "to_par" FROM "final_round" WHERE "player"='mike weir'; |
## Task
Generate a SQL query to answer the following question:
`What was the to par score for Mike Weir?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the to par score for Mike Weir?`:
```sql
|
SELECT "country" FROM "final_round" WHERE "player"='jay haas'; |
## Task
Generate a SQL query to answer the following question:
`What country was Jay Haas representing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `What country was Jay Haas representing?`:
```sql
|
SELECT "country" FROM "second_round" WHERE "place"='t7' AND "player"='peter oosterhuis'; |
## Task
Generate a SQL query to answer the following question:
`What country has the t7 place, and player Peter Oosterhuis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country has the t7 place, and player Peter Oosterhuis?`:
```sql
|
SELECT "score" FROM "second_round" WHERE "player"='sandy lyle'; |
## Task
Generate a SQL query to answer the following question:
`What is the score for Sandy Lyle?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score for Sandy Lyle?`:
```sql
|
SELECT "name" FROM "appearances_and_goals" WHERE "league_cup_goals">0 AND "total_goals"<13 AND "league_cup_apps"='4'; |
## Task
Generate a SQL query to answer the following question:
`Who is the player that has scored more than 0 league cup goals, but has than 13 total goals, and 4 league cup appearances total?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the player that has scored more than 0 league cup goals, but has than 13 total goals, and 4 league cup appearances total?`:
```sql
|
SELECT MIN("league_goals") FROM "appearances_and_goals" WHERE "fa_cup_goals"=0 AND "fa_cup_apps"='0' AND "position"='df' AND "total_apps"='3'; |
## Task
Generate a SQL query to answer the following question:
`Who has the lowest league total goals with 0 FA cup goals and no FA cup appearances, plays the DF position and has appeared in total of 3 times?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who has the lowest league total goals with 0 FA cup goals and no FA cup appearances, plays the DF position and has appeared in total of 3 times?`:
```sql
|
SELECT MIN("num_of_episodes") FROM "dvd_releases" WHERE "date_released"='15 december 2011'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest # Of Episodes, when Date Released is "15 December 2011"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dvd_releases" (
"season" text,
"date_released" text,
"num_of_episodes" real,
"num_of_discs" real,
"special_features" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest # Of Episodes, when Date Released is "15 December 2011"?`:
```sql
|
SELECT "date_released" FROM "dvd_releases" WHERE "num_of_discs">4; |
## Task
Generate a SQL query to answer the following question:
`What Date Released, when # Of Discs is greater than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dvd_releases" (
"season" text,
"date_released" text,
"num_of_episodes" real,
"num_of_discs" real,
"special_features" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Date Released, when # Of Discs is greater than 4?`:
```sql
|
SELECT "season" FROM "dvd_releases" WHERE "num_of_episodes"=10 AND "date_released"='1 april 2010'; |
## Task
Generate a SQL query to answer the following question:
`What is Season, when # Of Episodes is "10", and when Date Released is "1 April 2010"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dvd_releases" (
"season" text,
"date_released" text,
"num_of_episodes" real,
"num_of_discs" real,
"special_features" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Season, when # Of Episodes is "10", and when Date Released is "1 April 2010"?`:
```sql
|
SELECT "score" FROM "first_round_proper" WHERE "home_team"='sheffield united'; |
## Task
Generate a SQL query to answer the following question:
`What was the score when Sheffield United was the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score when Sheffield United was the home team?`:
```sql
|
SELECT "away_team" FROM "first_round_proper" WHERE "home_team"='newton heath'; |
## Task
Generate a SQL query to answer the following question:
`Who was the away team against Newton Heath?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the away team against Newton Heath?`:
```sql
|
SELECT "home_team" FROM "first_round_proper" WHERE "tie_no"='11'; |
## Task
Generate a SQL query to answer the following question:
`What is the home team when the tie is 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home team when the tie is 11?`:
```sql
|
SELECT SUM("league_goals") FROM "appearances_goals" WHERE "position"='df' AND "league_cup_apps"='0' AND "total_apps"='7' AND "flt_goals"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of League Goals, when Position is "DF", when League Cup Apps is "0", when Total Apps is "7", and when FLT Goals is less than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_goals" (
"squad_no" real,
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"flt_apps" text,
"flt_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of League Goals, when Position is "DF", when League Cup Apps is "0", when Total Apps is "7", and when FLT Goals is less than 0?`:
```sql
|
SELECT COUNT("fa_cup_goals") FROM "appearances_goals" WHERE "flt_goals">0; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of FA Cup Goals, when FLT Goals is greater than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_goals" (
"squad_no" real,
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"flt_apps" text,
"flt_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of FA Cup Goals, when FLT Goals is greater than 0?`:
```sql
|
SELECT MIN("fa_cup_goals") FROM "appearances_goals" WHERE "total_goals">0 AND "league_goals"=4 AND "fa_cup_apps"='1' AND "league_cup_goals">0; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest FA Cup Goals, when Total Goals is greater than 0, when League Goals is "4", when FA Cup Apps is "1", and when League Cup Goals is greater than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_goals" (
"squad_no" real,
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"flt_apps" text,
"flt_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest FA Cup Goals, when Total Goals is greater than 0, when League Goals is "4", when FA Cup Apps is "1", and when League Cup Goals is greater than 0?`:
```sql
|
SELECT "1_30_pm" FROM "fall_1997" WHERE "12_30_pm"='local programs' AND "4_00_pm"='pinky and the brain'; |
## Task
Generate a SQL query to answer the following question:
`What is on at 1:30PM with 12:30 local programs, and Pinky and the Brain shows at 4:00pm?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fall_1997" (
"7_00_am" text,
"7_30_am" text,
"8_00_am" text,
"9_00_am" text,
"11_00_am" text,
"noon" text,
"12_30_pm" text,
"1_00_pm" text,
"1_30_pm" text,
"2_00_pm" text,
"3_00_pm" text,
"3_30_pm" text,
"4_00_pm" text,
"5_00_pm" text,
"6_30_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is on at 1:30PM with 12:30 local programs, and Pinky and the Brain shows at 4:00pm?`:
```sql
|
SELECT "4_00_pm" FROM "fall_1997" WHERE "1_00_pm"='all my children'; |
## Task
Generate a SQL query to answer the following question:
`What is on at 4L00pm, with 1:00pm is All My Children?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fall_1997" (
"7_00_am" text,
"7_30_am" text,
"8_00_am" text,
"9_00_am" text,
"11_00_am" text,
"noon" text,
"12_30_pm" text,
"1_00_pm" text,
"1_30_pm" text,
"2_00_pm" text,
"3_00_pm" text,
"3_30_pm" text,
"4_00_pm" text,
"5_00_pm" text,
"6_30_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is on at 4L00pm, with 1:00pm is All My Children?`:
```sql
|
SELECT "11_00_am" FROM "fall_1997" WHERE "4_00_pm"='power rangers: turbo'; |
## Task
Generate a SQL query to answer the following question:
`What is on at 11:00AM that shows Power Rangers: Turbo at 4:00pm?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fall_1997" (
"7_00_am" text,
"7_30_am" text,
"8_00_am" text,
"9_00_am" text,
"11_00_am" text,
"noon" text,
"12_30_pm" text,
"1_00_pm" text,
"1_30_pm" text,
"2_00_pm" text,
"3_00_pm" text,
"3_30_pm" text,
"4_00_pm" text,
"5_00_pm" text,
"6_30_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is on at 11:00AM that shows Power Rangers: Turbo at 4:00pm?`:
```sql
|
SELECT "7_00_am" FROM "fall_1997" WHERE "1_00_pm"='local programs'; |
## Task
Generate a SQL query to answer the following question:
`What is on at 7:00am, when the 1:00 is just local programs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fall_1997" (
"7_00_am" text,
"7_30_am" text,
"8_00_am" text,
"9_00_am" text,
"11_00_am" text,
"noon" text,
"12_30_pm" text,
"1_00_pm" text,
"1_30_pm" text,
"2_00_pm" text,
"3_00_pm" text,
"3_30_pm" text,
"4_00_pm" text,
"5_00_pm" text,
"6_30_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is on at 7:00am, when the 1:00 is just local programs?`:
```sql
|
SELECT "8_00_am" FROM "fall_1997" WHERE "2_00_pm"='another world'; |
## Task
Generate a SQL query to answer the following question:
`What is on at 8:00am, that has Another World playing at 2:00pm?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fall_1997" (
"7_00_am" text,
"7_30_am" text,
"8_00_am" text,
"9_00_am" text,
"11_00_am" text,
"noon" text,
"12_30_pm" text,
"1_00_pm" text,
"1_30_pm" text,
"2_00_pm" text,
"3_00_pm" text,
"3_30_pm" text,
"4_00_pm" text,
"5_00_pm" text,
"6_30_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is on at 8:00am, that has Another World playing at 2:00pm?`:
```sql
|
SELECT AVG("points") FROM "race" WHERE "team"='newman/haas racing' AND "laps"<40; |
## Task
Generate a SQL query to answer the following question:
`How many points for Newman/Haas Racing with fewer than 40 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many points for Newman/Haas Racing with fewer than 40 laps?`:
```sql
|
SELECT "driver" FROM "race" WHERE "points"<2 AND "grid">4 AND "team"='american spirit team johansson'; |
## Task
Generate a SQL query to answer the following question:
`Which driver has fewer than 2 points, larger grid that 4 and is on American Spirit Team Johansson?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which driver has fewer than 2 points, larger grid that 4 and is on American Spirit Team Johansson?`:
```sql
|
SELECT "week_11_nov_16" FROM "bcs_standings" WHERE "week_13_nov_30"='wisconsin (10-1)'; |
## Task
Generate a SQL query to answer the following question:
`What is the week 11 nov 16 standing with wisconsin (10-1) on week 13 Nov 30?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bcs_standings" (
"week_8_oct_26" text,
"week_10_nov_9" text,
"week_11_nov_16" text,
"week_12_nov_23" text,
"week_13_nov_30" text,
"week_14_final_dec_7" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the week 11 nov 16 standing with wisconsin (10-1) on week 13 Nov 30?`:
```sql
|
SELECT "week_13_nov_30" FROM "bcs_standings" WHERE "week_11_nov_16"='usc (7-3)'; |
## Task
Generate a SQL query to answer the following question:
`What is the week 13 Nov 30 standing with USC (7-3) on week 11 Nov 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bcs_standings" (
"week_8_oct_26" text,
"week_10_nov_9" text,
"week_11_nov_16" text,
"week_12_nov_23" text,
"week_13_nov_30" text,
"week_14_final_dec_7" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the week 13 Nov 30 standing with USC (7-3) on week 11 Nov 16?`:
```sql
|
SELECT "week_8_oct_26" FROM "bcs_standings" WHERE "week_12_nov_23"='georgia tech (8-2)'; |
## Task
Generate a SQL query to answer the following question:
`What is the week 8 Oct 26 standing with georgia tech (8-2) on week 12 Nov 23?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bcs_standings" (
"week_8_oct_26" text,
"week_10_nov_9" text,
"week_11_nov_16" text,
"week_12_nov_23" text,
"week_13_nov_30" text,
"week_14_final_dec_7" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the week 8 Oct 26 standing with georgia tech (8-2) on week 12 Nov 23?`:
```sql
|
SELECT "week_14_final_dec_7" FROM "bcs_standings" WHERE "week_8_oct_26"='florida (6-1)'; |
## Task
Generate a SQL query to answer the following question:
`What is the week 14 (final) dec 7 standing with Florida (6-1) on week 8 Oct 26?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bcs_standings" (
"week_8_oct_26" text,
"week_10_nov_9" text,
"week_11_nov_16" text,
"week_12_nov_23" text,
"week_13_nov_30" text,
"week_14_final_dec_7" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the week 14 (final) dec 7 standing with Florida (6-1) on week 8 Oct 26?`:
```sql
|
SELECT "name" FROM "out" WHERE "source"='soenderjyske.dk'; |
## Task
Generate a SQL query to answer the following question:
`What player is associated with soenderjyske.dk?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "out" (
"nat" text,
"name" text,
"moving_to" text,
"type" text,
"transfer_window" text,
"transfer_fee" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What player is associated with soenderjyske.dk?`:
```sql
|
SELECT "transfer_fee" FROM "out" WHERE "type"='transfer' AND "name"='gravgaard'; |
## Task
Generate a SQL query to answer the following question:
`What is the transfer fee for Gravgaard?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "out" (
"nat" text,
"name" text,
"moving_to" text,
"type" text,
"transfer_window" text,
"transfer_fee" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the transfer fee for Gravgaard?`:
```sql
|
SELECT "result" FROM "classical_games" WHERE "moves">41 AND "year"=2007 AND "opening"='c42 petrov''s defence'; |
## Task
Generate a SQL query to answer the following question:
`What's the result when there's more than 41 moves with an opening of c42 petrov's defence in 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classical_games" (
"white" text,
"black" text,
"year" real,
"result" text,
"moves" real,
"tournament" text,
"opening" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the result when there's more than 41 moves with an opening of c42 petrov's defence in 2007?`:
```sql
|
SELECT COUNT("moves") FROM "classical_games" WHERE "result"='½–½' AND "year"<1999 AND "black"='anand'; |
## Task
Generate a SQL query to answer the following question:
`What's the total number of moves with a result of ½–½ and a black of Anand before 1999?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classical_games" (
"white" text,
"black" text,
"year" real,
"result" text,
"moves" real,
"tournament" text,
"opening" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the total number of moves with a result of ½–½ and a black of Anand before 1999?`:
```sql
|
SELECT "black" FROM "classical_games" WHERE "moves"=24 AND "tournament"='dortmund'; |
## Task
Generate a SQL query to answer the following question:
`What's the black with 24 moves in the dortmund tournament?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classical_games" (
"white" text,
"black" text,
"year" real,
"result" text,
"moves" real,
"tournament" text,
"opening" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the black with 24 moves in the dortmund tournament?`:
```sql
|
SELECT "opening" FROM "classical_games" WHERE "white"='anand' AND "moves"<61 AND "result"='½–½'; |
## Task
Generate a SQL query to answer the following question:
`What's the opening when white is Anand with fewer than 61 moves for a result of ½–½?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classical_games" (
"white" text,
"black" text,
"year" real,
"result" text,
"moves" real,
"tournament" text,
"opening" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the opening when white is Anand with fewer than 61 moves for a result of ½–½?`:
```sql
|
SELECT "white" FROM "classical_games" WHERE "black"='anand' AND "result"='½–½' AND "moves"=39 AND "opening"='d37 queen''s gambit declined'; |
## Task
Generate a SQL query to answer the following question:
`What's the white for a black of Anand, a result of ½–½, 39 moves, and an opening of d37 queen's gambit declined?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classical_games" (
"white" text,
"black" text,
"year" real,
"result" text,
"moves" real,
"tournament" text,
"opening" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the white for a black of Anand, a result of ½–½, 39 moves, and an opening of d37 queen's gambit declined?`:
```sql
|
SELECT MIN("draw") FROM "results" WHERE "english_translation"='we the lovers' AND "place">1; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest draw that has We The Lovers for the english translation, with a place greater than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"draw" real,
"language" text,
"artist" text,
"song" text,
"english_translation" text,
"place" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest draw that has We The Lovers for the english translation, with a place greater than 1?`:
```sql
|
SELECT SUM("draw") FROM "results" WHERE "language"='french' AND "place"<1; |
## Task
Generate a SQL query to answer the following question:
`How many draws have french as the language, with a place less than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"draw" real,
"language" text,
"artist" text,
"song" text,
"english_translation" text,
"place" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many draws have french as the language, with a place less than 1?`:
```sql
|
SELECT "fate" FROM "ships_attacked" WHERE "tonnage">'4,671' AND "name_of_ship"='hms manistee (f 104)'; |
## Task
Generate a SQL query to answer the following question:
`What is the Fate of the HMS Manistee (f 104) with a Tonnage of 4,671 or more?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships_attacked" (
"date" text,
"name_of_ship" text,
"flag" text,
"tonnage" real,
"fate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Fate of the HMS Manistee (f 104) with a Tonnage of 4,671 or more?`:
```sql
|
SELECT MAX("tonnage") FROM "ships_attacked" WHERE "flag"='canada'; |
## Task
Generate a SQL query to answer the following question:
`What is the Tonnage of the ship from Canada?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships_attacked" (
"date" text,
"name_of_ship" text,
"flag" text,
"tonnage" real,
"fate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Tonnage of the ship from Canada?`:
```sql
|
SELECT "place" FROM "first_round" WHERE "country"='zimbabwe'; |
## Task
Generate a SQL query to answer the following question:
`In what place did the golfer representing Zimbabwe finish?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what place did the golfer representing Zimbabwe finish?`:
```sql
|
SELECT "place" FROM "first_round" WHERE "score"<71 AND "player"='des smyth'; |
## Task
Generate a SQL query to answer the following question:
`In what place did Des Smyth, who scored less than 71, finish?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what place did Des Smyth, who scored less than 71, finish?`:
```sql
|
SELECT "spaceport" FROM "spaceports_with_achieved_vertical_launch" WHERE "launcher"='saturn ib' AND "launch_complex"='lc34'; |
## Task
Generate a SQL query to answer the following question:
`What is the spaceport location that houses the LC34 complex and uses the Saturn IB launcher?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "spaceports_with_achieved_vertical_launch" (
"spaceport" text,
"launch_complex" text,
"launcher" text,
"spacecraft" text,
"flights" text,
"years" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the spaceport location that houses the LC34 complex and uses the Saturn IB launcher?`:
```sql
|
SELECT "spacecraft" FROM "spaceports_with_achieved_vertical_launch" WHERE "launcher"='titan ii'; |
## Task
Generate a SQL query to answer the following question:
`Which spacecraft were launched by the Titan II?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "spaceports_with_achieved_vertical_launch" (
"spaceport" text,
"launch_complex" text,
"launcher" text,
"spacecraft" text,
"flights" text,
"years" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which spacecraft were launched by the Titan II?`:
```sql
|
SELECT "launcher" FROM "spaceports_with_achieved_vertical_launch" WHERE "spacecraft"='apollo-soyuz'; |
## Task
Generate a SQL query to answer the following question:
`What was the launcher vehicle for Apollo-Soyuz?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "spaceports_with_achieved_vertical_launch" (
"spaceport" text,
"launch_complex" text,
"launcher" text,
"spacecraft" text,
"flights" text,
"years" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the launcher vehicle for Apollo-Soyuz?`:
```sql
|
SELECT "launch_complex" FROM "spaceports_with_achieved_vertical_launch" WHERE "launcher"='soyuz (r)' AND "flights"='14 orbital'; |
## Task
Generate a SQL query to answer the following question:
`Which complex used the Soyuz (r) launcher to facilitate 14 orbital flights?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "spaceports_with_achieved_vertical_launch" (
"spaceport" text,
"launch_complex" text,
"launcher" text,
"spacecraft" text,
"flights" text,
"years" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which complex used the Soyuz (r) launcher to facilitate 14 orbital flights?`:
```sql
|
SELECT "2008" FROM "singles_performance_timeline" WHERE "tournament"='year end ranking'; |
## Task
Generate a SQL query to answer the following question:
`what is 2008 when the tournament is year end ranking?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2006" 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 2008 when the tournament is year end ranking?`:
```sql
|
SELECT "2012" FROM "singles_performance_timeline" WHERE "tournament"='cincinnati masters'; |
## Task
Generate a SQL query to answer the following question:
`what is 2012 when the tournament is cincinnati masters?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2006" 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 2012 when the tournament is cincinnati masters?`:
```sql
|
SELECT "2008" FROM "singles_performance_timeline" WHERE "2012"='3r' AND "2009"='2r'; |
## Task
Generate a SQL query to answer the following question:
`what is 2008 when 2012 is 3r and 2009 is 2r?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2006" 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 2008 when 2012 is 3r and 2009 is 2r?`:
```sql
|
SELECT "winner_s_prize" FROM "past_winners" WHERE "location"='providence, ri' AND "year"=2009; |
## Task
Generate a SQL query to answer the following question:
`What is the Winner's Prize at the 2009 Providence, RI Championship?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_winners" (
"year" real,
"winners" text,
"location" text,
"event_director" text,
"winner_s_prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Winner's Prize at the 2009 Providence, RI Championship?`:
```sql
|
SELECT "height_ft_m" FROM "tallest_buildings" WHERE "year"=1907; |
## Task
Generate a SQL query to answer the following question:
`How tall is the structure built in 1907?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tallest_buildings" (
"rank" text,
"name" text,
"height_ft_m" text,
"floors" real,
"year" real
);
### SQL
Given the database schema, here is the SQL query that answers `How tall is the structure built in 1907?`:
```sql
|
SELECT "name" FROM "tallest_buildings" WHERE "floors">34; |
## Task
Generate a SQL query to answer the following question:
`Which building has more than 34 floors?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tallest_buildings" (
"rank" text,
"name" text,
"height_ft_m" text,
"floors" real,
"year" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which building has more than 34 floors?`:
```sql
|
SELECT MIN("gold") FROM "performances_by_nation" WHERE "bronze"=0 AND "silver"<2; |
## Task
Generate a SQL query to answer the following question:
`Which rank has 0 bronze and 2 silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performances_by_nation" (
"rank" real,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which rank has 0 bronze and 2 silver?`:
```sql
|
SELECT SUM("silver") FROM "performances_by_nation" WHERE "gold"<4 AND "total"=1 AND "rank">6; |
## Task
Generate a SQL query to answer the following question:
`How much silver does the rank have that has gold smaller than 4, and a total of 1 and a rank larger than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performances_by_nation" (
"rank" real,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much silver does the rank have that has gold smaller than 4, and a total of 1 and a rank larger than 6?`:
```sql
|
SELECT SUM("rank") FROM "performances_by_nation" WHERE "silver">0 AND "bronze"=4 AND "total"<10; |
## Task
Generate a SQL query to answer the following question:
`Which rank has a more than 0 silver, 4 bronze, and a total smaller than 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performances_by_nation" (
"rank" real,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which rank has a more than 0 silver, 4 bronze, and a total smaller than 10?`:
```sql
|
SELECT COUNT("gold") FROM "performances_by_nation" WHERE "silver"=3 AND "bronze">3; |
## Task
Generate a SQL query to answer the following question:
`How much gold does the tank have that has 3 silver and more than 3 bronze?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performances_by_nation" (
"rank" real,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much gold does the tank have that has 3 silver and more than 3 bronze?`:
```sql
|
SELECT COUNT("total") FROM "performances_by_nation" WHERE "silver"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the total number that 0 silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performances_by_nation" (
"rank" real,
"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 that 0 silver?`:
```sql
|
SELECT "score" FROM "final_leaderboard" WHERE "to_par">17 AND "player"='mike brady'; |
## Task
Generate a SQL query to answer the following question:
`Which Score has a To par larger than 17, and a Player of mike brady?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" real,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Score has a To par larger than 17, and a Player of mike brady?`:
```sql
|
SELECT "place" FROM "final_leaderboard" WHERE "money"=150 AND "player"='bobby cruickshank'; |
## Task
Generate a SQL query to answer the following question:
`Which Place that has Money of 150, and a Player of bobby cruickshank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" real,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Place that has Money of 150, and a Player of bobby cruickshank?`:
```sql
|
SELECT "place" FROM "final_leaderboard" WHERE "to_par"<15 AND "score"='74-74-74-75=297'; |
## Task
Generate a SQL query to answer the following question:
`Which Place has a To par smaller than 15, and a Score of 74-74-74-75=297?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" real,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Place has a To par smaller than 15, and a Score of 74-74-74-75=297?`:
```sql
|
SELECT "score" FROM "fifth_round_proper" WHERE "tie_no"='8'; |
## Task
Generate a SQL query to answer the following question:
`What is the score when the tie number is 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fifth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score when the tie number is 8?`:
```sql
|
SELECT "score" FROM "fifth_round_proper" WHERE "tie_no"='6'; |
## Task
Generate a SQL query to answer the following question:
`What is the score when the tie number is 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fifth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score when the tie number is 6?`:
```sql
|
SELECT "tie_no" FROM "fifth_round_proper" WHERE "home_team"='middlesbrough'; |
## Task
Generate a SQL query to answer the following question:
`What is the tie number for Middlesbrough?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fifth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the tie number for Middlesbrough?`:
```sql
|
SELECT "status" FROM "1967" WHERE "date"='15/04/1967'; |
## Task
Generate a SQL query to answer the following question:
`What status has 15/04/1967 as the date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1967" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What status has 15/04/1967 as the date?`:
```sql
|
SELECT "venue" FROM "1967" WHERE "opposing_teams"='scotland'; |
## Task
Generate a SQL query to answer the following question:
`What venue has Scotland as the opposing teams?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1967" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What venue has Scotland as the opposing teams?`:
```sql
|
SELECT "status" FROM "1967" WHERE "opposing_teams"='france'; |
## Task
Generate a SQL query to answer the following question:
`What status has France as the opposing teams?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1967" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What status has France as the opposing teams?`:
```sql
|
SELECT "week_4" FROM "nominations" WHERE "week_9"='all housemates'; |
## Task
Generate a SQL query to answer the following question:
`What kind of Week 4 has a Week 9 of all housemates?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nominations" (
"week_1" text,
"week_2" text,
"week_3" text,
"week_4" text,
"week_5" text,
"week_6" text,
"week_7" text,
"week_8" text,
"week_9" text,
"week_10_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What kind of Week 4 has a Week 9 of all housemates?`:
```sql
|
SELECT "week_3" FROM "nominations" WHERE "week_9"='ejected (day 3)'; |
## Task
Generate a SQL query to answer the following question:
`Which Week 3 has a Week 9 of ejected (day 3)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nominations" (
"week_1" text,
"week_2" text,
"week_3" text,
"week_4" text,
"week_5" text,
"week_6" text,
"week_7" text,
"week_8" text,
"week_9" text,
"week_10_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Week 3 has a Week 9 of ejected (day 3)?`:
```sql
|
SELECT "week_1" FROM "nominations" WHERE "week_8"='not eligible' AND "week_9"='no nominations' AND "week_3"='cyril'; |
## Task
Generate a SQL query to answer the following question:
`What kind of Week 1 has a Week 8 of not eligible, and a Week 9 of no nominations, and a Week 3 of cyril? Question 3`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nominations" (
"week_1" text,
"week_2" text,
"week_3" text,
"week_4" text,
"week_5" text,
"week_6" text,
"week_7" text,
"week_8" text,
"week_9" text,
"week_10_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What kind of Week 1 has a Week 8 of not eligible, and a Week 9 of no nominations, and a Week 3 of cyril? Question 3`:
```sql
|
SELECT "week_9" FROM "nominations" WHERE "week_1"='no nominations' AND "week_6"='not eligible' AND "week_2"='not eligible' AND "week_10_final"='evicted (day 57)'; |
## Task
Generate a SQL query to answer the following question:
`What kind of Week 9 has a Week 1 of no nominations, and a Week 6 of not eligible, and a Week 2 of not eligible, and a Week 10 FINAL of evicted (day 57)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nominations" (
"week_1" text,
"week_2" text,
"week_3" text,
"week_4" text,
"week_5" text,
"week_6" text,
"week_7" text,
"week_8" text,
"week_9" text,
"week_10_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What kind of Week 9 has a Week 1 of no nominations, and a Week 6 of not eligible, and a Week 2 of not eligible, and a Week 10 FINAL of evicted (day 57)?`:
```sql
|
SELECT "week_7" FROM "nominations" WHERE "week_5"='evicted (day 15)'; |
## Task
Generate a SQL query to answer the following question:
`What kind of Week 7 has a Week 5 of evicted (day 15)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nominations" (
"week_1" text,
"week_2" text,
"week_3" text,
"week_4" text,
"week_5" text,
"week_6" text,
"week_7" text,
"week_8" text,
"week_9" text,
"week_10_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What kind of Week 7 has a Week 5 of evicted (day 15)?`:
```sql
|
SELECT "week_6" FROM "nominations" WHERE "week_2"='see notes 2 , 3 , 4'; |
## Task
Generate a SQL query to answer the following question:
`What kind of Week 6 has a Week 2 of see notes 2 , 3 , 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nominations" (
"week_1" text,
"week_2" text,
"week_3" text,
"week_4" text,
"week_5" text,
"week_6" text,
"week_7" text,
"week_8" text,
"week_9" text,
"week_10_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What kind of Week 6 has a Week 2 of see notes 2 , 3 , 4?`:
```sql
|
SELECT MIN("against") FROM "2012_ladder" WHERE "wins">11 AND "geelong_fl"='st josephs'; |
## Task
Generate a SQL query to answer the following question:
`Which Against has more than 11 wins, and a Geelong FL of st josephs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2012_ladder" (
"geelong_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Against has more than 11 wins, and a Geelong FL of st josephs?`:
```sql
|
SELECT MAX("attendance") FROM "postseason" WHERE "loss"='hiller (3–2)'; |
## Task
Generate a SQL query to answer the following question:
`What is the Attendance of the game with a Loss of Hiller (3–2)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "postseason" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text,
"arena" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Attendance of the game with a Loss of Hiller (3–2)?`:
```sql
|
SELECT "away_team" FROM "fourth_round_proper" WHERE "home_team"='tottenham hotspur'; |
## Task
Generate a SQL query to answer the following question:
`Who is the away team that tottenham hotspur played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the away team that tottenham hotspur played?`:
```sql
|
SELECT "score" FROM "fourth_round_proper" WHERE "date"='29 january 1983' AND "away_team"='chelsea'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game with away team chelsea on 29 january 1983?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game with away team chelsea on 29 january 1983?`:
```sql
|
SELECT "date" FROM "fourth_round_proper" WHERE "home_team"='torquay united'; |
## Task
Generate a SQL query to answer the following question:
`What date was the game that home team torquay united played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the game that home team torquay united played?`:
```sql
|
SELECT "home_team" FROM "fourth_round_proper" WHERE "away_team"='watford'; |
## Task
Generate a SQL query to answer the following question:
`Who is the team that played away team watford?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the team that played away team watford?`:
```sql
|
SELECT "date" FROM "fourth_round_proper" WHERE "home_team"='crystal palace'; |
## Task
Generate a SQL query to answer the following question:
`What date was the game when home team crystal palace played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the game when home team crystal palace played?`:
```sql
|
SELECT "country" FROM "second_round" WHERE "player"='retief goosen'; |
## Task
Generate a SQL query to answer the following question:
`What country is Retief Goosen from?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country is Retief Goosen from?`:
```sql
|
SELECT COUNT("high_checkout") FROM "statistics" WHERE "legs_won"<13 AND "180s"<2 AND "lwat">1; |
## Task
Generate a SQL query to answer the following question:
`What is the number of high checkout with fewer than 13 legs won, a 180s lower than 2 and an LWAT of more than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics" (
"player" text,
"played" real,
"legs_won" real,
"legs_lost" real,
"lwat" real,
"100" real,
"140" real,
"180s" real,
"high_checkout" real,
"3_dart_average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of high checkout with fewer than 13 legs won, a 180s lower than 2 and an LWAT of more than 1?`:
```sql
|
SELECT SUM("140") FROM "statistics" WHERE "high_checkout"=74 AND "100">17; |
## Task
Generate a SQL query to answer the following question:
`What is the total 140+ with a high checkout of 74 and a 100+ higher than 17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics" (
"player" text,
"played" real,
"legs_won" real,
"legs_lost" real,
"lwat" real,
"100" real,
"140" real,
"180s" real,
"high_checkout" real,
"3_dart_average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total 140+ with a high checkout of 74 and a 100+ higher than 17?`:
```sql
|
SELECT AVG("played") FROM "statistics" WHERE "3_dart_average">90.8 AND "lwat">5 AND "legs_lost"<17; |
## Task
Generate a SQL query to answer the following question:
`How many played are there with a 3-dart average of more than 90.8, an LWAT higher than 5 and fewer than 17 legs lost?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics" (
"player" text,
"played" real,
"legs_won" real,
"legs_lost" real,
"lwat" real,
"100" real,
"140" real,
"180s" real,
"high_checkout" real,
"3_dart_average" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many played are there with a 3-dart average of more than 90.8, an LWAT higher than 5 and fewer than 17 legs lost?`:
```sql
|
SELECT "player" FROM "third_round" WHERE "place"='1'; |
## Task
Generate a SQL query to answer the following question:
`What Player is in Place 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Player is in Place 1?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.