output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "2011" FROM "grand_slam_tournament_performance_timeli" WHERE "2009"='15β2'; |
## Task
Generate a SQL query to answer the following question:
`Which 2011 has a 2009 of 15β2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_slam_tournament_performance_timeli" (
"tournament" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"win_pct" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which 2011 has a 2009 of 15β2?`:
```sql
|
SELECT "2010" FROM "grand_slam_tournament_performance_timeli" WHERE "2006"='w'; |
## Task
Generate a SQL query to answer the following question:
`Which 2010 has a 2006 of w?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_slam_tournament_performance_timeli" (
"tournament" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"win_pct" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which 2010 has a 2006 of w?`:
```sql
|
SELECT "2008" FROM "grand_slam_tournament_performance_timeli" WHERE "2005"='13β3'; |
## Task
Generate a SQL query to answer the following question:
`Which 2008 has a 2005 of 13β3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_slam_tournament_performance_timeli" (
"tournament" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"win_pct" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which 2008 has a 2005 of 13β3?`:
```sql
|
SELECT "time" FROM "round_1" WHERE "ground"='ghantoot racing and polo club'; |
## Task
Generate a SQL query to answer the following question:
`What is the time of the Ghantoot Racing and Polo Club?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"crowd" text,
"date" text,
"time" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time of the Ghantoot Racing and Polo Club?`:
```sql
|
SELECT "home_team_score" FROM "round_1" WHERE "away_team"='adelaide'; |
## Task
Generate a SQL query to answer the following question:
`What is the home team score of the game with Adelaide as the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"crowd" text,
"date" text,
"time" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home team score of the game with Adelaide as the away team?`:
```sql
|
SELECT "time" FROM "round_1" WHERE "home_team"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`What is the time of the Essendon home team game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"crowd" text,
"date" text,
"time" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time of the Essendon home team game?`:
```sql
|
SELECT "home_team_score" FROM "round_1" WHERE "ground"='ghantoot racing and polo club'; |
## Task
Generate a SQL query to answer the following question:
`What is the home team score of the Ghantoot Racing and Polo Club Ground?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"crowd" text,
"date" text,
"time" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home team score of the Ghantoot Racing and Polo Club Ground?`:
```sql
|
SELECT "region" FROM "release_history" WHERE "date"='february 2006'; |
## Task
Generate a SQL query to answer the following question:
`What shows for region when the date is february 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What shows for region when the date is february 2006?`:
```sql
|
SELECT "format" FROM "release_history" WHERE "catalog"='11 135'; |
## Task
Generate a SQL query to answer the following question:
`What shows as the format for catalog 11 135?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What shows as the format for catalog 11 135?`:
```sql
|
SELECT "date" FROM "release_history" WHERE "format"='7\" single' AND "catalog"='87184'; |
## Task
Generate a SQL query to answer the following question:
`What is the release Date of the 7" single in Catalog 87184?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the release Date of the 7" single in Catalog 87184?`:
```sql
|
SELECT "region" FROM "release_history" WHERE "catalog"='885 380-1'; |
## Task
Generate a SQL query to answer the following question:
`In what Region is Catalog number 885 380-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what Region is Catalog number 885 380-1?`:
```sql
|
SELECT "label" FROM "release_history" WHERE "region"='france' AND "format"='7\" single' AND "date"='april 1986'; |
## Task
Generate a SQL query to answer the following question:
`What Label is dated April 1986 in 7" single Format in France?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Label is dated April 1986 in 7" single Format in France?`:
```sql
|
SELECT "sampling_memory_upgrade_able" FROM "comparison" WHERE "sampling_rate"='16-bit 44.1khz'; |
## Task
Generate a SQL query to answer the following question:
`Which Sampling Memory/Upgrade-able has a rate of 16-bit 44.1khz?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison" (
"model" text,
"release_date" real,
"price" text,
"midi_inputs_outputs" text,
"sampling_rate" text,
"sampling_memory_upgrade_able" text,
"sampling_time" text,
"storage_method" text,
"pad_banks" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Sampling Memory/Upgrade-able has a rate of 16-bit 44.1khz?`:
```sql
|
SELECT SUM("release_date") FROM "comparison" WHERE "sampling_rate"='12-bit 40khz'; |
## Task
Generate a SQL query to answer the following question:
`Around what time frame release a Sampling Rate of 12-bit 40khz?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison" (
"model" text,
"release_date" real,
"price" text,
"midi_inputs_outputs" text,
"sampling_rate" text,
"sampling_memory_upgrade_able" text,
"sampling_time" text,
"storage_method" text,
"pad_banks" real
);
### SQL
Given the database schema, here is the SQL query that answers `Around what time frame release a Sampling Rate of 12-bit 40khz?`:
```sql
|
SELECT "price" FROM "comparison" WHERE "sampling_rate"='12-bit 40khz'; |
## Task
Generate a SQL query to answer the following question:
`How much is a product with a Sampling Rate of 12-bit 40khz?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison" (
"model" text,
"release_date" real,
"price" text,
"midi_inputs_outputs" text,
"sampling_rate" text,
"sampling_memory_upgrade_able" text,
"sampling_time" text,
"storage_method" text,
"pad_banks" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much is a product with a Sampling Rate of 12-bit 40khz?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "date"='december 19'; |
## Task
Generate a SQL query to answer the following question:
`what team scored on december 19`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `what team scored on december 19`:
```sql
|
SELECT "home" FROM "game_log" WHERE "record"='5β5β1β1'; |
## Task
Generate a SQL query to answer the following question:
`what team scored 5β5β1β1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `what team scored 5β5β1β1?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "date"='november 7'; |
## Task
Generate a SQL query to answer the following question:
`what team scored on november 7`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `what team scored on november 7`:
```sql
|
SELECT "player" FROM "leaders" WHERE "rank"=1; |
## Task
Generate a SQL query to answer the following question:
`Which player has rank 1?`
### 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,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which player has rank 1?`:
```sql
|
SELECT AVG("wins") FROM "leaders" WHERE "rank">5; |
## Task
Generate a SQL query to answer the following question:
`What's the mean number of wins with a rank that's more than 5?`
### 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,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the mean number of wins with a rank that's more than 5?`:
```sql
|
SELECT "earnings" FROM "leaders" WHERE "player"='tiger woods'; |
## Task
Generate a SQL query to answer the following question:
`What amount of earnings does Tiger Woods have?`
### 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,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What amount of earnings does Tiger Woods have?`:
```sql
|
SELECT COUNT("position") FROM "regular_season" WHERE "points">24 AND "w_l_d"='8-5-3'; |
## Task
Generate a SQL query to answer the following question:
`What is the position number of the club with more than 24 points and a w-l-d of 8-5-3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"position" real,
"club_city_town" text,
"games_played" real,
"w_l_d" text,
"goals_for_against" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the position number of the club with more than 24 points and a w-l-d of 8-5-3?`:
```sql
|
SELECT "goals_for_against" FROM "regular_season" WHERE "points"=17; |
## Task
Generate a SQL query to answer the following question:
`What is the goals for/against of the club with 17 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"position" real,
"club_city_town" text,
"games_played" real,
"w_l_d" text,
"goals_for_against" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the goals for/against of the club with 17 points?`:
```sql
|
SELECT MAX("games_played") FROM "regular_season" WHERE "position"<4 AND "goals_for_against"='29-24'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number of games played of the club with a position number less than 4 and a 29-24 goals for/against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"position" real,
"club_city_town" text,
"games_played" real,
"w_l_d" text,
"goals_for_against" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of games played of the club with a position number less than 4 and a 29-24 goals for/against?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "attendance">'35,540'; |
## Task
Generate a SQL query to answer the following question:
`Which date's attendance was more than 35,540?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which date's attendance was more than 35,540?`:
```sql
|
SELECT MIN("attendance") FROM "schedule" WHERE "date"='december 3, 1944'; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest attendance number for December 3, 1944?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest attendance number for December 3, 1944?`:
```sql
|
SELECT "treaty_of_cession" FROM "inde_fran_aise" WHERE "colony"='karikal'; |
## Task
Generate a SQL query to answer the following question:
`When was the Treaty of Cession for Karikal Colony?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "inde_fran_aise" (
"colony" text,
"liberation" text,
"de_facto_transfer" text,
"treaty_of_cession" text,
"de_jure_transfer" text,
"merger" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the Treaty of Cession for Karikal Colony?`:
```sql
|
SELECT "date" FROM "1972" WHERE "opponent"='argentina'; |
## Task
Generate a SQL query to answer the following question:
`what day was the game in argentina`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1972" (
"date" text,
"city" text,
"opponent" text,
"results" text,
"type_of_game" text
);
### SQL
Given the database schema, here is the SQL query that answers `what day was the game in argentina`:
```sql
|
SELECT "city" FROM "1972" WHERE "results"='0:0'; |
## Task
Generate a SQL query to answer the following question:
`what city scored 0:0`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1972" (
"date" text,
"city" text,
"opponent" text,
"results" text,
"type_of_game" text
);
### SQL
Given the database schema, here is the SQL query that answers `what city scored 0:0`:
```sql
|
SELECT "type_of_game" FROM "1972" WHERE "date"='june 14'; |
## Task
Generate a SQL query to answer the following question:
`what game was played on june 14`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1972" (
"date" text,
"city" text,
"opponent" text,
"results" text,
"type_of_game" text
);
### SQL
Given the database schema, here is the SQL query that answers `what game was played on june 14`:
```sql
|
SELECT "score" FROM "playoffs" WHERE "date"='april 28'; |
## Task
Generate a SQL query to answer the following question:
`What score has april 28 as the date?`
### 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,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What score has april 28 as the date?`:
```sql
|
SELECT "score" FROM "december" WHERE "leading_scorer"='tim duncan (27)'; |
## Task
Generate a SQL query to answer the following question:
`What score has tim duncan (27) as the leading scorer?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What score has tim duncan (27) as the leading scorer?`:
```sql
|
SELECT "visitor" FROM "december" WHERE "leading_scorer"='tim duncan (16)'; |
## Task
Generate a SQL query to answer the following question:
`What visitor has tim duncan (16) as the leading scorer?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What visitor has tim duncan (16) as the leading scorer?`:
```sql
|
SELECT COUNT("round") FROM "jacksonville_jaguars_draft_history" WHERE "name"='will rackley'; |
## Task
Generate a SQL query to answer the following question:
`What were Will Rackley's total rounds?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jacksonville_jaguars_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were Will Rackley's total rounds?`:
```sql
|
SELECT MIN("overall") FROM "jacksonville_jaguars_draft_history" WHERE "position"='cornerback' AND "pick_num"<16; |
## Task
Generate a SQL query to answer the following question:
`Which cornerback has the lowest overall and a pick number smaller than 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jacksonville_jaguars_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which cornerback has the lowest overall and a pick number smaller than 16?`:
```sql
|
SELECT MAX("round") FROM "jacksonville_jaguars_draft_history" WHERE "position"='cornerback'; |
## Task
Generate a SQL query to answer the following question:
`Which cornerback has the highest round?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jacksonville_jaguars_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which cornerback has the highest round?`:
```sql
|
SELECT "outcome" FROM "singles_14_9_5" WHERE "date"='25 october 2004'; |
## Task
Generate a SQL query to answer the following question:
`What was the outcome on 25 october 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_14_9_5" (
"outcome" text,
"date" text,
"championship" text,
"surface" text,
"opponent_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the outcome on 25 october 2004?`:
```sql
|
SELECT "opponent_in_the_final" FROM "singles_14_9_5" WHERE "outcome"='runner-up' AND "date"='2 march 1998'; |
## Task
Generate a SQL query to answer the following question:
`Which opponent was a runner-up on 2 march 1998?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_14_9_5" (
"outcome" text,
"date" text,
"championship" text,
"surface" text,
"opponent_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which opponent was a runner-up on 2 march 1998?`:
```sql
|
SELECT "championship" FROM "singles_14_9_5" WHERE "opponent_in_the_final"='mario anΔiΔ'; |
## Task
Generate a SQL query to answer the following question:
`Which championship had an oppenent of mario anΔiΔ in the final?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_14_9_5" (
"outcome" text,
"date" text,
"championship" text,
"surface" text,
"opponent_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which championship had an oppenent of mario anΔiΔ in the final?`:
```sql
|
SELECT "change" FROM "top_up_additional_member_system_results" WHERE "share"='2.9%'; |
## Task
Generate a SQL query to answer the following question:
`Name the change with share of 2.9%`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_up_additional_member_system_results" (
"party" text,
"votes" real,
"share" text,
"change" text,
"seats" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the change with share of 2.9%`:
```sql
|
SELECT "change" FROM "top_up_additional_member_system_results" WHERE "party"='english democrats'; |
## Task
Generate a SQL query to answer the following question:
`Name the change for english democrats`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_up_additional_member_system_results" (
"party" text,
"votes" real,
"share" text,
"change" text,
"seats" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the change for english democrats`:
```sql
|
SELECT AVG("votes") FROM "top_up_additional_member_system_results" WHERE "party"='one london'; |
## Task
Generate a SQL query to answer the following question:
`Name the average votes for one london`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_up_additional_member_system_results" (
"party" text,
"votes" real,
"share" text,
"change" text,
"seats" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average votes for one london`:
```sql
|
SELECT "country" FROM "leaders" WHERE "rank"=5; |
## Task
Generate a SQL query to answer the following question:
`Which Country has a Rank of 5?`
### 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 `Which Country has a Rank of 5?`:
```sql
|
SELECT MIN("earnings") FROM "leaders" WHERE "rank"=1 AND "events"<22; |
## Task
Generate a SQL query to answer the following question:
`Which Earnings ($) is the lowest one that has a Rank of 1, and Events smaller than 22?`
### 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 `Which Earnings ($) is the lowest one that has a Rank of 1, and Events smaller than 22?`:
```sql
|
SELECT SUM("earnings") FROM "leaders" WHERE "wins">3; |
## Task
Generate a SQL query to answer the following question:
`How many earnings have Wins larger than 3?`
### 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 earnings have Wins larger than 3?`:
```sql
|
SELECT "player" FROM "leaders" WHERE "wins"=4; |
## Task
Generate a SQL query to answer the following question:
`Which Player has 4 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 `Which Player has 4 Wins?`:
```sql
|
SELECT COUNT("poles") FROM "results" WHERE "bike"='honda rc212v' AND "podiums"<0; |
## Task
Generate a SQL query to answer the following question:
`How many Poles have a Bike of honda rc212v, and Podiums smaller than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"year" real,
"class" text,
"team_name" text,
"bike" text,
"riders" text,
"races" text,
"wins" real,
"podiums" real,
"poles" real,
"f_laps" real,
"points" text,
"pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Poles have a Bike of honda rc212v, and Podiums smaller than 0?`:
```sql
|
SELECT MAX("wins") FROM "results" WHERE "pos"='2nd' AND "poles">2; |
## Task
Generate a SQL query to answer the following question:
`Which Wins is the highest one that has a Pos of 2nd, and Poles larger than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"year" real,
"class" text,
"team_name" text,
"bike" text,
"riders" text,
"races" text,
"wins" real,
"podiums" real,
"poles" real,
"f_laps" real,
"points" text,
"pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Wins is the highest one that has a Pos of 2nd, and Poles larger than 2?`:
```sql
|
SELECT AVG("points") FROM "melodifestivalen_1997" WHERE "place"='8th' AND "draw">8; |
## Task
Generate a SQL query to answer the following question:
`What is the average of points for 8th place with draw more than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "melodifestivalen_1997" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average of points for 8th place with draw more than 8?`:
```sql
|
SELECT SUM("points") FROM "regular_season" WHERE "game"<8 AND "record"='1β0β0'; |
## Task
Generate a SQL query to answer the following question:
`Which Points have a Game smaller than 8, and a Record of 1β0β0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"october" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Points have a Game smaller than 8, and a Record of 1β0β0?`:
```sql
|
SELECT SUM("game") FROM "regular_season" WHERE "record"='5β3β1' AND "october"<29; |
## Task
Generate a SQL query to answer the following question:
`Which Game has a Record of 5β3β1, and an October smaller than 29?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"october" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Game has a Record of 5β3β1, and an October smaller than 29?`:
```sql
|
SELECT MIN("game") FROM "regular_season" WHERE "score"='3β4'; |
## Task
Generate a SQL query to answer the following question:
`Which Game has a Score of 3β4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"october" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Game has a Score of 3β4?`:
```sql
|
SELECT SUM("game") FROM "regular_season" WHERE "record"='4β2β1' AND "points">9; |
## Task
Generate a SQL query to answer the following question:
`Which Game has a Record of 4β2β1, and Points larger than 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"october" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Game has a Record of 4β2β1, and Points larger than 9?`:
```sql
|
SELECT "nationality" FROM "draft_picks" WHERE "position"='defense' AND "player"='nikita korovkin'; |
## Task
Generate a SQL query to answer the following question:
`Which Nationality has a Position of defense, and a Player of nikita korovkin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Nationality has a Position of defense, and a Player of nikita korovkin?`:
```sql
|
SELECT "nationality" FROM "draft_picks" WHERE "position"='left wing'; |
## Task
Generate a SQL query to answer the following question:
`Which Nationality has a Position of left wing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Nationality has a Position of left wing?`:
```sql
|
SELECT "player" FROM "draft_picks" WHERE "position"='forward'; |
## Task
Generate a SQL query to answer the following question:
`Which Player has a Position of forward?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Player has a Position of forward?`:
```sql
|
SELECT "week_3_sept_14" FROM "coaches_poll" WHERE "week_6_oct_5"='kansas (4-1)'; |
## Task
Generate a SQL query to answer the following question:
`Which Week 3 Sept 14 has a Week 6 Oct 5 of kansas (4-1)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "coaches_poll" (
"week_1_sept_2" text,
"week_2_sept_7" text,
"week_3_sept_14" text,
"week_5_sept_28" text,
"week_6_oct_5" text,
"week_7_oct_12" text,
"week_10_nov_2" text,
"week_13_nov_23" text,
"week_14_nov_30" text,
"week_15_dec_7" text,
"week_16_final_jan_9" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Week 3 Sept 14 has a Week 6 Oct 5 of kansas (4-1)?`:
```sql
|
SELECT "week_2_sept_7" FROM "coaches_poll" WHERE "week_6_oct_5"='wake forest (3-1)'; |
## Task
Generate a SQL query to answer the following question:
`Which Week 2 Sept 7 has a Week 6 Oct 5 of wake forest (3-1)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "coaches_poll" (
"week_1_sept_2" text,
"week_2_sept_7" text,
"week_3_sept_14" text,
"week_5_sept_28" text,
"week_6_oct_5" text,
"week_7_oct_12" text,
"week_10_nov_2" text,
"week_13_nov_23" text,
"week_14_nov_30" text,
"week_15_dec_7" text,
"week_16_final_jan_9" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Week 2 Sept 7 has a Week 6 Oct 5 of wake forest (3-1)?`:
```sql
|
SELECT "week_1_sept_2" FROM "coaches_poll" WHERE "week_3_sept_14"='south florida (3-0)'; |
## Task
Generate a SQL query to answer the following question:
`Which Week 1 Sept 2 has a Week 3 Sept 14 of south florida (3-0)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "coaches_poll" (
"week_1_sept_2" text,
"week_2_sept_7" text,
"week_3_sept_14" text,
"week_5_sept_28" text,
"week_6_oct_5" text,
"week_7_oct_12" text,
"week_10_nov_2" text,
"week_13_nov_23" text,
"week_14_nov_30" text,
"week_15_dec_7" text,
"week_16_final_jan_9" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Week 1 Sept 2 has a Week 3 Sept 14 of south florida (3-0)?`:
```sql
|
SELECT "week_7_oct_12" FROM "coaches_poll" WHERE "week_6_oct_5"='boise state (4-0)'; |
## Task
Generate a SQL query to answer the following question:
`Which Week 7 Oct 12 has a Week 6 Oct 5 of boise state (4-0)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "coaches_poll" (
"week_1_sept_2" text,
"week_2_sept_7" text,
"week_3_sept_14" text,
"week_5_sept_28" text,
"week_6_oct_5" text,
"week_7_oct_12" text,
"week_10_nov_2" text,
"week_13_nov_23" text,
"week_14_nov_30" text,
"week_15_dec_7" text,
"week_16_final_jan_9" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Week 7 Oct 12 has a Week 6 Oct 5 of boise state (4-0)?`:
```sql
|
SELECT "week_2_sept_7" FROM "coaches_poll" WHERE "week_7_oct_12"='ball state (7-0)'; |
## Task
Generate a SQL query to answer the following question:
`Which Week 2 Sept 7 has a Week 7 Oct 12 of ball state (7-0)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "coaches_poll" (
"week_1_sept_2" text,
"week_2_sept_7" text,
"week_3_sept_14" text,
"week_5_sept_28" text,
"week_6_oct_5" text,
"week_7_oct_12" text,
"week_10_nov_2" text,
"week_13_nov_23" text,
"week_14_nov_30" text,
"week_15_dec_7" text,
"week_16_final_jan_9" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Week 2 Sept 7 has a Week 7 Oct 12 of ball state (7-0)?`:
```sql
|
SELECT "week_6_oct_5" FROM "coaches_poll" WHERE "week_14_nov_30"='texas (11-1)'; |
## Task
Generate a SQL query to answer the following question:
`Which Week 6 Oct 5 has a Week 14 Nov 30 of texas (11-1)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "coaches_poll" (
"week_1_sept_2" text,
"week_2_sept_7" text,
"week_3_sept_14" text,
"week_5_sept_28" text,
"week_6_oct_5" text,
"week_7_oct_12" text,
"week_10_nov_2" text,
"week_13_nov_23" text,
"week_14_nov_30" text,
"week_15_dec_7" text,
"week_16_final_jan_9" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Week 6 Oct 5 has a Week 14 Nov 30 of texas (11-1)?`:
```sql
|
SELECT MAX("round") FROM "nfl_draft" WHERE "player"='tommy allman' AND "pick"<40; |
## Task
Generate a SQL query to answer the following question:
`What is the highest round of Tommy Allman, who had a pick less than 40?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest round of Tommy Allman, who had a pick less than 40?`:
```sql
|
SELECT "player" FROM "nfl_draft" WHERE "pick"<183 AND "position"='back' AND "round">12; |
## Task
Generate a SQL query to answer the following question:
`Who was the back player with a pick less than 183 from the round greater than 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the back player with a pick less than 183 from the round greater than 12?`:
```sql
|
SELECT COUNT("round") FROM "nfl_draft" WHERE "pick">303 AND "position"='end'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of rounds of the end player with a pick number greater than 303?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of rounds of the end player with a pick number greater than 303?`:
```sql
|
SELECT MAX("pick") FROM "nfl_draft" WHERE "position"='back' AND "round"=28; |
## Task
Generate a SQL query to answer the following question:
`What is the highest pick of the back player from round 28?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest pick of the back player from round 28?`:
```sql
|
SELECT "position" FROM "nfl_draft" WHERE "pick">315 AND "round"=30; |
## Task
Generate a SQL query to answer the following question:
`What is position of the player with a pick number greater than 315 and a round of 30?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is position of the player with a pick number greater than 315 and a round of 30?`:
```sql
|
SELECT AVG("week") FROM "schedule" WHERE "result"='w 17-14'; |
## Task
Generate a SQL query to answer the following question:
`On what Week was the Result W 17-14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `On what Week was the Result W 17-14?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "week">4 AND "date"='november 3, 1968'; |
## Task
Generate a SQL query to answer the following question:
`What was the Result after the Week 4 on November 3, 1968?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Result after the Week 4 on November 3, 1968?`:
```sql
|
SELECT AVG("attendance") FROM "schedule" WHERE "week"=4; |
## Task
Generate a SQL query to answer the following question:
`What is the attendance in week 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"venue" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the attendance in week 4?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "record"='17β25'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game with a record of 17β25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game with a record of 17β25?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "score"='6β5 (10)'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent at the game with a score of 6β5 (10)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent at the game with a score of 6β5 (10)?`:
```sql
|
SELECT "res" FROM "mixed_martial_arts_record" WHERE "record"='4-4'; |
## Task
Generate a SQL query to answer the following question:
`What was the result of the bout that led to a 4-4 record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of the bout that led to a 4-4 record?`:
```sql
|
SELECT "location" FROM "mixed_martial_arts_record" WHERE "record"='4-3'; |
## Task
Generate a SQL query to answer the following question:
`Which location held the bout that led to a 4-3 record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which location held the bout that led to a 4-3 record?`:
```sql
|
SELECT "discs" FROM "dvd_releases" WHERE "region_1_release"='january 22, 2008'; |
## Task
Generate a SQL query to answer the following question:
`What discs has a region 1 release date of January 22, 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dvd_releases" (
"volume" text,
"discs" real,
"episodes" real,
"region_1_release" text,
"region_2_release" text,
"region_4_release" text
);
### SQL
Given the database schema, here is the SQL query that answers `What discs has a region 1 release date of January 22, 2008?`:
```sql
|
SELECT MIN("rank") FROM "first_quarter" WHERE "name"='citigroup'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest rank of Citigroup?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_quarter" (
"rank" real,
"name" text,
"headquarters" text,
"industry" text,
"market_value_usd_million" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest rank of Citigroup?`:
```sql
|
SELECT COUNT("market_value_usd_million") FROM "first_quarter" WHERE "industry"='automotive'; |
## Task
Generate a SQL query to answer the following question:
`What is the market value of the automotive industry?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_quarter" (
"rank" real,
"name" text,
"headquarters" text,
"industry" text,
"market_value_usd_million" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the market value of the automotive industry?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "result"='t 14-14'; |
## Task
Generate a SQL query to answer the following question:
`Name the attendance with result of t 14-14`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the attendance with result of t 14-14`:
```sql
|
SELECT COUNT("attendance") FROM "schedule" WHERE "date"='october 20, 1946' AND "week"<4; |
## Task
Generate a SQL query to answer the following question:
`Name the total number of attendance for october 20, 1946 with week less than 4`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of attendance for october 20, 1946 with week less than 4`:
```sql
|
SELECT MAX("attendance") FROM "schedule" WHERE "date"='november 17, 1946' AND "week">8; |
## Task
Generate a SQL query to answer the following question:
`Name the most attendance for november 17, 1946 and week more than 8`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most attendance for november 17, 1946 and week more than 8`:
```sql
|
SELECT SUM("points") FROM "non_kickers" WHERE "rank"='61t'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the points for the player who was a rank of 61t?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_kickers" (
"rank" text,
"player" text,
"position" text,
"career" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the points for the player who was a rank of 61t?`:
```sql
|
SELECT "player" FROM "non_kickers" WHERE "points">'1,052'; |
## Task
Generate a SQL query to answer the following question:
`Who is the player who had more than 1,052 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_kickers" (
"rank" text,
"player" text,
"position" text,
"career" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the player who had more than 1,052 points?`:
```sql
|
SELECT MAX("points") FROM "non_kickers" WHERE "player"='emmitt smith'; |
## Task
Generate a SQL query to answer the following question:
`What are the highest points that Emmitt Smith had?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_kickers" (
"rank" text,
"player" text,
"position" text,
"career" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are the highest points that Emmitt Smith had?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "record"='6β8'; |
## Task
Generate a SQL query to answer the following question:
`Record of 6β8 had what attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Record of 6β8 had what attendance?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "result"='l 17β20'; |
## Task
Generate a SQL query to answer the following question:
`Result of l 17β20 had what attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Result of l 17β20 had what attendance?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "game_site"='hoosier dome' AND "result"='l 7β31'; |
## Task
Generate a SQL query to answer the following question:
`Game Site of hoosier dome, and a Result of l 7β31 involved what attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Game Site of hoosier dome, and a Result of l 7β31 involved what attendance?`:
```sql
|
SELECT MAX("year") FROM "winners" WHERE "venue"='blackwolf run, composite course' AND "score"='281'; |
## Task
Generate a SQL query to answer the following question:
`Which Year is the highest one that has a Venue of blackwolf run, composite course, and a Score of 281?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" real,
"champion" text,
"country" text,
"venue" text,
"location" text,
"score" text,
"to_par" text,
"purse" real,
"winner_s_share" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Year is the highest one that has a Venue of blackwolf run, composite course, and a Score of 281?`:
```sql
|
SELECT "champion" FROM "winners" WHERE "venue"='old waverly golf club'; |
## Task
Generate a SQL query to answer the following question:
`Which Champion has a Venue of old waverly golf club?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" real,
"champion" text,
"country" text,
"venue" text,
"location" text,
"score" text,
"to_par" text,
"purse" real,
"winner_s_share" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Champion has a Venue of old waverly golf club?`:
```sql
|
SELECT SUM("world_ranking") FROM "top_25_lists" WHERE "date"='aug 5' AND "year">1980; |
## Task
Generate a SQL query to answer the following question:
`How many world rankings are after Aug 5, 1980 ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_25_lists" (
"year" real,
"performance" text,
"world_ranking" real,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many world rankings are after Aug 5, 1980 ?`:
```sql
|
SELECT "date" FROM "top_25_lists" WHERE "performance"='8.22.72'; |
## Task
Generate a SQL query to answer the following question:
`On which date is there a performance of more than 8.22.72?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_25_lists" (
"year" real,
"performance" text,
"world_ranking" real,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `On which date is there a performance of more than 8.22.72?`:
```sql
|
SELECT "date" FROM "top_25_lists" WHERE "venue"='rome'; |
## Task
Generate a SQL query to answer the following question:
`The venue of Rome has which date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_25_lists" (
"year" real,
"performance" text,
"world_ranking" real,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `The venue of Rome has which date?`:
```sql
|
SELECT "1st_leg" FROM "round_of_sixteen" WHERE "agg"='4-3'; |
## Task
Generate a SQL query to answer the following question:
`What was the 1st leg of the match that had an aggregate of 4-3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_of_sixteen" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the 1st leg of the match that had an aggregate of 4-3?`:
```sql
|
SELECT "2nd_leg" FROM "round_of_sixteen" WHERE "1st_leg"='1-3' AND "agg"='1-6'; |
## Task
Generate a SQL query to answer the following question:
`What was the 2nd leg fo the match that had a 1st leg of 1-3 and aggregate of 1-6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_of_sixteen" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the 2nd leg fo the match that had a 1st leg of 1-3 and aggregate of 1-6?`:
```sql
|
SELECT "last_final_lost" FROM "performance_by_club" WHERE "wins"='7'; |
## Task
Generate a SQL query to answer the following question:
`When was the last final lost of the club with 7 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_by_club" (
"club" text,
"wins" text,
"last_win" text,
"runners_up" text,
"last_final_lost" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the last final lost of the club with 7 wins?`:
```sql
|
SELECT "runners_up" FROM "performance_by_club" WHERE "last_final_lost"='1985'; |
## Task
Generate a SQL query to answer the following question:
`How many runners-up did the club with the last final lost in 1985 have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_by_club" (
"club" text,
"wins" text,
"last_win" text,
"runners_up" text,
"last_final_lost" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many runners-up did the club with the last final lost in 1985 have?`:
```sql
|
SELECT "last_final_lost" FROM "performance_by_club" WHERE "last_win"='1959'; |
## Task
Generate a SQL query to answer the following question:
`When was the last final lost of the club with a last win in 1959?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_by_club" (
"club" text,
"wins" text,
"last_win" text,
"runners_up" text,
"last_final_lost" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the last final lost of the club with a last win in 1959?`:
```sql
|
SELECT "last_win" FROM "performance_by_club" WHERE "club"='celtic'; |
## Task
Generate a SQL query to answer the following question:
`When was the last win of Celtic?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_by_club" (
"club" text,
"wins" text,
"last_win" text,
"runners_up" text,
"last_final_lost" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the last win of Celtic?`:
```sql
|
SELECT "club" FROM "performance_by_club" WHERE "runners_up"='13'; |
## Task
Generate a SQL query to answer the following question:
`Which club had 13 runners-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_by_club" (
"club" text,
"wins" text,
"last_win" text,
"runners_up" text,
"last_final_lost" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which club had 13 runners-up?`:
```sql
|
SELECT "visitor" FROM "regular_season" WHERE "home"='philadelphia' AND "date"='march 6'; |
## Task
Generate a SQL query to answer the following question:
`Who is the visitor in Philadelphia on March 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the visitor in Philadelphia on March 6?`:
```sql
|
SELECT "date" FROM "round_16" WHERE "away_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`what date were they playing in hawthorn`
### 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,
"ground" text,
"crowd" real,
"date" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `what date were they playing in hawthorn`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.