output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "school" FROM "girls_basketball_players_and_coaches_of_" WHERE "player"='maya moore'; |
## Task
Generate a SQL query to answer the following question:
`Where did Maya Moore attend school?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "girls_basketball_players_and_coaches_of_" (
"year" text,
"player" text,
"school" text,
"hometown" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did Maya Moore attend school?`:
```sql
|
SELECT COUNT("diff") FROM "torneo_clausura_closing_tournament" WHERE "lost"<5 AND "points"<32; |
## Task
Generate a SQL query to answer the following question:
`What is the difference with a loss smaller than 5 and points lower than 32?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneo_clausura_closing_tournament" (
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"diff" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the difference with a loss smaller than 5 and points lower than 32?`:
```sql
|
SELECT MIN("lost") FROM "torneo_clausura_closing_tournament" WHERE "played"<18; |
## Task
Generate a SQL query to answer the following question:
`Which loss had a player lower than 18?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneo_clausura_closing_tournament" (
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"diff" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which loss had a player lower than 18?`:
```sql
|
SELECT "winner" FROM "2010s_raiders_5_2" WHERE "year"=2012 AND "result"='15–0'; |
## Task
Generate a SQL query to answer the following question:
`Who won the 2012 game that had a score of 15–0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2010s_raiders_5_2" (
"year" real,
"date" text,
"winner" text,
"result" text,
"loser" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won the 2012 game that had a score of 15–0?`:
```sql
|
SELECT AVG("week") FROM "schedule" WHERE "result"='l 31-27' AND "attendance"<'85,865'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the week for result of l 31-27, and an Attendance smaller than 85,865`
### 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 `Tell me the week for result of l 31-27, and an Attendance smaller than 85,865`:
```sql
|
SELECT "date" FROM "schedule" WHERE "week"<5 AND "attendance">'43,922' AND "result"='w 21-7'; |
## Task
Generate a SQL query to answer the following question:
`I want the date for week less than 5 and attendance more than 43,922 with a result of w 21-7`
### 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 `I want the date for week less than 5 and attendance more than 43,922 with a result of w 21-7`:
```sql
|
SELECT "director" FROM "list_of_superlative_academy_award_winner" WHERE "notes"='prizzi''s honor'; |
## Task
Generate a SQL query to answer the following question:
`Who had notes of Prizzi's Honor?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_superlative_academy_award_winner" (
"superlative" text,
"director" text,
"record_set" text,
"year" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had notes of Prizzi's Honor?`:
```sql
|
SELECT "superlative" FROM "list_of_superlative_academy_award_winner" WHERE "record_set"='12 nominations'; |
## Task
Generate a SQL query to answer the following question:
`What Superlative had a record set of 12 nominations?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_superlative_academy_award_winner" (
"superlative" text,
"director" text,
"record_set" text,
"year" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Superlative had a record set of 12 nominations?`:
```sql
|
SELECT MAX("laps") FROM "race_results" WHERE "driver"='joe nemechek'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number of laps completed by driver Joe Nemechek?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_results" (
"driver" text,
"car_num" real,
"make" text,
"points" text,
"laps" real,
"winnings" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of laps completed by driver Joe Nemechek?`:
```sql
|
SELECT "home_team_score" FROM "round_18" WHERE "venue"='victoria park'; |
## Task
Generate a SQL query to answer the following question:
`What is the home team score when they played at Victoria Park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home team score when they played at Victoria Park?`:
```sql
|
SELECT "away_team_score" FROM "round_18" WHERE "home_team_score"='11.18 (84)'; |
## Task
Generate a SQL query to answer the following question:
`What was the away team score when the home team score was 11.18 (84)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the away team score when the home team score was 11.18 (84)?`:
```sql
|
SELECT "venue" FROM "round_18" WHERE "home_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`What was the venue when the home team was Fitzroy?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the venue when the home team was Fitzroy?`:
```sql
|
SELECT "home_team" FROM "round_18" WHERE "home_team_score"='12.16 (88)'; |
## Task
Generate a SQL query to answer the following question:
`What team was the home team when the home team score was 12.16 (88)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the home team when the home team score was 12.16 (88)?`:
```sql
|
SELECT "away_team" FROM "round_18" WHERE "home_team_score"='16.11 (107)'; |
## Task
Generate a SQL query to answer the following question:
`What team was the away team when the home team score was 16.11 (107)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the away team when the home team score was 16.11 (107)?`:
```sql
|
SELECT "proposed" FROM "superfund_sites" WHERE "name"='revere textile prints corporation'; |
## Task
Generate a SQL query to answer the following question:
`What is the date for proposed for revere textile prints corporation`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "superfund_sites" (
"cerclis_id" text,
"name" text,
"county" text,
"proposed" text,
"listed" text,
"construction_completed" text,
"partially_deleted" text,
"deleted" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date for proposed for revere textile prints corporation`:
```sql
|
SELECT "deleted" FROM "superfund_sites" WHERE "county"='tolland'; |
## Task
Generate a SQL query to answer the following question:
`What is the deleted for tolland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "superfund_sites" (
"cerclis_id" text,
"name" text,
"county" text,
"proposed" text,
"listed" text,
"construction_completed" text,
"partially_deleted" text,
"deleted" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the deleted for tolland?`:
```sql
|
SELECT "venue" FROM "round_2" WHERE "away_team_score"='16.14 (110)'; |
## Task
Generate a SQL query to answer the following question:
`What venue has the away side scoring 16.14 (110)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What venue has the away side scoring 16.14 (110)?`:
```sql
|
SELECT "away_team_score" FROM "round_2" WHERE "home_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What is the away side score when hawthorn is the home side?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the away side score when hawthorn is the home side?`:
```sql
|
SELECT AVG("laps") FROM "race" WHERE "time_retired"='+4 laps' AND "grid"<19; |
## Task
Generate a SQL query to answer the following question:
`What is the average lap total for grids under 19 and a Time/Retired of +4 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average lap total for grids under 19 and a Time/Retired of +4 laps?`:
```sql
|
SELECT "driver" FROM "race" WHERE "laps">43 AND "grid"=5; |
## Task
Generate a SQL query to answer the following question:
`Who drive over 43 laps in grid 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who drive over 43 laps in grid 5?`:
```sql
|
SELECT "away_team" FROM "round_4" WHERE "home_team_score"='7.8 (50)'; |
## Task
Generate a SQL query to answer the following question:
`What team played away in the game that the home team scored 7.8 (50)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team played away in the game that the home team scored 7.8 (50)?`:
```sql
|
SELECT "home_team_score" FROM "round_4" WHERE "away_team_score"='6.8 (44)'; |
## Task
Generate a SQL query to answer the following question:
`What did the home team score when the away team scored 6.8 (44)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What did the home team score when the away team scored 6.8 (44)?`:
```sql
|
SELECT "away_team_score" FROM "round_7" WHERE "venue"='princes park'; |
## Task
Generate a SQL query to answer the following question:
`Which Away team score has a Venue of princes park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Away team score has a Venue of princes park?`:
```sql
|
SELECT "away_team_score" FROM "round_7" WHERE "home_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`Which Away team score has a Home team of melbourne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Away team score has a Home team of melbourne?`:
```sql
|
SELECT "genre" FROM "second_line_series" WHERE "english_title_chinese_title"='revolving doors of vengeance 酒店風雲'; |
## Task
Generate a SQL query to answer the following question:
`What genre is revolving doors of vengeance 酒店風雲?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_line_series" (
"airing_date" text,
"english_title_chinese_title" text,
"number_of_episodes" real,
"genre" text,
"official_website" text
);
### SQL
Given the database schema, here is the SQL query that answers `What genre is revolving doors of vengeance 酒店風雲?`:
```sql
|
SELECT "english_title_chinese_title" FROM "second_line_series" WHERE "genre"='modern drama' AND "number_of_episodes"=20 AND "airing_date"='26 sep- 21 oct'; |
## Task
Generate a SQL query to answer the following question:
`What is the english title of the modern drama, episode 20, that airs on 26 sep- 21 oct?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_line_series" (
"airing_date" text,
"english_title_chinese_title" text,
"number_of_episodes" real,
"genre" text,
"official_website" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the english title of the modern drama, episode 20, that airs on 26 sep- 21 oct?`:
```sql
|
SELECT "d_48" FROM "senate_composition_as_a_result_of_the_el" WHERE "d_50_o"='d 31'; |
## Task
Generate a SQL query to answer the following question:
`What is the D48 when the D 50 O is d 31?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_as_a_result_of_the_el" (
"d_41" text,
"d_42" text,
"d_43" text,
"d_44" text,
"d_45" text,
"d_46" text,
"d_47" text,
"d_48" text,
"d_49" text,
"d_50_o" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the D48 when the D 50 O is d 31?`:
```sql
|
SELECT "date" FROM "release_details" WHERE "catalogue"='tojp 60121-22'; |
## Task
Generate a SQL query to answer the following question:
`What was Catalogue tojp 60121-22's Date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_details" (
"country" text,
"date" text,
"label" text,
"format" text,
"catalogue" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Catalogue tojp 60121-22's Date?`:
```sql
|
SELECT "date" FROM "release_details" WHERE "country"='united states'; |
## Task
Generate a SQL query to answer the following question:
`What was the Date of Country of United States?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_details" (
"country" text,
"date" text,
"label" text,
"format" text,
"catalogue" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Date of Country of United States?`:
```sql
|
SELECT "catalogue" FROM "release_details" WHERE "date"='14 november 2003' AND "format"='compact disc'; |
## Task
Generate a SQL query to answer the following question:
`What Catalogue is Dated 14 november 2003, with the Format compact disc?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_details" (
"country" text,
"date" text,
"label" text,
"format" text,
"catalogue" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Catalogue is Dated 14 november 2003, with the Format compact disc?`:
```sql
|
SELECT "label" FROM "release_details" WHERE "date"='14 november 2003' AND "catalogue"='tojp 60121-22'; |
## Task
Generate a SQL query to answer the following question:
`What is the Label for Date of 14 November 2003, and Catalogue tojp 60121-22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_details" (
"country" text,
"date" text,
"label" text,
"format" text,
"catalogue" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Label for Date of 14 November 2003, and Catalogue tojp 60121-22?`:
```sql
|
SELECT "label" FROM "release_details" WHERE "catalogue"='tojp 60121-22'; |
## Task
Generate a SQL query to answer the following question:
`What Label was Catalogued tojp 60121-22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_details" (
"country" text,
"date" text,
"label" text,
"format" text,
"catalogue" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Label was Catalogued tojp 60121-22?`:
```sql
|
SELECT "record" FROM "men" WHERE "nationality"='norway' AND "date"='23 august 1981'; |
## Task
Generate a SQL query to answer the following question:
`What is the record for Norway on 23 august 1981?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "men" (
"event" text,
"record" text,
"athlete" text,
"nationality" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record for Norway on 23 august 1981?`:
```sql
|
SELECT "record" FROM "men" WHERE "event"='20000 m walk'; |
## Task
Generate a SQL query to answer the following question:
`What is the record for the 20000 m walk?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "men" (
"event" text,
"record" text,
"athlete" text,
"nationality" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record for the 20000 m walk?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "result"='bye'; |
## Task
Generate a SQL query to answer the following question:
`When was the Bye week?`
### 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" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the Bye week?`:
```sql
|
SELECT "open_2nd_viii" FROM "winning_head_of_the_river_championship_e" WHERE "u15_6th_quad"='bgs' AND "u16_1st_viii"='tss'; |
## Task
Generate a SQL query to answer the following question:
`Which Open 2nd VIII had a U15 6th Quad of BGS and a U16 1st VII of TSS?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winning_head_of_the_river_championship_e" (
"crew" real,
"open_1st_viii" text,
"open_2nd_viii" text,
"open_3rd_viii" text,
"u16_1st_viii" text,
"u16_2nd_viii" text,
"u16_3rd_viii" text,
"u15_1st_quad" text,
"u15_2nd_quad" text,
"u15_3rd_quad" text,
"u15_4th_quad" text,
"u15_5th_quad" text,
"u15_6th_quad" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Open 2nd VIII had a U15 6th Quad of BGS and a U16 1st VII of TSS?`:
```sql
|
SELECT "u15_3rd_quad" FROM "winning_head_of_the_river_championship_e" WHERE "u15_2nd_quad"='acgs'; |
## Task
Generate a SQL query to answer the following question:
`What U15 3rd Quad has a U15 2nd Quad of ACGS?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winning_head_of_the_river_championship_e" (
"crew" real,
"open_1st_viii" text,
"open_2nd_viii" text,
"open_3rd_viii" text,
"u16_1st_viii" text,
"u16_2nd_viii" text,
"u16_3rd_viii" text,
"u15_1st_quad" text,
"u15_2nd_quad" text,
"u15_3rd_quad" text,
"u15_4th_quad" text,
"u15_5th_quad" text,
"u15_6th_quad" text
);
### SQL
Given the database schema, here is the SQL query that answers `What U15 3rd Quad has a U15 2nd Quad of ACGS?`:
```sql
|
SELECT "u15_4th_quad" FROM "winning_head_of_the_river_championship_e" WHERE "u15_3rd_quad"='bbc' AND "u15_6th_quad"='gt'; |
## Task
Generate a SQL query to answer the following question:
`Which U15 4th Quad had a U15 3rd Quad of BBC and U15 6th Quad of GT?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winning_head_of_the_river_championship_e" (
"crew" real,
"open_1st_viii" text,
"open_2nd_viii" text,
"open_3rd_viii" text,
"u16_1st_viii" text,
"u16_2nd_viii" text,
"u16_3rd_viii" text,
"u15_1st_quad" text,
"u15_2nd_quad" text,
"u15_3rd_quad" text,
"u15_4th_quad" text,
"u15_5th_quad" text,
"u15_6th_quad" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which U15 4th Quad had a U15 3rd Quad of BBC and U15 6th Quad of GT?`:
```sql
|
SELECT "u15_1st_quad" FROM "winning_head_of_the_river_championship_e" WHERE "open_3rd_viii"='bbc' AND "u16_3rd_viii"='bbc'; |
## Task
Generate a SQL query to answer the following question:
`Which U15 1st Quad had an Open 3rd VIII of BBC and U16 3rd VIII of BBC?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winning_head_of_the_river_championship_e" (
"crew" real,
"open_1st_viii" text,
"open_2nd_viii" text,
"open_3rd_viii" text,
"u16_1st_viii" text,
"u16_2nd_viii" text,
"u16_3rd_viii" text,
"u15_1st_quad" text,
"u15_2nd_quad" text,
"u15_3rd_quad" text,
"u15_4th_quad" text,
"u15_5th_quad" text,
"u15_6th_quad" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which U15 1st Quad had an Open 3rd VIII of BBC and U16 3rd VIII of BBC?`:
```sql
|
SELECT "nationality" FROM "final" WHERE "result"='4.50'; |
## Task
Generate a SQL query to answer the following question:
`What was the nationality of the athlete with a final result of 4.50?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"athlete" text,
"nationality" text,
"3_60" text,
"3_80" text,
"3_95" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the nationality of the athlete with a final result of 4.50?`:
```sql
|
SELECT "athlete" FROM "final" WHERE "result"='4.30'; |
## Task
Generate a SQL query to answer the following question:
`What was the athlete with a final result of 4.30?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"athlete" text,
"nationality" text,
"3_60" text,
"3_80" text,
"3_95" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the athlete with a final result of 4.30?`:
```sql
|
SELECT "country" FROM "alpine_club_classification" WHERE "highest_mountain"='rettlkirchspitze'; |
## Task
Generate a SQL query to answer the following question:
`Which country has the Highest mountain of rettlkirchspitze?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "alpine_club_classification" (
"ave_no" text,
"name" text,
"country" text,
"highest_mountain" text,
"height_m" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which country has the Highest mountain of rettlkirchspitze?`:
```sql
|
SELECT AVG("height_m") FROM "alpine_club_classification" WHERE "highest_mountain"='hochgall'; |
## Task
Generate a SQL query to answer the following question:
`What is the average height with the Highest mountain of hochgall?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "alpine_club_classification" (
"ave_no" text,
"name" text,
"country" text,
"highest_mountain" text,
"height_m" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average height with the Highest mountain of hochgall?`:
```sql
|
SELECT "u_s_country" FROM "singles" WHERE "album"='singles only' AND "year"=1967; |
## Task
Generate a SQL query to answer the following question:
`What US Country released an album of singles only in 1967?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"year" real,
"single" text,
"u_s_country" text,
"u_s" text,
"u_s_ac" text,
"album" text
);
### SQL
Given the database schema, here is the SQL query that answers `What US Country released an album of singles only in 1967?`:
```sql
|
SELECT "u_s_ac" FROM "singles" WHERE "album"='the best' AND "year"=1965; |
## Task
Generate a SQL query to answer the following question:
`What was the best album in 1965?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"year" real,
"single" text,
"u_s_country" text,
"u_s" text,
"u_s_ac" text,
"album" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the best album in 1965?`:
```sql
|
SELECT "result" FROM "kickboxing_record" WHERE "method"='tko (low kicks)'; |
## Task
Generate a SQL query to answer the following question:
`What is the result of the fight that had a tko (low kicks)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "kickboxing_record" (
"result" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result of the fight that had a tko (low kicks)?`:
```sql
|
SELECT "event" FROM "kickboxing_record" WHERE "round"<3 AND "method"='no contest (punch after knockdown)'; |
## Task
Generate a SQL query to answer the following question:
`What event went under 3 rounds and was no contest (punch after knockdown)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "kickboxing_record" (
"result" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What event went under 3 rounds and was no contest (punch after knockdown)?`:
```sql
|
SELECT "event" FROM "kickboxing_record" WHERE "round"<2 AND "location"='hong kong'; |
## Task
Generate a SQL query to answer the following question:
`What event was in hong kong and went less than 2 rounds?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "kickboxing_record" (
"result" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What event was in hong kong and went less than 2 rounds?`:
```sql
|
SELECT "round" FROM "kickboxing_record" WHERE "opponent"='carter williams'; |
## Task
Generate a SQL query to answer the following question:
`How many rounds was the fight against carter williams?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "kickboxing_record" (
"result" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many rounds was the fight against carter williams?`:
```sql
|
SELECT "engine" FROM "teams_and_drivers" WHERE "rounds"='7-13'; |
## Task
Generate a SQL query to answer the following question:
`In rounds 7-13 what engine was featured?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_drivers" (
"constructor" text,
"chassis" text,
"engine" text,
"tyre" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `In rounds 7-13 what engine was featured?`:
```sql
|
SELECT "away_team_score" FROM "round_14" WHERE "home_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What score was conceded by Richmond?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_14" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What score was conceded by Richmond?`:
```sql
|
SELECT COUNT("goals") FROM "iran" WHERE "date"='1950-05-30'; |
## Task
Generate a SQL query to answer the following question:
`What is the number of Goals on 1950-05-30?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "iran" (
"date" text,
"venue" text,
"result" text,
"competition" text,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of Goals on 1950-05-30?`:
```sql
|
SELECT MIN("goals") FROM "iran" WHERE "venue"='tehran, iran' AND "date"='1948-10-28'; |
## Task
Generate a SQL query to answer the following question:
`In 1948-10-28, what were the lowest Goals in Tehran, Iran?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "iran" (
"date" text,
"venue" text,
"result" text,
"competition" text,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `In 1948-10-28, what were the lowest Goals in Tehran, Iran?`:
```sql
|
SELECT "venue" FROM "iran" WHERE "result"='1-3'; |
## Task
Generate a SQL query to answer the following question:
`In what Venue was the Result 1-3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "iran" (
"date" text,
"venue" text,
"result" text,
"competition" text,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `In what Venue was the Result 1-3?`:
```sql
|
SELECT "venue" FROM "iran" WHERE "competition"='international match' AND "date"='1948-10-28'; |
## Task
Generate a SQL query to answer the following question:
`In 1948-10-28, in what Venue was the Competition of International Match held?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "iran" (
"date" text,
"venue" text,
"result" text,
"competition" text,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `In 1948-10-28, in what Venue was the Competition of International Match held?`:
```sql
|
SELECT "chassis" FROM "drivers_and_constructors" WHERE "engine"='zakspeed 1500/4 1.5 l4 t'; |
## Task
Generate a SQL query to answer the following question:
`What was the Zakspeed 1500/4 1.5 l4 t chassis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "drivers_and_constructors" (
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"tyre" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Zakspeed 1500/4 1.5 l4 t chassis?`:
```sql
|
SELECT "engine" FROM "drivers_and_constructors" WHERE "driver"='michele alboreto'; |
## Task
Generate a SQL query to answer the following question:
`What was the Michele Alboreto's engine?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "drivers_and_constructors" (
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"tyre" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Michele Alboreto's engine?`:
```sql
|
SELECT AVG("rank") FROM "elected_candidates" WHERE "candidate_name"='antun salman'; |
## Task
Generate a SQL query to answer the following question:
`What is the average rank for antun salman?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "elected_candidates" (
"rank" real,
"list" text,
"candidate_name" text,
"gender" text,
"religion" text,
"votes" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average rank for antun salman?`:
```sql
|
SELECT "votes" FROM "elected_candidates" WHERE "gender"='♂' AND "religion"='☪' AND "candidate_name"='khalil chawka'; |
## Task
Generate a SQL query to answer the following question:
`Khalil chawka has a gender of ♂, a religion of ☪, and how many votes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "elected_candidates" (
"rank" real,
"list" text,
"candidate_name" text,
"gender" text,
"religion" text,
"votes" real
);
### SQL
Given the database schema, here is the SQL query that answers `Khalil chawka has a gender of ♂, a religion of ☪, and how many votes?`:
```sql
|
SELECT "candidate_name" FROM "elected_candidates" WHERE "votes">1853 AND "religion"='☪'; |
## Task
Generate a SQL query to answer the following question:
`Who has a religion of ☪ and more than 1853 votes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "elected_candidates" (
"rank" real,
"list" text,
"candidate_name" text,
"gender" text,
"religion" text,
"votes" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who has a religion of ☪ and more than 1853 votes?`:
```sql
|
SELECT "recorded" FROM "disc_four_studio_highlights_1971_1976" WHERE "track">11 AND "time"='3:06'; |
## Task
Generate a SQL query to answer the following question:
`What is the recorder has a Track more than 11 with a time 3:06`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "disc_four_studio_highlights_1971_1976" (
"track" real,
"recorded" text,
"original_issue" text,
"song_title" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the recorder has a Track more than 11 with a time 3:06`:
```sql
|
SELECT MIN("track") FROM "disc_four_studio_highlights_1971_1976" WHERE "song_title"='just a little bit'; |
## Task
Generate a SQL query to answer the following question:
`Which track has a title : Just a little bit`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "disc_four_studio_highlights_1971_1976" (
"track" real,
"recorded" text,
"original_issue" text,
"song_title" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which track has a title : Just a little bit`:
```sql
|
SELECT "trophy" FROM "season_by_season_records" WHERE "season"='2008–2009'; |
## Task
Generate a SQL query to answer the following question:
`What is the Trophy with a Season with 2008–2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_by_season_records" (
"season" text,
"div" text,
"pos" text,
"pld" text,
"pts" text,
"play_offs" text,
"trophy" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Trophy with a Season with 2008–2009?`:
```sql
|
SELECT "wasatch" FROM "controversy" WHERE "total_time"='122:13:40'; |
## Task
Generate a SQL query to answer the following question:
`What Wasatch time corresponds to a total time of 122:13:40?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "controversy" (
"year" real,
"name" text,
"western_states" text,
"vermont" text,
"leadville" text,
"wasatch" text,
"total_time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Wasatch time corresponds to a total time of 122:13:40?`:
```sql
|
SELECT "opponents_in_final" FROM "doubles_16_5_11" WHERE "date"='9 january 1994'; |
## Task
Generate a SQL query to answer the following question:
`Who were the opponents in the final on 9 January 1994?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_16_5_11" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents_in_final" text,
"score_in_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the opponents in the final on 9 January 1994?`:
```sql
|
SELECT "home_team" FROM "round_15" WHERE "away_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`Who was Melbourne's home team opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_15" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was Melbourne's home team opponent?`:
```sql
|
SELECT "away_team" FROM "round_15" WHERE "home_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`Who was Richmond's away team opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_15" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was Richmond's away team opponent?`:
```sql
|
SELECT AVG("fa_cup") FROM "goalscorers" WHERE "total">2 AND "league_cup"=1 AND "name"='paul ince' AND "league"<3; |
## Task
Generate a SQL query to answer the following question:
`What is the average FA Cup value with a total greater than 2, a League Cup of 1, a league less than 3, and Paul Ince scoring?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goalscorers" (
"name" text,
"league" real,
"fa_cup" real,
"league_cup" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average FA Cup value with a total greater than 2, a League Cup of 1, a league less than 3, and Paul Ince scoring?`:
```sql
|
SELECT AVG("total") FROM "goalscorers" WHERE "league"<1 AND "league_cup">1; |
## Task
Generate a SQL query to answer the following question:
`What is the average total value in a League less than 1 with more than 1 League Cup?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goalscorers" (
"name" text,
"league" real,
"fa_cup" real,
"league_cup" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average total value in a League less than 1 with more than 1 League Cup?`:
```sql
|
SELECT MIN("league_cup") FROM "goalscorers" WHERE "league">1 AND "name"='brian deane' AND "fa_cup"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest value for League Cup when the League number is greater than 1, no FA Cups, and Brian Deane scoring?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goalscorers" (
"name" text,
"league" real,
"fa_cup" real,
"league_cup" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest value for League Cup when the League number is greater than 1, no FA Cups, and Brian Deane scoring?`:
```sql
|
SELECT "region" FROM "release_history" WHERE "year"<2008 AND "name"='best 1200'; |
## Task
Generate a SQL query to answer the following question:
`Name the region before 2008 when name of best 1200`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"year" real,
"name" text,
"format_s" text,
"label" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the region before 2008 when name of best 1200`:
```sql
|
SELECT "method" FROM "mixed_martial_arts_record" WHERE "res"='win' AND "time"='4:36'; |
## Task
Generate a SQL query to answer the following question:
`What method resulted in a win and a time of 4:36?`
### 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 method resulted in a win and a time of 4:36?`:
```sql
|
SELECT "venue" FROM "round_17" WHERE "away_team"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`At what venue did the Essendon team play as an away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `At what venue did the Essendon team play as an away team?`:
```sql
|
SELECT "home_team" FROM "round_17" WHERE "venue"='junction oval'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home team for the game played at Junction Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the home team for the game played at Junction Oval?`:
```sql
|
SELECT "home_team_score" FROM "round_17" WHERE "away_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the home team when the away team was Geelong?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the home team when the away team was Geelong?`:
```sql
|
SELECT "venue" FROM "round_17" WHERE "away_team_score"='6.8 (44)'; |
## Task
Generate a SQL query to answer the following question:
`What was the venue where the away team ended in a score of 6.8 (44)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the venue where the away team ended in a score of 6.8 (44)?`:
```sql
|
SELECT "away_team" FROM "round_17" WHERE "home_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What was the away team when the home team was South Melbourne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the away team when the home team was South Melbourne?`:
```sql
|
SELECT "home_team" FROM "round_17" WHERE "venue"='junction oval'; |
## Task
Generate a SQL query to answer the following question:
`What was the name of the home team playing at the Junction Oval venue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the name of the home team playing at the Junction Oval venue?`:
```sql
|
SELECT COUNT("established") FROM "sports" WHERE "club"='lehigh valley storm'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of the established club of Lehigh Valley Storm?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sports" (
"club" text,
"league" text,
"sport" text,
"venue" text,
"established" real,
"championships" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of the established club of Lehigh Valley Storm?`:
```sql
|
SELECT "league" FROM "sports" WHERE "sport"='baseball'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of a league in the sport of baseball?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sports" (
"club" text,
"league" text,
"sport" text,
"venue" text,
"established" real,
"championships" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of a league in the sport of baseball?`:
```sql
|
SELECT "venue" FROM "sports" WHERE "sport"='soccer' AND "club"='pennsylvania stoners'; |
## Task
Generate a SQL query to answer the following question:
`What venue does the soccer team Pennsylvania Stoners play in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sports" (
"club" text,
"league" text,
"sport" text,
"venue" text,
"established" real,
"championships" text
);
### SQL
Given the database schema, here is the SQL query that answers `What venue does the soccer team Pennsylvania Stoners play in?`:
```sql
|
SELECT AVG("game_num") FROM "march" WHERE "date"='march 4'; |
## Task
Generate a SQL query to answer the following question:
`What game number was played on March 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"game_num" real,
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What game number was played on March 4?`:
```sql
|
SELECT "record" FROM "march" WHERE "visitor"='buffalo'; |
## Task
Generate a SQL query to answer the following question:
`What is the record when the visitor is Buffalo?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"game_num" real,
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record when the visitor is Buffalo?`:
```sql
|
SELECT COUNT("attendance") FROM "schedule" WHERE "result"='l 35-17'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the number of attendance that has a result of l 35-17`
### 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 `Tell me the number of attendance that has a result of l 35-17`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "week">10 AND "result"='l 22-21'; |
## Task
Generate a SQL query to answer the following question:
`I want the attendance for week larger than 10 and result of l 22-21`
### 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 `I want the attendance for week larger than 10 and result of l 22-21`:
```sql
|
SELECT COUNT("attendance") FROM "schedule" WHERE "result"='t 24-24' AND "week"<2; |
## Task
Generate a SQL query to answer the following question:
`Name for me the total number in attendance for week before 2 and result of t 24-24`
### 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 for me the total number in attendance for week before 2 and result of t 24-24`:
```sql
|
SELECT MAX("attendance") FROM "schedule" WHERE "opponent"='chicago bears'; |
## Task
Generate a SQL query to answer the following question:
`I want the greatest attendance when the opponent is the chicago bears`
### 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 `I want the greatest attendance when the opponent is the chicago bears`:
```sql
|
SELECT AVG("attendance") FROM "february" WHERE "visitor"='phoenix'; |
## Task
Generate a SQL query to answer the following question:
`What is the average attendance for a game against Phoenix?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average attendance for a game against Phoenix?`:
```sql
|
SELECT "home" FROM "february" WHERE "decision"='legace' AND "visitor"='st. louis' AND "date"='february 22'; |
## Task
Generate a SQL query to answer the following question:
`What was the home team in the February 22 game that Legace played in for the St. Louis Blues?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the home team in the February 22 game that Legace played in for the St. Louis Blues?`:
```sql
|
SELECT "home_team" FROM "round_11" WHERE "away_team"='carlton'; |
## Task
Generate a SQL query to answer the following question:
`Who was Carlton's home team opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_11" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was Carlton's home team opponent?`:
```sql
|
SELECT "away_team_score" FROM "round_11" WHERE "venue"='lake oval'; |
## Task
Generate a SQL query to answer the following question:
`Who was the away team at Lake Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_11" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the away team at Lake Oval?`:
```sql
|
SELECT "away_team" FROM "round_11" WHERE "home_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`Who was South Melbourne's away team opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_11" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was South Melbourne's away team opponent?`:
```sql
|
SELECT "home_team" FROM "round_11" WHERE "crowd">'30,848' AND "venue"='princes park'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home team at Princes Park when the attendance was more than 30,848?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_11" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the home team at Princes Park when the attendance was more than 30,848?`:
```sql
|
SELECT MAX("grid") FROM "classification" WHERE "laps"=27; |
## Task
Generate a SQL query to answer the following question:
`What is the high grid with 27 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the high grid with 27 laps?`:
```sql
|
SELECT MAX("grid") FROM "classification" WHERE "time_retired"='+6 laps' AND "laps"<69; |
## Task
Generate a SQL query to answer the following question:
`What is the high grid that has a Time/Retired of +6 laps, and under 69 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the high grid that has a Time/Retired of +6 laps, and under 69 laps?`:
```sql
|
SELECT COUNT("copies_sold") FROM "singles" WHERE "first_week_sales"='206,030'; |
## Task
Generate a SQL query to answer the following question:
`What's the total number of copies sold for the single that sold 206,030 in the first week?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"release_date" text,
"peak_chart_position" real,
"first_week_sales" real,
"copies_sold" real,
"album" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the total number of copies sold for the single that sold 206,030 in the first week?`:
```sql
|
SELECT MAX("release_date") FROM "release_history" WHERE "label"='ariola' AND "country"='spain'; |
## Task
Generate a SQL query to answer the following question:
`What was the latest release date for Ariola in Spain?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"release_format" text,
"country" text,
"label" text,
"cat_no" text,
"release_date" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the latest release date for Ariola in Spain?`:
```sql
|
SELECT "release_format" FROM "release_history" WHERE "release_date">1979; |
## Task
Generate a SQL query to answer the following question:
`What type of format was released after 1979?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"release_format" text,
"country" text,
"label" text,
"cat_no" text,
"release_date" real
);
### SQL
Given the database schema, here is the SQL query that answers `What type of format was released after 1979?`:
```sql
|
SELECT SUM("release_date") FROM "release_history" WHERE "label"='epic'; |
## Task
Generate a SQL query to answer the following question:
`On what date did Epic label start its release?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"release_format" text,
"country" text,
"label" text,
"cat_no" text,
"release_date" real
);
### SQL
Given the database schema, here is the SQL query that answers `On what date did Epic label start its release?`:
```sql
|
SELECT "games" FROM "rebounds" WHERE "rebounds"<270 AND "rank"<5; |
## Task
Generate a SQL query to answer the following question:
`Which game had less than 270 rebounds and a rank lower than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rebounds" (
"rank" real,
"name" text,
"team" text,
"games" real,
"rebounds" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which game had less than 270 rebounds and a rank lower than 5?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.