output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "week" FROM "schedule" WHERE "tv_time"='bye'; |
## Task
Generate a SQL query to answer the following question:
`WHAT WEEK HAS A TV TIME OF BYE?`
### 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,
"tv_time" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT WEEK HAS A TV TIME OF BYE?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "week"=15; |
## Task
Generate a SQL query to answer the following question:
`WHAT WAS THE ATTENDANCE FOR WEEK 15?`
### 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,
"tv_time" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT WAS THE ATTENDANCE FOR WEEK 15?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "date"='november 29, 2001'; |
## Task
Generate a SQL query to answer the following question:
`WHAT WAS THE RESULT FOR NOVEMBER 29, 2001?`
### 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,
"tv_time" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT WAS THE RESULT FOR NOVEMBER 29, 2001?`:
```sql
|
SELECT "built" FROM "references" WHERE "location"='clarkdale'; |
## Task
Generate a SQL query to answer the following question:
`In what year was the bridge in Clarkdale built?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"name" text,
"built" text,
"listed" text,
"location" text,
"county" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what year was the bridge in Clarkdale built?`:
```sql
|
SELECT "built" FROM "references" WHERE "name"='gila bend overpass'; |
## Task
Generate a SQL query to answer the following question:
`In what year was the Gila Bend Overpass built?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"name" text,
"built" text,
"listed" text,
"location" text,
"county" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what year was the Gila Bend Overpass built?`:
```sql
|
SELECT "county" FROM "references" WHERE "name"='canyon padre bridge'; |
## Task
Generate a SQL query to answer the following question:
`In what county is the Canyon Padre Bridge?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"name" text,
"built" text,
"listed" text,
"location" text,
"county" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what county is the Canyon Padre Bridge?`:
```sql
|
SELECT MIN("championships") FROM "results_by_teams" WHERE "years_won"='1971'; |
## Task
Generate a SQL query to answer the following question:
`Who won the ABA Championship in 1971?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results_by_teams" (
"teams" text,
"finals_appearances" real,
"championships" real,
"runners_up" real,
"years_won" text,
"years_runners_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won the ABA Championship in 1971?`:
```sql
|
SELECT AVG("lost") FROM "first_round" WHERE "played"<14; |
## Task
Generate a SQL query to answer the following question:
`What was the average amount of losses for teams with played less than 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the average amount of losses for teams with played less than 14?`:
```sql
|
SELECT COUNT("played") FROM "first_round" WHERE "name"='se freising' AND "points">13; |
## Task
Generate a SQL query to answer the following question:
`What was the total number of games played by se freising when their points were larger than 13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the total number of games played by se freising when their points were larger than 13?`:
```sql
|
SELECT AVG("lost") FROM "first_round" WHERE "points">3 AND "played">14; |
## Task
Generate a SQL query to answer the following question:
`What was the average losses for team with points larger than 3 and played larger thna 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the average losses for team with points larger than 3 and played larger thna 14?`:
```sql
|
SELECT SUM("lost") FROM "first_round" WHERE "name"='ev bruckberg' AND "drawn">1; |
## Task
Generate a SQL query to answer the following question:
`How many losses did ev bruckberg have when the drawn was more than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many losses did ev bruckberg have when the drawn was more than 1?`:
```sql
|
SELECT "poll_source" FROM "opinion_polling_for_the_united_states_se" WHERE "republican_jeff_sessions"='58%' AND "dates_administered"='july 31, 2008'; |
## Task
Generate a SQL query to answer the following question:
`What is the poll source when Jeff Sessions is at 58% and the date administered is July 31, 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polling_for_the_united_states_se" (
"poll_source" text,
"dates_administered" text,
"democrat_vivian_davis_figures" text,
"republican_jeff_sessions" text,
"lead_margin" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the poll source when Jeff Sessions is at 58% and the date administered is July 31, 2008?`:
```sql
|
SELECT "dates_administered" FROM "opinion_polling_for_the_united_states_se" WHERE "poll_source"='rasmussen reports' AND "lead_margin">32; |
## Task
Generate a SQL query to answer the following question:
`What was the date administered from a source of Rasmussen Reports and a lead margin over 32?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polling_for_the_united_states_se" (
"poll_source" text,
"dates_administered" text,
"democrat_vivian_davis_figures" text,
"republican_jeff_sessions" text,
"lead_margin" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date administered from a source of Rasmussen Reports and a lead margin over 32?`:
```sql
|
SELECT "dates_administered" FROM "opinion_polling_for_the_united_states_se" WHERE "democrat_vivian_davis_figures"='37%'; |
## Task
Generate a SQL query to answer the following question:
`What is the date administered when Vivian Davis Figures was at 37%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polling_for_the_united_states_se" (
"poll_source" text,
"dates_administered" text,
"democrat_vivian_davis_figures" text,
"republican_jeff_sessions" text,
"lead_margin" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date administered when Vivian Davis Figures was at 37%?`:
```sql
|
SELECT "dates_administered" FROM "opinion_polling_for_the_united_states_se" WHERE "democrat_vivian_davis_figures"='36%'; |
## Task
Generate a SQL query to answer the following question:
`What is the date administered when Vivian Davis Figures was at 36%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polling_for_the_united_states_se" (
"poll_source" text,
"dates_administered" text,
"democrat_vivian_davis_figures" text,
"republican_jeff_sessions" text,
"lead_margin" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date administered when Vivian Davis Figures was at 36%?`:
```sql
|
SELECT "poll_source" FROM "opinion_polling_for_the_united_states_se" WHERE "lead_margin">27 AND "democrat_vivian_davis_figures"='29%'; |
## Task
Generate a SQL query to answer the following question:
`What is the poll source for Vivian Davis Figures at 29% and a lead margin greater than 27?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polling_for_the_united_states_se" (
"poll_source" text,
"dates_administered" text,
"democrat_vivian_davis_figures" text,
"republican_jeff_sessions" text,
"lead_margin" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the poll source for Vivian Davis Figures at 29% and a lead margin greater than 27?`:
```sql
|
SELECT "score" FROM "detroit_red_wings_4_chicago_black_hawks_" WHERE "home"='chicago black hawks' AND "date"='march 28'; |
## Task
Generate a SQL query to answer the following question:
`What is the Score of the Chicago Black Hawks Home game on March 28?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "detroit_red_wings_4_chicago_black_hawks_" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Score of the Chicago Black Hawks Home game on March 28?`:
```sql
|
SELECT "visitor" FROM "detroit_red_wings_4_chicago_black_hawks_" WHERE "date"='april 2'; |
## Task
Generate a SQL query to answer the following question:
`What is the Visitor of the game on April 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "detroit_red_wings_4_chicago_black_hawks_" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Visitor of the game on April 2?`:
```sql
|
SELECT "home" FROM "detroit_red_wings_4_chicago_black_hawks_" WHERE "date"='april 4'; |
## Task
Generate a SQL query to answer the following question:
`What is the Home team on April 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "detroit_red_wings_4_chicago_black_hawks_" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Home team on April 4?`:
```sql
|
SELECT "visitor" FROM "detroit_red_wings_4_chicago_black_hawks_" WHERE "date"='march 31'; |
## Task
Generate a SQL query to answer the following question:
`What is the Visitor on March 31?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "detroit_red_wings_4_chicago_black_hawks_" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Visitor on March 31?`:
```sql
|
SELECT "home" FROM "detroit_red_wings_4_chicago_black_hawks_" WHERE "date"='april 2'; |
## Task
Generate a SQL query to answer the following question:
`What is the Home team on April 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "detroit_red_wings_4_chicago_black_hawks_" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Home team on April 2?`:
```sql
|
SELECT "date" FROM "detroit_red_wings_4_chicago_black_hawks_" WHERE "record"='2-3'; |
## Task
Generate a SQL query to answer the following question:
`What is the Date of the game with a Record of 2-3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "detroit_red_wings_4_chicago_black_hawks_" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Date of the game with a Record of 2-3?`:
```sql
|
SELECT "year" FROM "by_year" WHERE "350_cc"='freddie frith' AND "500_cc"='enrico lorenzetti'; |
## Task
Generate a SQL query to answer the following question:
`What year did Freddie Frith win the 350cc and Enrico Lorenzetti win the 500cc?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_year" (
"year" text,
"designated_grand_prix" text,
"track" text,
"250_cc" text,
"350_cc" text,
"500_cc" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year did Freddie Frith win the 350cc and Enrico Lorenzetti win the 500cc?`:
```sql
|
SELECT "track" FROM "by_year" WHERE "year"='1926'; |
## Task
Generate a SQL query to answer the following question:
`What track was used in 1926?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_year" (
"year" text,
"designated_grand_prix" text,
"track" text,
"250_cc" text,
"350_cc" text,
"500_cc" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What track was used in 1926?`:
```sql
|
SELECT "250_cc" FROM "by_year" WHERE "year"='1927'; |
## Task
Generate a SQL query to answer the following question:
`Who won the 250cc in 1927?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_year" (
"year" text,
"designated_grand_prix" text,
"track" text,
"250_cc" text,
"350_cc" text,
"500_cc" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won the 250cc in 1927?`:
```sql
|
SELECT "designated_grand_prix" FROM "by_year" WHERE "track"='granollers'; |
## Task
Generate a SQL query to answer the following question:
`What grand prix was held at Granollers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_year" (
"year" text,
"designated_grand_prix" text,
"track" text,
"250_cc" text,
"350_cc" text,
"500_cc" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What grand prix was held at Granollers?`:
```sql
|
SELECT "350_cc" FROM "by_year" WHERE "track"='sachsenring'; |
## Task
Generate a SQL query to answer the following question:
`Who won the 350cc at Sachsenring?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_year" (
"year" text,
"designated_grand_prix" text,
"track" text,
"250_cc" text,
"350_cc" text,
"500_cc" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won the 350cc at Sachsenring?`:
```sql
|
SELECT "fleet_number_s" FROM "class_l_2_8_2" WHERE "quantity_made"='13'; |
## Task
Generate a SQL query to answer the following question:
`Which fleet numbers has quanitity of 13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "class_l_2_8_2" (
"class" text,
"wheel_arrangement" text,
"fleet_number_s" text,
"manufacturer" text,
"year_made" text,
"quantity_made" text,
"quantity_preserved" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which fleet numbers has quanitity of 13?`:
```sql
|
SELECT "wheel_arrangement" FROM "class_l_2_8_2" WHERE "year_made"='1900'; |
## Task
Generate a SQL query to answer the following question:
`Which wheel arrangement made in year 1900?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "class_l_2_8_2" (
"class" text,
"wheel_arrangement" text,
"fleet_number_s" text,
"manufacturer" text,
"year_made" text,
"quantity_made" text,
"quantity_preserved" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which wheel arrangement made in year 1900?`:
```sql
|
SELECT "fleet_number_s" FROM "class_l_2_8_2" WHERE "quantity_made"='1'; |
## Task
Generate a SQL query to answer the following question:
`Which fleet numbers has quantity of 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "class_l_2_8_2" (
"class" text,
"wheel_arrangement" text,
"fleet_number_s" text,
"manufacturer" text,
"year_made" text,
"quantity_made" text,
"quantity_preserved" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which fleet numbers has quantity of 1?`:
```sql
|
SELECT "score" FROM "doubles_11_6_5" WHERE "partner"='florencia labat' AND "surface"='clay' AND "opponents"='laura golarsa ann grossman'; |
## Task
Generate a SQL query to answer the following question:
`what is the score when the partner is florencia labat, the surface is clay, the opponents is laura golarsa ann grossman?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_11_6_5" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the score when the partner is florencia labat, the surface is clay, the opponents is laura golarsa ann grossman?`:
```sql
|
SELECT "opponents" FROM "doubles_11_6_5" WHERE "surface"='clay' AND "date"='12 july 1992'; |
## Task
Generate a SQL query to answer the following question:
`who is the opponents when the surface is clay and the date is 12 july 1992?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_11_6_5" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the opponents when the surface is clay and the date is 12 july 1992?`:
```sql
|
SELECT "tournament" FROM "doubles_11_6_5" WHERE "outcome"='winner' AND "opponents"='kerry-anne guse corina morariu'; |
## Task
Generate a SQL query to answer the following question:
`what is the tournament when the outcome is winner and the opponents is kerry-anne guse corina morariu?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_11_6_5" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the tournament when the outcome is winner and the opponents is kerry-anne guse corina morariu?`:
```sql
|
SELECT "score" FROM "doubles_11_6_5" WHERE "partner"='alexandra fusai'; |
## Task
Generate a SQL query to answer the following question:
`what is the score when the partner is alexandra fusai?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_11_6_5" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the score when the partner is alexandra fusai?`:
```sql
|
SELECT "surface" FROM "doubles_11_6_5" WHERE "opponents"='louise field nathalie herreman'; |
## Task
Generate a SQL query to answer the following question:
`what is the surface when the opponents are louise field nathalie herreman?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_11_6_5" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the surface when the opponents are louise field nathalie herreman?`:
```sql
|
SELECT "score" FROM "doubles_11_6_5" WHERE "surface"='clay' AND "tournament"='san marino'; |
## Task
Generate a SQL query to answer the following question:
`what is the score when the surface is clay and the tournament is san marino?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_11_6_5" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the score when the surface is clay and the tournament is san marino?`:
```sql
|
SELECT AVG("grid") FROM "moto_gp_classification" WHERE "laps"<32 AND "manufacturer"='yamaha'; |
## Task
Generate a SQL query to answer the following question:
`If the manufacturer is Yamaha, and the laps driven were under 32, what's the average of all grid sizes with that criteria?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "moto_gp_classification" (
"rider" text,
"manufacturer" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `If the manufacturer is Yamaha, and the laps driven were under 32, what's the average of all grid sizes with that criteria?`:
```sql
|
SELECT MIN("laps") FROM "moto_gp_classification" WHERE "manufacturer"='suzuki' AND "grid"=8; |
## Task
Generate a SQL query to answer the following question:
`What's the smallest amount of laps that suzuki ran with a grid value of 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "moto_gp_classification" (
"rider" text,
"manufacturer" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the smallest amount of laps that suzuki ran with a grid value of 8?`:
```sql
|
SELECT "opponent" FROM "march" WHERE "h_a_n"='h' AND "score"='101-105'; |
## Task
Generate a SQL query to answer the following question:
`Who were the opponents when the score of the game was 101-105 and the H/A/N was H?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"date" text,
"h_a_n" text,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the opponents when the score of the game was 101-105 and the H/A/N was H?`:
```sql
|
SELECT "date" FROM "march" WHERE "opponent"='baltimore bullets' AND "h_a_n"='h'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game against the Baltimore Bullets when the H/A/N was H?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"date" text,
"h_a_n" text,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game against the Baltimore Bullets when the H/A/N was H?`:
```sql
|
SELECT "score" FROM "march" WHERE "opponent"='baltimore bullets' AND "date"='march 14'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the game against the baltimore bullets on March 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"date" text,
"h_a_n" text,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the game against the baltimore bullets on March 14?`:
```sql
|
SELECT "opponent" FROM "march" WHERE "h_a_n"='h' AND "score"='122-135'; |
## Task
Generate a SQL query to answer the following question:
`Who were the opponents when the score was 122-135 and the H/A/N was H?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"date" text,
"h_a_n" text,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the opponents when the score was 122-135 and the H/A/N was H?`:
```sql
|
SELECT "score" FROM "march" WHERE "record"='22-55'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the game where the record was 22-55?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"date" text,
"h_a_n" text,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the game where the record was 22-55?`:
```sql
|
SELECT AVG("drawn") FROM "first_round" WHERE "name"='ersc amberg' AND "points"<14; |
## Task
Generate a SQL query to answer the following question:
`What is the average games that were drawn with ERSC Amberg as name and less than 14 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average games that were drawn with ERSC Amberg as name and less than 14 points?`:
```sql
|
SELECT COUNT("position") FROM "first_round" WHERE "drawn"=0 AND "points">22 AND "played">14; |
## Task
Generate a SQL query to answer the following question:
`What is the total position with a drawn of 0 and greater than 22 points and a greater than 14 played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total position with a drawn of 0 and greater than 22 points and a greater than 14 played?`:
```sql
|
SELECT "issue_date_s" FROM "notes" WHERE "weeks_at_number_one"=5 AND "volume_issue"='61:17-21'; |
## Task
Generate a SQL query to answer the following question:
`Which Issue date(s) has a Weeks at number one of 5, and a Volume:Issue of 61:17-21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notes" (
"volume_issue" text,
"issue_date_s" text,
"weeks_at_number_one" real,
"song" text,
"artist_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Issue date(s) has a Weeks at number one of 5, and a Volume:Issue of 61:17-21?`:
```sql
|
SELECT "song" FROM "notes" WHERE "weeks_at_number_one">2 AND "issue_date_s"='17 april - 8 may'; |
## Task
Generate a SQL query to answer the following question:
`Which Song has a Weeks at number one larger than 2, and an Issue date(s) of 17 april - 8 may?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notes" (
"volume_issue" text,
"issue_date_s" text,
"weeks_at_number_one" real,
"song" text,
"artist_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Song has a Weeks at number one larger than 2, and an Issue date(s) of 17 april - 8 may?`:
```sql
|
SELECT MAX("weeks_at_number_one") FROM "notes" WHERE "volume_issue"='61:22-23'; |
## Task
Generate a SQL query to answer the following question:
`Which Weeks at number one has a Volume:Issue of 61:22-23?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notes" (
"volume_issue" text,
"issue_date_s" text,
"weeks_at_number_one" real,
"song" text,
"artist_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Weeks at number one has a Volume:Issue of 61:22-23?`:
```sql
|
SELECT "song" FROM "notes" WHERE "issue_date_s"='29 may - 26 june'; |
## Task
Generate a SQL query to answer the following question:
`Which Song has an Issue date(s) of 29 may - 26 june?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notes" (
"volume_issue" text,
"issue_date_s" text,
"weeks_at_number_one" real,
"song" text,
"artist_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Song has an Issue date(s) of 29 may - 26 june?`:
```sql
|
SELECT "report" FROM "round_1" WHERE "home_team"='new zealand breakers'; |
## Task
Generate a SQL query to answer the following question:
`what is the report when the home team is new zealand breakers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"date" text,
"home_team" text,
"score" text,
"away_team" text,
"venue" text,
"box_score" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the report when the home team is new zealand breakers?`:
```sql
|
SELECT "score" FROM "round_1" WHERE "home_team"='cairns taipans'; |
## Task
Generate a SQL query to answer the following question:
`what is the score when the home team is cairns taipans?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"date" text,
"home_team" text,
"score" text,
"away_team" text,
"venue" text,
"box_score" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the score when the home team is cairns taipans?`:
```sql
|
SELECT "away_team" FROM "round_1" WHERE "venue"='cairns convention centre'; |
## Task
Generate a SQL query to answer the following question:
`Who is the away team when the venue is cairns convention centre?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"date" text,
"home_team" text,
"score" text,
"away_team" text,
"venue" text,
"box_score" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the away team when the venue is cairns convention centre?`:
```sql
|
SELECT "away_team" FROM "round_1" WHERE "home_team"='sydney spirit'; |
## Task
Generate a SQL query to answer the following question:
`who is the away team when the home team is sydney spirit?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"date" text,
"home_team" text,
"score" text,
"away_team" text,
"venue" text,
"box_score" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the away team when the home team is sydney spirit?`:
```sql
|
SELECT "box_score" FROM "round_1" WHERE "home_team"='melbourne tigers'; |
## Task
Generate a SQL query to answer the following question:
`what is the box score when the home team is melbourne tigers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"date" text,
"home_team" text,
"score" text,
"away_team" text,
"venue" text,
"box_score" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the box score when the home team is melbourne tigers?`:
```sql
|
SELECT "away_team" FROM "round_1" WHERE "date"='21 september'; |
## Task
Generate a SQL query to answer the following question:
`who is the away team on 21 september?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"date" text,
"home_team" text,
"score" text,
"away_team" text,
"venue" text,
"box_score" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the away team on 21 september?`:
```sql
|
SELECT "to_par" FROM "third_round" WHERE "place"='t2' AND "player"='ernie els'; |
## Task
Generate a SQL query to answer the following question:
`When Ernie Els placed t2, what was his To par?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `When Ernie Els placed t2, what was his To par?`:
```sql
|
SELECT "place" FROM "third_round" WHERE "player"='jay haas'; |
## Task
Generate a SQL query to answer the following question:
`Where did Jay Haas place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did Jay Haas place?`:
```sql
|
SELECT "place" FROM "third_round" WHERE "player"='jim furyk'; |
## Task
Generate a SQL query to answer the following question:
`Where did Jim Furyk place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did Jim Furyk place?`:
```sql
|
SELECT "score" FROM "third_round" WHERE "player"='jim furyk'; |
## Task
Generate a SQL query to answer the following question:
`What was Jim Furyk's score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Jim Furyk's score?`:
```sql
|
SELECT "score" FROM "third_round" WHERE "to_par"='+1'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the To par of +1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score for the To par of +1?`:
```sql
|
SELECT "player" FROM "third_round" WHERE "place"='t5' AND "score"='73-69-68=210'; |
## Task
Generate a SQL query to answer the following question:
`Who placed in t5 and scored 73-69-68=210?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who placed in t5 and scored 73-69-68=210?`:
```sql
|
SELECT "opponent" FROM "mixed_martial_arts_record" WHERE "record"='11-6-2'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent when the record was 11-6-2?`
### 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" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent when the record was 11-6-2?`:
```sql
|
SELECT "home_team" FROM "fourth_round" WHERE "attendance">202; |
## Task
Generate a SQL query to answer the following question:
`What is the home team of the match with an attendance greater than 202?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_round" (
"tie_no" real,
"home_team" text,
"score" text,
"away_team" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home team of the match with an attendance greater than 202?`:
```sql
|
SELECT AVG("attendance") FROM "fourth_round" WHERE "home_team"='arlesey town'; |
## Task
Generate a SQL query to answer the following question:
`What is the average attendance of the match with arlesey town as the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_round" (
"tie_no" real,
"home_team" text,
"score" text,
"away_team" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average attendance of the match with arlesey town as the home team?`:
```sql
|
SELECT "date" FROM "race_calendar" WHERE "race_title"='lakeside' AND "winner"='paul morris'; |
## Task
Generate a SQL query to answer the following question:
`When was the Lakeside race where Paul Morris won?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_calendar" (
"race" real,
"race_title" text,
"circuit" text,
"city_state" text,
"date" text,
"winner" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the Lakeside race where Paul Morris won?`:
```sql
|
SELECT "score" FROM "november" WHERE "opponent"='phoenix suns'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game against the phoenix suns?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "november" (
"date" text,
"h_a_n" text,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game against the phoenix suns?`:
```sql
|
SELECT "opponent" FROM "november" WHERE "record"='0-12'; |
## Task
Generate a SQL query to answer the following question:
`What was the opponent of the game when the reocrd was 0-12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "november" (
"date" text,
"h_a_n" text,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the opponent of the game when the reocrd was 0-12?`:
```sql
|
SELECT COUNT("year") FROM "singles" WHERE "location"='forest hills' AND "runner_up"='john mcenroe' AND "score"='6β3, 6β3'; |
## Task
Generate a SQL query to answer the following question:
`How many years had a location at Forest Hills and a score of 6β3, 6β3 for John McEnroe?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"location" text,
"year" real,
"champion" text,
"runner_up" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years had a location at Forest Hills and a score of 6β3, 6β3 for John McEnroe?`:
```sql
|
SELECT "champion" FROM "singles" WHERE "score"='7β6, 6β0'; |
## Task
Generate a SQL query to answer the following question:
`Who is the champion with a score of 7β6, 6β0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"location" text,
"year" real,
"champion" text,
"runner_up" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the champion with a score of 7β6, 6β0?`:
```sql
|
SELECT "runner_up" FROM "singles" WHERE "year"=1990; |
## Task
Generate a SQL query to answer the following question:
`Who is the runner-up in 1990?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"location" text,
"year" real,
"champion" text,
"runner_up" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the runner-up in 1990?`:
```sql
|
SELECT MIN("year") FROM "singles" WHERE "runner_up"='guillermo vilas'; |
## Task
Generate a SQL query to answer the following question:
`When was the earliest year that Guillermo Vilas was the runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"location" text,
"year" real,
"champion" text,
"runner_up" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the earliest year that Guillermo Vilas was the runner-up?`:
```sql
|
SELECT "source" FROM "2013" WHERE "race_winners"='ben adriaenssen / ben van den bogaart' AND "gp_winner"='ben adriaenssen / ben van den bogaart' AND "date"='1 april'; |
## Task
Generate a SQL query to answer the following question:
`What source has a race winner of ben adriaenssen / ben van den bogaart, and the gp winner of ben adriaenssen / ben van den bogaart, for the date of 1 april?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2013" (
"date" text,
"place" text,
"race_winners" text,
"gp_winner" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What source has a race winner of ben adriaenssen / ben van den bogaart, and the gp winner of ben adriaenssen / ben van den bogaart, for the date of 1 april?`:
```sql
|
SELECT "gp_winner" FROM "2013" WHERE "race_winners"='valentin giraud / nicolas musset' AND "place"='genk'; |
## Task
Generate a SQL query to answer the following question:
`What is the GP winner for the Race winners valentin giraud / nicolas musset, and a place genk?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2013" (
"date" text,
"place" text,
"race_winners" text,
"gp_winner" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the GP winner for the Race winners valentin giraud / nicolas musset, and a place genk?`:
```sql
|
SELECT "date" FROM "2013" WHERE "source"='result' AND "place"='iffendic'; |
## Task
Generate a SQL query to answer the following question:
`What is the date for a source of result and a place of iffendic?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2013" (
"date" text,
"place" text,
"race_winners" text,
"gp_winner" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date for a source of result and a place of iffendic?`:
```sql
|
SELECT "date" FROM "2013" WHERE "place"='chernivtsi' AND "race_winners"='etienne bax / kaspars stupelis'; |
## Task
Generate a SQL query to answer the following question:
`What date has a place of chernivtsi, and a race winners of etienne bax / kaspars stupelis? What`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2013" (
"date" text,
"place" text,
"race_winners" text,
"gp_winner" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date has a place of chernivtsi, and a race winners of etienne bax / kaspars stupelis? What`:
```sql
|
SELECT "gp_winner" FROM "2013" WHERE "place"='genk' AND "race_winners"='ben adriaenssen / ben van den bogaart'; |
## Task
Generate a SQL query to answer the following question:
`What is the GP winner with a place of genk, with race winners ben adriaenssen / ben van den bogaart?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2013" (
"date" text,
"place" text,
"race_winners" text,
"gp_winner" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the GP winner with a place of genk, with race winners ben adriaenssen / ben van den bogaart?`:
```sql
|
SELECT "race_winners" FROM "2013" WHERE "date"='23 june'; |
## Task
Generate a SQL query to answer the following question:
`What is the race winners for the date of 23 june?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2013" (
"date" text,
"place" text,
"race_winners" text,
"gp_winner" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the race winners for the date of 23 june?`:
```sql
|
SELECT "date" FROM "wins_5" WHERE "opponent_in_the_final"='barbara paulus'; |
## Task
Generate a SQL query to answer the following question:
`What date was the opponent in the final Barbara Paulus?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wins_5" (
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the opponent in the final Barbara Paulus?`:
```sql
|
SELECT "surface" FROM "wins_5" WHERE "opponent_in_the_final"='laura golarsa'; |
## Task
Generate a SQL query to answer the following question:
`What was the surface that Laura Golarsa and her opponent played on in the final?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wins_5" (
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the surface that Laura Golarsa and her opponent played on in the final?`:
```sql
|
SELECT "score" FROM "wins_5" WHERE "opponent_in_the_final"='katerina maleeva'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the opponent against Katerina Maleeva in the final?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wins_5" (
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score for the opponent against Katerina Maleeva in the final?`:
```sql
|
SELECT "name" FROM "squad_changes" WHERE "transfer_window"='winter' AND "moving_to"='anorthosis famagusta'; |
## Task
Generate a SQL query to answer the following question:
`What's the name that had a moving to Anorthosis Famagusta and a transfer window of winter?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_changes" (
"nat" text,
"name" text,
"moving_to" text,
"type" text,
"transfer_window" text,
"transfer_fee" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the name that had a moving to Anorthosis Famagusta and a transfer window of winter?`:
```sql
|
SELECT "nat" FROM "squad_changes" WHERE "transfer_fee"='free' AND "type"='mutual consent loan return'; |
## Task
Generate a SQL query to answer the following question:
`What is the Nat with a mutual consent loan return and has a free transfer fee?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_changes" (
"nat" text,
"name" text,
"moving_to" text,
"type" text,
"transfer_window" text,
"transfer_fee" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Nat with a mutual consent loan return and has a free transfer fee?`:
```sql
|
SELECT "type" FROM "squad_changes" WHERE "nat"='por'; |
## Task
Generate a SQL query to answer the following question:
`What is the type of POR?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_changes" (
"nat" text,
"name" text,
"moving_to" text,
"type" text,
"transfer_window" text,
"transfer_fee" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the type of POR?`:
```sql
|
SELECT "name" FROM "squad_changes" WHERE "nat"='mkd'; |
## Task
Generate a SQL query to answer the following question:
`What's the name of MKD?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_changes" (
"nat" text,
"name" text,
"moving_to" text,
"type" text,
"transfer_window" text,
"transfer_fee" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the name of MKD?`:
```sql
|
SELECT SUM("attendance") FROM "game_log" WHERE "date"='november 24'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the attendance on November 24?`
### 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,
"attendance" real,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the attendance on November 24?`:
```sql
|
SELECT "opponent" FROM "october" WHERE "attendance"=526; |
## Task
Generate a SQL query to answer the following question:
`What team did the Flames play against when 526 people attended the game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "october" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real,
"competition" text,
"man_of_the_match" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team did the Flames play against when 526 people attended the game?`:
```sql
|
SELECT "competition" FROM "october" WHERE "man_of_the_match"='rick plant'; |
## Task
Generate a SQL query to answer the following question:
`Rick Plant was the man of the match in what competition?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "october" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real,
"competition" text,
"man_of_the_match" text
);
### SQL
Given the database schema, here is the SQL query that answers `Rick Plant was the man of the match in what competition?`:
```sql
|
SELECT "opponent" FROM "october" WHERE "man_of_the_match"='stephen lee'; |
## Task
Generate a SQL query to answer the following question:
`Who did the Flames play against when Stephen Lee was the man of the match?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "october" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real,
"competition" text,
"man_of_the_match" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who did the Flames play against when Stephen Lee was the man of the match?`:
```sql
|
SELECT COUNT("attendance") FROM "october" WHERE "result"='won 4-2'; |
## Task
Generate a SQL query to answer the following question:
`How many people attended the game when the game was won 4-2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "october" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real,
"competition" text,
"man_of_the_match" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people attended the game when the game was won 4-2?`:
```sql
|
SELECT "competition" FROM "october" WHERE "venue"='away' AND "man_of_the_match"='n/a'; |
## Task
Generate a SQL query to answer the following question:
`For what competition was the venue away the n/a the man of the match?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "october" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real,
"competition" text,
"man_of_the_match" text
);
### SQL
Given the database schema, here is the SQL query that answers `For what competition was the venue away the n/a the man of the match?`:
```sql
|
SELECT MIN("sales_billion") FROM "2005_list" WHERE "company"='bp'; |
## Task
Generate a SQL query to answer the following question:
`What is BP's lowest sales?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005_list" (
"rank" real,
"company" text,
"country" text,
"industry" text,
"sales_billion" real,
"profits_billion" real,
"assets_billion" real,
"market_value_billion" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is BP's lowest sales?`:
```sql
|
SELECT "record" FROM "schedule" WHERE "attendance">'38,494' AND "game_site"='mile high stadium' AND "opponent"='minnesota vikings'; |
## Task
Generate a SQL query to answer the following question:
`What was the record of the Denver Broncos when they play at Mile High Stadium against the Minnesota Vikings and 38,494 fans were in 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,
"game_site" text,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the record of the Denver Broncos when they play at Mile High Stadium against the Minnesota Vikings and 38,494 fans were in attendance?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "date"='december 2'; |
## Task
Generate a SQL query to answer the following question:
`What was the final game result that was played on December 2?`
### 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,
"game_site" text,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the final game result that was played on December 2?`:
```sql
|
SELECT "week" FROM "schedule" WHERE "game_site"='rich stadium'; |
## Task
Generate a SQL query to answer the following question:
`What week was the game played at Rich Stadium?`
### 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,
"game_site" text,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What week was the game played at Rich Stadium?`:
```sql
|
SELECT SUM("fa_cup_goals") FROM "third_division" WHERE "league_goals"='19'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of FA Cup goals when there are 19 league goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_division" (
"scorer" text,
"club" text,
"league_goals" text,
"fa_cup_goals" real,
"league_cup_goals" text,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of FA Cup goals when there are 19 league goals?`:
```sql
|
SELECT "club" FROM "third_division" WHERE "league_goals"='16' AND "total"=20; |
## Task
Generate a SQL query to answer the following question:
`Which club has 16 league goals for a total of 20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_division" (
"scorer" text,
"club" text,
"league_goals" text,
"fa_cup_goals" real,
"league_cup_goals" text,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which club has 16 league goals for a total of 20?`:
```sql
|
SELECT "league_cup_goals" FROM "third_division" WHERE "total">15 AND "fa_cup_goals"=3 AND "club"='chesterfield'; |
## Task
Generate a SQL query to answer the following question:
`How many League Cup goals correspond to 3 FA Cup Goals and a total over 15 for Chesterfield?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_division" (
"scorer" text,
"club" text,
"league_goals" text,
"fa_cup_goals" real,
"league_cup_goals" text,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many League Cup goals correspond to 3 FA Cup Goals and a total over 15 for Chesterfield?`:
```sql
|
SELECT "result" FROM "regular_season" WHERE "opponent"='greensboro prowlers' AND "date"='april 6, 2002'; |
## Task
Generate a SQL query to answer the following question:
`What was the result of the april 6, 2002 game against the greensboro prowlers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"record" text,
"game_site" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of the april 6, 2002 game against the greensboro prowlers?`:
```sql
|
SELECT "location" FROM "projects_as_of_march_2013" WHERE "floors"<27 AND "building"='150 elgin'; |
## Task
Generate a SQL query to answer the following question:
`Which Location has Floors smaller than 27, and a Building of 150 elgin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "projects_as_of_march_2013" (
"building" text,
"location" text,
"height" text,
"floors" real,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Location has Floors smaller than 27, and a Building of 150 elgin?`:
```sql
|
SELECT "status" FROM "projects_as_of_march_2013" WHERE "building"='the rhombus'; |
## Task
Generate a SQL query to answer the following question:
`Which Status has a Building of the rhombus?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "projects_as_of_march_2013" (
"building" text,
"location" text,
"height" text,
"floors" real,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Status has a Building of the rhombus?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.