output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "date" FROM "fifth_round_proper" WHERE "tie_no"='3'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game that tied at 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fifth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game that tied at 3?`:
```sql
|
SELECT "european_release_date" FROM "games" WHERE "north_american_release_date"='2013-03-05'; |
## Task
Generate a SQL query to answer the following question:
`What is European Release Date, when North American Release Date is "2013-03-05"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "games" (
"series" text,
"platform" text,
"japanese_release_date" text,
"north_american_release_date" text,
"european_release_date" text,
"australia_release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is European Release Date, when North American Release Date is "2013-03-05"?`:
```sql
|
SELECT "japanese_release_date" FROM "games" WHERE "australia_release_date"='2006-03-23'; |
## Task
Generate a SQL query to answer the following question:
`What is Japanese Release Date, when Australia Release Date is "2006-03-23"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "games" (
"series" text,
"platform" text,
"japanese_release_date" text,
"north_american_release_date" text,
"european_release_date" text,
"australia_release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Japanese Release Date, when Australia Release Date is "2006-03-23"?`:
```sql
|
SELECT "north_american_release_date" FROM "games" WHERE "japanese_release_date"='2011-06-23'; |
## Task
Generate a SQL query to answer the following question:
`What is North American Release Date, when Japanese Release Date is "2011-06-23"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "games" (
"series" text,
"platform" text,
"japanese_release_date" text,
"north_american_release_date" text,
"european_release_date" text,
"australia_release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is North American Release Date, when Japanese Release Date is "2011-06-23"?`:
```sql
|
SELECT SUM("goal_difference") FROM "group_ii" WHERE "draws"=8 AND "goals_against"=32 AND "wins"<12; |
## Task
Generate a SQL query to answer the following question:
`What is the goal difference when there are fewer than 12 wins, 32 goals against and 8 draws?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_ii" (
"position" real,
"club" text,
"played" real,
"points" real,
"wins" real,
"draws" real,
"losses" real,
"goals_for" real,
"goals_against" real,
"goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the goal difference when there are fewer than 12 wins, 32 goals against and 8 draws?`:
```sql
|
SELECT MIN("goal_difference") FROM "group_ii" WHERE "position">16; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest goal difference when the position is higher than 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_ii" (
"position" real,
"club" text,
"played" real,
"points" real,
"wins" real,
"draws" real,
"losses" real,
"goals_for" real,
"goals_against" real,
"goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the lowest goal difference when the position is higher than 16?`:
```sql
|
SELECT "venue" FROM "1997" WHERE "opposing_teams"='new zealand' AND "date"='22/11/1997'; |
## Task
Generate a SQL query to answer the following question:
`Which venue was the opposing team New Zealand on 22/11/1997?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1997" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue was the opposing team New Zealand on 22/11/1997?`:
```sql
|
SELECT "date" FROM "1997" WHERE "against"=25 AND "opposing_teams"='australia'; |
## Task
Generate a SQL query to answer the following question:
`What day was the opposing team Australia and the against 25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1997" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What day was the opposing team Australia and the against 25?`:
```sql
|
SELECT "status" FROM "1997" WHERE "opposing_teams"='south africa'; |
## Task
Generate a SQL query to answer the following question:
`What was the status for the opposing team South Africa?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1997" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the status for the opposing team South Africa?`:
```sql
|
SELECT AVG("league_goals") FROM "appearances_and_goals" WHERE "fa_cup_goals"=0 AND "position"='mf' AND "league_cup_apps"='0' AND "name"='ben thornley'; |
## Task
Generate a SQL query to answer the following question:
`What is the League Goals when the FA Cup Goals are 0, position is mf, League Cup Apps of 0, and name is Ben Thornley?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the League Goals when the FA Cup Goals are 0, position is mf, League Cup Apps of 0, and name is Ben Thornley?`:
```sql
|
SELECT "total_apps" FROM "appearances_and_goals" WHERE "league_cup_apps"='0 (1)' AND "position"='df'; |
## Task
Generate a SQL query to answer the following question:
`What is the Total Apps when League Cup Apps is 0 (1), and position is df?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Total Apps when League Cup Apps is 0 (1), and position is df?`:
```sql
|
SELECT MIN("total_goals") FROM "appearances_and_goals" WHERE "name"='mark ward'; |
## Task
Generate a SQL query to answer the following question:
`What is the total goals for Mark Ward?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total goals for Mark Ward?`:
```sql
|
SELECT "party" FROM "former_members" WHERE "name"='jackie goldberg'; |
## Task
Generate a SQL query to answer the following question:
`What is the political party of Jackie Goldberg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "former_members" (
"name" text,
"residence" text,
"party" text,
"years_in_assembly" text,
"years_in_senate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the political party of Jackie Goldberg?`:
```sql
|
SELECT "years_in_assembly" FROM "former_members" WHERE "name"='christine kehoe'; |
## Task
Generate a SQL query to answer the following question:
`During what years was Christine Kehoe in Assembly?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "former_members" (
"name" text,
"residence" text,
"party" text,
"years_in_assembly" text,
"years_in_senate" text
);
### SQL
Given the database schema, here is the SQL query that answers `During what years was Christine Kehoe in Assembly?`:
```sql
|
SELECT "years_in_assembly" FROM "former_members" WHERE "residence"='san francisco'; |
## Task
Generate a SQL query to answer the following question:
`What were the San Francisco resident's years in assembly?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "former_members" (
"name" text,
"residence" text,
"party" text,
"years_in_assembly" text,
"years_in_senate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the San Francisco resident's years in assembly?`:
```sql
|
SELECT "party" FROM "former_members" WHERE "residence"='san diego'; |
## Task
Generate a SQL query to answer the following question:
`What political party does the person from San Diego belong to?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "former_members" (
"name" text,
"residence" text,
"party" text,
"years_in_assembly" text,
"years_in_senate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What political party does the person from San Diego belong to?`:
```sql
|
SELECT "opposing_teams" FROM "1988" WHERE "date"='06/02/1988'; |
## Task
Generate a SQL query to answer the following question:
`Which Opposing Teams is on 06/02/1988?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1988" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Opposing Teams is on 06/02/1988?`:
```sql
|
SELECT "date" FROM "1988" WHERE "status"='five nations' AND "venue"='twickenham , london' AND "opposing_teams"='ireland'; |
## Task
Generate a SQL query to answer the following question:
`When Status of five nations, and a Venue of twickenham , london, and a Opposing Teams of ireland are in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1988" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `When Status of five nations, and a Venue of twickenham , london, and a Opposing Teams of ireland are in?`:
```sql
|
SELECT "attendance" FROM "pre_season_and_friendlies" WHERE "opponents"='cambridge united'; |
## Task
Generate a SQL query to answer the following question:
`What's the attendance when the opponents are cambridge united?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season_and_friendlies" (
"date" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the attendance when the opponents are cambridge united?`:
```sql
|
SELECT AVG("attendance") FROM "pre_season_and_friendlies" WHERE "opponents"='dundalk'; |
## Task
Generate a SQL query to answer the following question:
`What's the average attendance when the opponents are dundalk?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season_and_friendlies" (
"date" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the average attendance when the opponents are dundalk?`:
```sql
|
SELECT COUNT("attendance") FROM "pre_season_and_friendlies" WHERE "h_a"='a' AND "opponents"='wolverhampton wanderers'; |
## Task
Generate a SQL query to answer the following question:
`What's the total attendance for H/A of A and opponents of wolverhampton wanderers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season_and_friendlies" (
"date" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the total attendance for H/A of A and opponents of wolverhampton wanderers?`:
```sql
|
SELECT MIN("total") FROM "medal_table" WHERE "gold"<4; |
## Task
Generate a SQL query to answer the following question:
`Which Total has a Gold smaller than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Total has a Gold smaller than 4?`:
```sql
|
SELECT MAX("rank") FROM "medal_table" WHERE "nation"='china (chn)' AND "bronze"<4; |
## Task
Generate a SQL query to answer the following question:
`Which Rank has a Nation of china (chn), and a Bronze smaller than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank has a Nation of china (chn), and a Bronze smaller than 4?`:
```sql
|
SELECT COUNT("total") FROM "medal_table" WHERE "bronze"<13 AND "nation"='netherlands (ned)' AND "gold">4; |
## Task
Generate a SQL query to answer the following question:
`How much Total has a Bronze smaller than 13, and a Nation of netherlands (ned), and a Gold larger than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much Total has a Bronze smaller than 13, and a Nation of netherlands (ned), and a Gold larger than 4?`:
```sql
|
SELECT "website" FROM "a" WHERE "founded"<1897 AND "suburb_town"='adaminaby'; |
## Task
Generate a SQL query to answer the following question:
`Which website was founded before 1897, and is located in Adaminaby?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "a" (
"school" text,
"suburb_town" text,
"years" text,
"founded" real,
"website" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which website was founded before 1897, and is located in Adaminaby?`:
```sql
|
SELECT "website" FROM "a" WHERE "suburb_town"='albury' AND "school"='albury high school'; |
## Task
Generate a SQL query to answer the following question:
`Which website is located in Albury and has a school of Albury High School?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "a" (
"school" text,
"suburb_town" text,
"years" text,
"founded" real,
"website" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which website is located in Albury and has a school of Albury High School?`:
```sql
|
SELECT AVG("founded") FROM "a" WHERE "years"='k-6' AND "suburb_town"='broken hill'; |
## Task
Generate a SQL query to answer the following question:
`What is the average year founded that is located in Broken Hill and has school years of k-6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "a" (
"school" text,
"suburb_town" text,
"years" text,
"founded" real,
"website" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average year founded that is located in Broken Hill and has school years of k-6?`:
```sql
|
SELECT "suburb_town" FROM "a" WHERE "years"='k-6' AND "founded"<1875 AND "school"='ashfield public school'; |
## Task
Generate a SQL query to answer the following question:
`What suburb/town has school years of k-6, was founded before 1875, and has Ashfield Public School as its school?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "a" (
"school" text,
"suburb_town" text,
"years" text,
"founded" real,
"website" text
);
### SQL
Given the database schema, here is the SQL query that answers `What suburb/town has school years of k-6, was founded before 1875, and has Ashfield Public School as its school?`:
```sql
|
SELECT "founded" FROM "a" WHERE "school"='airds high school'; |
## Task
Generate a SQL query to answer the following question:
`What is the year Airds High School was founded?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "a" (
"school" text,
"suburb_town" text,
"years" text,
"founded" real,
"website" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the year Airds High School was founded?`:
```sql
|
SELECT "website" FROM "a" WHERE "founded"=1921; |
## Task
Generate a SQL query to answer the following question:
`Which website has 1921 as the year founded?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "a" (
"school" text,
"suburb_town" text,
"years" text,
"founded" real,
"website" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which website has 1921 as the year founded?`:
```sql
|
SELECT "score_points" FROM "qualification" WHERE "rank_points"='defending champion'; |
## Task
Generate a SQL query to answer the following question:
`What Score points has a Rank points of defending champion?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualification" (
"shooter" text,
"event" text,
"rank_points" text,
"score_points" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Score points has a Rank points of defending champion?`:
```sql
|
SELECT "rank_points" FROM "qualification" WHERE "event"='wc beijing' AND "score_points"='11'; |
## Task
Generate a SQL query to answer the following question:
`What Rank points has an Event of wc beijing, and Score points of 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualification" (
"shooter" text,
"event" text,
"rank_points" text,
"score_points" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Rank points has an Event of wc beijing, and Score points of 11?`:
```sql
|
SELECT "shooter" FROM "qualification" WHERE "total"='28'; |
## Task
Generate a SQL query to answer the following question:
`What Shooter has a Total of 28?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualification" (
"shooter" text,
"event" text,
"rank_points" text,
"score_points" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Shooter has a Total of 28?`:
```sql
|
SELECT "shooter" FROM "qualification" WHERE "event"='wc beijing' AND "total"='16' AND "rank_points"='4'; |
## Task
Generate a SQL query to answer the following question:
`What Shooter has an Event of wc beijing, a Total of 16, and Rank points of 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualification" (
"shooter" text,
"event" text,
"rank_points" text,
"score_points" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Shooter has an Event of wc beijing, a Total of 16, and Rank points of 4?`:
```sql
|
SELECT AVG("against") FROM "1982" WHERE "venue"='murrayfield, edinburgh'; |
## Task
Generate a SQL query to answer the following question:
`What is the average against of Murrayfield, Edinburgh?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1982" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average against of Murrayfield, Edinburgh?`:
```sql
|
SELECT "status" FROM "1982" WHERE "opposing_teams"='wales'; |
## Task
Generate a SQL query to answer the following question:
`What is the status of the Wales opposing team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1982" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the status of the Wales opposing team?`:
```sql
|
SELECT "date" FROM "1982" WHERE "against"=7; |
## Task
Generate a SQL query to answer the following question:
`What date has an against of 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1982" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date has an against of 7?`:
```sql
|
SELECT "district" FROM "new_york" WHERE "first_elected">1998 AND "party"='democratic' AND "incumbent"='steve israel'; |
## Task
Generate a SQL query to answer the following question:
`What District was Incumbent Steve Israel First elected after 1998 in the Democratic party?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text
);
### SQL
Given the database schema, here is the SQL query that answers `What District was Incumbent Steve Israel First elected after 1998 in the Democratic party?`:
```sql
|
SELECT "results" FROM "new_york" WHERE "first_elected"<1982; |
## Task
Generate a SQL query to answer the following question:
`What are the results of a first elected prior to year 1982?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the results of a first elected prior to year 1982?`:
```sql
|
SELECT "incumbent" FROM "new_york" WHERE "party"='democratic' AND "results"='re-elected' AND "first_elected">1992 AND "district"='new york 1'; |
## Task
Generate a SQL query to answer the following question:
`Who is the Incumbent of the Democratic Party at an election after 1992 in the New York 1 District who was Re-elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the Incumbent of the Democratic Party at an election after 1992 in the New York 1 District who was Re-elected?`:
```sql
|
SELECT "to_par" FROM "first_round" WHERE "player"='gene sauers'; |
## Task
Generate a SQL query to answer the following question:
`What is Gene Sauers' to par?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Gene Sauers' to par?`:
```sql
|
SELECT "place" FROM "first_round" WHERE "country"='united states' AND "player"='john daly'; |
## Task
Generate a SQL query to answer the following question:
`Where is john daly of united states from?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where is john daly of united states from?`:
```sql
|
SELECT AVG("rank") FROM "largest_cities_and_metropolitan_areas" WHERE "city"='el paso' AND "population">'672,538'; |
## Task
Generate a SQL query to answer the following question:
`What is the average rank of the city of el paso, which has a population greater than 672,538?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "largest_cities_and_metropolitan_areas" (
"rank" real,
"city" text,
"state" text,
"population" real,
"metro_population_of_4_aspects" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average rank of the city of el paso, which has a population greater than 672,538?`:
```sql
|
SELECT "state" FROM "largest_cities_and_metropolitan_areas" WHERE "rank"<10 AND "city"='denver'; |
## Task
Generate a SQL query to answer the following question:
`What is the state of the city of denver, which has a rank less than 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "largest_cities_and_metropolitan_areas" (
"rank" real,
"city" text,
"state" text,
"population" real,
"metro_population_of_4_aspects" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the state of the city of denver, which has a rank less than 10?`:
```sql
|
SELECT "result" FROM "boxing_record" WHERE "round"<3 AND "location"='auckland, new zealand' AND "method"='tko'; |
## Task
Generate a SQL query to answer the following question:
`What is the result when the round is less than 3, the location is in Auckland, New Zealand, and tko is the method?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "boxing_record" (
"result" text,
"record" 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 when the round is less than 3, the location is in Auckland, New Zealand, and tko is the method?`:
```sql
|
SELECT MIN("round") FROM "boxing_record" WHERE "record"='4-0'; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest round to have a record of 4-0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "boxing_record" (
"result" text,
"record" 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 smallest round to have a record of 4-0?`:
```sql
|
SELECT "result" FROM "boxing_record" WHERE "round">3; |
## Task
Generate a SQL query to answer the following question:
`What is the result of a round greater than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "boxing_record" (
"result" text,
"record" 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 a round greater than 3?`:
```sql
|
SELECT "event" FROM "boxing_record" WHERE "opponent"='toa naketoatama'; |
## Task
Generate a SQL query to answer the following question:
`Which event has Toa Naketoatama as an opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "boxing_record" (
"result" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which event has Toa Naketoatama as an opponent?`:
```sql
|
SELECT SUM("killed") FROM "europe" WHERE "injured"='15' AND "year"<1987; |
## Task
Generate a SQL query to answer the following question:
`How many kills have 15 as the injured, with a year prior to 1987?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "europe" (
"perpetrator" text,
"date" text,
"year" real,
"location" text,
"country" text,
"killed" real,
"injured" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many kills have 15 as the injured, with a year prior to 1987?`:
```sql
|
SELECT "date" FROM "2007" WHERE "opposing_teams"='south africa' AND "venue"='vodacom park , bloemfontein'; |
## Task
Generate a SQL query to answer the following question:
`What is Date, when Opposing Teams is "South Africa", and when Venus is "Vodacom Park , Bloemfontein"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Date, when Opposing Teams is "South Africa", and when Venus is "Vodacom Park , Bloemfontein"?`:
```sql
|
SELECT AVG("against") FROM "2007" WHERE "status"='2007 rugby world cup' AND "opposing_teams"='u.s.a.'; |
## Task
Generate a SQL query to answer the following question:
`What is the average Against, when Status is "2007 Rugby World Cup", and when Opposing Teams is "U.S.A."?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Against, when Status is "2007 Rugby World Cup", and when Opposing Teams is "U.S.A."?`:
```sql
|
SELECT "venue" FROM "2007" WHERE "status"='2007 rugby world cup' AND "against"<22 AND "date"='08/09/2007'; |
## Task
Generate a SQL query to answer the following question:
`What is Venue, when Status is "2007 Rugby World Cup", when Against is less than 22, and when Date is "08/09/2007"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Venue, when Status is "2007 Rugby World Cup", when Against is less than 22, and when Date is "08/09/2007"?`:
```sql
|
SELECT MIN("against") FROM "2007" WHERE "status"='first test' AND "date"='26/05/2007'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Against, when Status is "First Test", and when Date is "26/05/2007"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Against, when Status is "First Test", and when Date is "26/05/2007"?`:
```sql
|
SELECT "opposing_teams" FROM "2007" WHERE "against"=20 AND "venue"='twickenham , london'; |
## Task
Generate a SQL query to answer the following question:
`What is Opposing Teams, when Against is "20", and when Venue is "Twickenham , London"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Opposing Teams, when Against is "20", and when Venue is "Twickenham , London"?`:
```sql
|
SELECT "record" FROM "mixed_martial_arts_record" WHERE "opponent"='danilo pereira'; |
## Task
Generate a SQL query to answer the following question:
`What is the record when Danilo Pereira was the opponent?`
### 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,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record when Danilo Pereira was the opponent?`:
```sql
|
SELECT "event" FROM "mixed_martial_arts_record" WHERE "opponent"='edson claas vieira'; |
## Task
Generate a SQL query to answer the following question:
`Which event had Edson Claas Vieira as an opponent?`
### 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,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which event had Edson Claas Vieira as an opponent?`:
```sql
|
SELECT "method" FROM "mixed_martial_arts_record" WHERE "opponent"='rafael cavalcante'; |
## Task
Generate a SQL query to answer the following question:
`Which method was used when Rafael Cavalcante was the opponent?`
### 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,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which method was used when Rafael Cavalcante was the opponent?`:
```sql
|
SELECT "method" FROM "mixed_martial_arts_record" WHERE "opponent"='alessio sakara'; |
## Task
Generate a SQL query to answer the following question:
`Which method was used when Alessio Sakara was the opponent?`
### 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,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which method was used when Alessio Sakara was the opponent?`:
```sql
|
SELECT "opponent" FROM "mixed_martial_arts_record" WHERE "record"='3-8'; |
## Task
Generate a SQL query to answer the following question:
`Who is the opponent when the record is 3-8?`
### 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,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the opponent when the record is 3-8?`:
```sql
|
SELECT AVG("population_2006_census") FROM "25_largest_local_government_areas_by_pop" WHERE "local_government_area"='alexandrina council' AND "rank"<19; |
## Task
Generate a SQL query to answer the following question:
`What was the 2006 population for the local government area of alexandrina council whose rank was smaller than 19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "25_largest_local_government_areas_by_pop" (
"rank" real,
"local_government_area" text,
"population_2006_census" real,
"population_2007_estimate" real,
"growth_rate" text,
"stat_division_district" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the 2006 population for the local government area of alexandrina council whose rank was smaller than 19?`:
```sql
|
SELECT "total_fat" FROM "comparative_properties_of_common_cooking" WHERE "smoke_point"='°c ()' AND "saturated_fat"='25g'; |
## Task
Generate a SQL query to answer the following question:
`What is the total fat with a smoke point of °c (), 25g of saturated fat?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparative_properties_of_common_cooking" (
"total_fat" text,
"saturated_fat" text,
"monounsaturated_fat" text,
"polyunsaturated_fat" text,
"smoke_point" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total fat with a smoke point of °c (), 25g of saturated fat?`:
```sql
|
SELECT "total_fat" FROM "comparative_properties_of_common_cooking" WHERE "polyunsaturated_fat"='11g' AND "monounsaturated_fat"='73g'; |
## Task
Generate a SQL query to answer the following question:
`What is the total fat when the polyunsaturated fat is 11g, and Monounsaturated fat is 73g?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparative_properties_of_common_cooking" (
"total_fat" text,
"saturated_fat" text,
"monounsaturated_fat" text,
"polyunsaturated_fat" text,
"smoke_point" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total fat when the polyunsaturated fat is 11g, and Monounsaturated fat is 73g?`:
```sql
|
SELECT "smoke_point" FROM "comparative_properties_of_common_cooking" WHERE "total_fat"='100g' AND "monounsaturated_fat"='46g'; |
## Task
Generate a SQL query to answer the following question:
`What is the smoke point with a total fat of 100g, and monounsaturated fat of 46g?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparative_properties_of_common_cooking" (
"total_fat" text,
"saturated_fat" text,
"monounsaturated_fat" text,
"polyunsaturated_fat" text,
"smoke_point" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smoke point with a total fat of 100g, and monounsaturated fat of 46g?`:
```sql
|
SELECT "monounsaturated_fat" FROM "comparative_properties_of_common_cooking" WHERE "saturated_fat"='39g'; |
## Task
Generate a SQL query to answer the following question:
`What shows for monounsaturated fat when the saturated fat is 39g?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparative_properties_of_common_cooking" (
"total_fat" text,
"saturated_fat" text,
"monounsaturated_fat" text,
"polyunsaturated_fat" text,
"smoke_point" text
);
### SQL
Given the database schema, here is the SQL query that answers `What shows for monounsaturated fat when the saturated fat is 39g?`:
```sql
|
SELECT "smoke_point" FROM "comparative_properties_of_common_cooking" WHERE "polyunsaturated_fat"='69g (4g in high oleic variety)'; |
## Task
Generate a SQL query to answer the following question:
`What is the smoke point when the polyunsaturated fat is 69g (4g in high oleic variety)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparative_properties_of_common_cooking" (
"total_fat" text,
"saturated_fat" text,
"monounsaturated_fat" text,
"polyunsaturated_fat" text,
"smoke_point" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smoke point when the polyunsaturated fat is 69g (4g in high oleic variety)?`:
```sql
|
SELECT "saturated_fat" FROM "comparative_properties_of_common_cooking" WHERE "total_fat"='100g' AND "polyunsaturated_fat"='69g (4g in high oleic variety)'; |
## Task
Generate a SQL query to answer the following question:
`What is the saturated fat when the total fat is 100g, and polyunsaturated fat is 69g (4g in high oleic variety)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparative_properties_of_common_cooking" (
"total_fat" text,
"saturated_fat" text,
"monounsaturated_fat" text,
"polyunsaturated_fat" text,
"smoke_point" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the saturated fat when the total fat is 100g, and polyunsaturated fat is 69g (4g in high oleic variety)?`:
```sql
|
SELECT "tie_no" FROM "sixth_round_proper" WHERE "score"='2–2'; |
## Task
Generate a SQL query to answer the following question:
`What is the Tie No with a Score of 2–2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sixth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Tie No with a Score of 2–2?`:
```sql
|
SELECT "date" FROM "sixth_round_proper" WHERE "away_team"='crystal palace'; |
## Task
Generate a SQL query to answer the following question:
`What is the Date of the Crystal Palace Away game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sixth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Date of the Crystal Palace Away game?`:
```sql
|
SELECT "home_team" FROM "sixth_round_proper" WHERE "tie_no"='2'; |
## Task
Generate a SQL query to answer the following question:
`What is the Home team of Tie no 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sixth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Home team of Tie no 2?`:
```sql
|
SELECT "home_team" FROM "sixth_round_proper" WHERE "tie_no"='2'; |
## Task
Generate a SQL query to answer the following question:
`What is the Home team of tie no 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sixth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Home team of tie no 2?`:
```sql
|
SELECT AVG("grid") FROM "superbike_race_2_classification" WHERE "laps"<24 AND "bike"='honda cbr1000rr' AND "rider"='jason pridmore'; |
## Task
Generate a SQL query to answer the following question:
`What is the average Grid, when Laps is less than 24, when Bike is "Honda CBR1000RR", and when Rider is "Jason Pridmore"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Grid, when Laps is less than 24, when Bike is "Honda CBR1000RR", and when Rider is "Jason Pridmore"?`:
```sql
|
SELECT MAX("laps") FROM "superbike_race_2_classification" WHERE "bike"='yamaha yzf-r1' AND "rider"='david checa' AND "grid">18; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Laps, when Bike is "Yamaha YZF-R1", when Rider is "David Checa", and when Grid is greater than 18?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Laps, when Bike is "Yamaha YZF-R1", when Rider is "David Checa", and when Grid is greater than 18?`:
```sql
|
SELECT SUM("grid") FROM "superbike_race_2_classification" WHERE "time"='+16.687'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Grid, when Time is "+16.687"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Grid, when Time is "+16.687"?`:
```sql
|
SELECT COUNT("grid") FROM "superbike_race_2_classification" WHERE "laps">24; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Grid, when Laps is greater than 24?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Grid, when Laps is greater than 24?`:
```sql
|
SELECT "runner_up" FROM "australia" WHERE "season">2 AND "total_prize_money"='$108,000'; |
## Task
Generate a SQL query to answer the following question:
`Who was the runner-up after season 2 when the total prize money was $108,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "australia" (
"season" real,
"year" real,
"mole" text,
"winner" text,
"runner_up" text,
"total_prize_money" text,
"potential_prize_money" text,
"destination" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the runner-up after season 2 when the total prize money was $108,000?`:
```sql
|
SELECT MAX("season") FROM "australia" WHERE "total_prize_money"='$108,000'; |
## Task
Generate a SQL query to answer the following question:
`What was the highest season number with a total prize of $108,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "australia" (
"season" real,
"year" real,
"mole" text,
"winner" text,
"runner_up" text,
"total_prize_money" text,
"potential_prize_money" text,
"destination" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the highest season number with a total prize of $108,000?`:
```sql
|
SELECT MIN("season") FROM "australia" WHERE "runner_up"='aisha jefcoate'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest season where Aisha Jefcoate was the runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "australia" (
"season" real,
"year" real,
"mole" text,
"winner" text,
"runner_up" text,
"total_prize_money" text,
"potential_prize_money" text,
"destination" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest season where Aisha Jefcoate was the runner-up?`:
```sql
|
SELECT "potential_prize_money" FROM "australia" WHERE "mole"='petrina edge'; |
## Task
Generate a SQL query to answer the following question:
`When the Mole was Petrina Edge, what was the potential prize money?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "australia" (
"season" real,
"year" real,
"mole" text,
"winner" text,
"runner_up" text,
"total_prize_money" text,
"potential_prize_money" text,
"destination" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the Mole was Petrina Edge, what was the potential prize money?`:
```sql
|
SELECT "share" FROM "ratings" WHERE "weekly_rank"='8' AND "date"='15 june'; |
## Task
Generate a SQL query to answer the following question:
`Which Share has a weekly Rank of 8 and is dated 15 June?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ratings" (
"show" text,
"date" text,
"official_ratings_millions" real,
"weekly_rank" text,
"share" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Share has a weekly Rank of 8 and is dated 15 June?`:
```sql
|
SELECT "weekly_rank" FROM "ratings" WHERE "official_ratings_millions"=11.58; |
## Task
Generate a SQL query to answer the following question:
`Which Weekly Rank has an Official ratings (millions) of 11.58?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ratings" (
"show" text,
"date" text,
"official_ratings_millions" real,
"weekly_rank" text,
"share" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Weekly Rank has an Official ratings (millions) of 11.58?`:
```sql
|
SELECT "show" FROM "ratings" WHERE "date"='9 june'; |
## Task
Generate a SQL query to answer the following question:
`Which Show is dated 9 June?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ratings" (
"show" text,
"date" text,
"official_ratings_millions" real,
"weekly_rank" text,
"share" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Show is dated 9 June?`:
```sql
|
SELECT "weekly_rank" FROM "ratings" WHERE "official_ratings_millions">5.2 AND "show"='live final'; |
## Task
Generate a SQL query to answer the following question:
`Which Weekly Rank for a Live Final Show has an Official Ratings (millions) greater than 5.2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ratings" (
"show" text,
"date" text,
"official_ratings_millions" real,
"weekly_rank" text,
"share" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Weekly Rank for a Live Final Show has an Official Ratings (millions) greater than 5.2?`:
```sql
|
SELECT "status" FROM "1948" WHERE "opposing_teams"='scotland'; |
## Task
Generate a SQL query to answer the following question:
`What is the status with the opposing team of Scotland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1948" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the status with the opposing team of Scotland?`:
```sql
|
SELECT MIN("against") FROM "1948" WHERE "venue"='twickenham, london' AND "status"='five nations' AND "opposing_teams"='ireland'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest against score for Twickenham, London with the status of Five Nations against Ireland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1948" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest against score for Twickenham, London with the status of Five Nations against Ireland?`:
```sql
|
SELECT "venue" FROM "1992" WHERE "against"<7; |
## Task
Generate a SQL query to answer the following question:
`Which Venue has a Against smaller than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1992" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Venue has a Against smaller than 7?`:
```sql
|
SELECT "date" FROM "1992" WHERE "status"='five nations' AND "against"=7; |
## Task
Generate a SQL query to answer the following question:
`When has a Status of five nations, and a Against of 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1992" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `When has a Status of five nations, and a Against of 7?`:
```sql
|
SELECT "venue" FROM "1992" WHERE "against">13; |
## Task
Generate a SQL query to answer the following question:
`Which Venue has a Against larger than 13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1992" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Venue has a Against larger than 13?`:
```sql
|
SELECT MAX("against") FROM "1992" WHERE "venue"='wembley stadium , london'; |
## Task
Generate a SQL query to answer the following question:
`Name the Against which has a Venue of wembley stadium , london?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1992" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Against which has a Venue of wembley stadium , london?`:
```sql
|
SELECT MAX("wins") FROM "first_ladder_1999" WHERE "byes"<1; |
## Task
Generate a SQL query to answer the following question:
`Which wins have less than 1 bye?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_ladder_1999" (
"club" text,
"wins" real,
"byes" real,
"losses" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which wins have less than 1 bye?`:
```sql
|
SELECT MIN("against") FROM "first_ladder_1999" WHERE "losses">10 AND "wins"<4 AND "club"='dunolly'; |
## Task
Generate a SQL query to answer the following question:
`Which Against has Losses larger than 10, and Wins smaller than 4, and a Club of dunolly?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_ladder_1999" (
"club" text,
"wins" real,
"byes" real,
"losses" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Against has Losses larger than 10, and Wins smaller than 4, and a Club of dunolly?`:
```sql
|
SELECT AVG("byes") FROM "first_ladder_1999" WHERE "against"<1297 AND "club"='avoca' AND "wins">12; |
## Task
Generate a SQL query to answer the following question:
`Which Byes has an Against smaller than 1297, and a Club of avoca, and Wins larger than 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_ladder_1999" (
"club" text,
"wins" real,
"byes" real,
"losses" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Byes has an Against smaller than 1297, and a Club of avoca, and Wins larger than 12?`:
```sql
|
SELECT "kit_factory" FROM "recreational_aircraft" WHERE "manufacturer"='jabiru' AND "model"='j250'; |
## Task
Generate a SQL query to answer the following question:
`What Kit/Factory has a J250 model made by Jabiru?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "recreational_aircraft" (
"manufacturer" text,
"model" text,
"kit_factory" text,
"wing" text,
"seats" real
);
### SQL
Given the database schema, here is the SQL query that answers `What Kit/Factory has a J250 model made by Jabiru?`:
```sql
|
SELECT "birth" FROM "house_of_savoy" WHERE "marriage"='11 july 1643'; |
## Task
Generate a SQL query to answer the following question:
`When was the duchess, who was married on 11 july 1643, born?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "house_of_savoy" (
"name" text,
"father" text,
"birth" text,
"marriage" text,
"became_duchess" text,
"ceased_to_be_duchess" text,
"death" text,
"spouse" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the duchess, who was married on 11 july 1643, born?`:
```sql
|
SELECT "birth" FROM "house_of_savoy" WHERE "name"='anne of lorraine'; |
## Task
Generate a SQL query to answer the following question:
`When was anne of lorraine born?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "house_of_savoy" (
"name" text,
"father" text,
"birth" text,
"marriage" text,
"became_duchess" text,
"ceased_to_be_duchess" text,
"death" text,
"spouse" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was anne of lorraine born?`:
```sql
|
SELECT "death" FROM "house_of_savoy" WHERE "spouse"='philippe'; |
## Task
Generate a SQL query to answer the following question:
`When did the duchess, who was married to philippe, die?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "house_of_savoy" (
"name" text,
"father" text,
"birth" text,
"marriage" text,
"became_duchess" text,
"ceased_to_be_duchess" text,
"death" text,
"spouse" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the duchess, who was married to philippe, die?`:
```sql
|
SELECT "ceased_to_be_duchess" FROM "house_of_savoy" WHERE "marriage"='22 may 1657'; |
## Task
Generate a SQL query to answer the following question:
`When did the woman, who was married 22 may 1657, cease to be the duchess?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "house_of_savoy" (
"name" text,
"father" text,
"birth" text,
"marriage" text,
"became_duchess" text,
"ceased_to_be_duchess" text,
"death" text,
"spouse" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the woman, who was married 22 may 1657, cease to be the duchess?`:
```sql
|
SELECT "score" FROM "fourth_round_proper" WHERE "tie_no"='3'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the game with a tie no of 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the game with a tie no of 3?`:
```sql
|
SELECT "away_team" FROM "fourth_round_proper" WHERE "date"='23 january 1982' AND "home_team"='sunderland'; |
## Task
Generate a SQL query to answer the following question:
`Who did home team sunderland play on 23 january 1982?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who did home team sunderland play on 23 january 1982?`:
```sql
|
SELECT "score" FROM "fourth_round_proper" WHERE "date"='23 january 1982' AND "away_team"='queens park rangers'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the game against away team queens park rangers on 23 january 1982?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the game against away team queens park rangers on 23 january 1982?`:
```sql
|
SELECT "score" FROM "fourth_round_proper" WHERE "tie_no"='6'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the game with a tie no of 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the game with a tie no of 6?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.