output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "state" FROM "final_competition_scores" WHERE "swimsuit"<9.277 AND "evening_gown">8.944 AND "preliminary"<8.483; |
## Task
Generate a SQL query to answer the following question:
`What state has a swimsuit less than 9.277, gown more than 8.944 and preliminary greater than 8.483?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_competition_scores" (
"state" text,
"preliminary" real,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What state has a swimsuit less than 9.277, gown more than 8.944 and preliminary greater than 8.483?`:
```sql
|
SELECT SUM("average") FROM "final_competition_scores" WHERE "interview"=9.465 AND "evening_gown"<9.454; |
## Task
Generate a SQL query to answer the following question:
`What is the average when interview is 9.465 and evening gown is less than 9.454?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_competition_scores" (
"state" text,
"preliminary" real,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average when interview is 9.465 and evening gown is less than 9.454?`:
```sql
|
SELECT MAX("preliminary") FROM "final_competition_scores" WHERE "state"='oklahoma' AND "evening_gown"<8.853; |
## Task
Generate a SQL query to answer the following question:
`What is the best preliminary score from a contestant from Oklahoma with evening gown less than 8.853?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_competition_scores" (
"state" text,
"preliminary" real,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the best preliminary score from a contestant from Oklahoma with evening gown less than 8.853?`:
```sql
|
SELECT "written_by" FROM "episodes" WHERE "originalairdate"='25 april 1993'; |
## Task
Generate a SQL query to answer the following question:
`What is Written By, when Originalairdate is 25 April 1993?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episodes" (
"episode_num" real,
"title" text,
"directed_by" text,
"written_by" text,
"originalairdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Written By, when Originalairdate is 25 April 1993?`:
```sql
|
SELECT "directed_by" FROM "episodes" WHERE "episode_num"=7; |
## Task
Generate a SQL query to answer the following question:
`What is Directed By, when Episode # is 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episodes" (
"episode_num" real,
"title" text,
"directed_by" text,
"written_by" text,
"originalairdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Directed By, when Episode # is 7?`:
```sql
|
SELECT MIN("avg_finish") FROM "nascar_sprint_cup_series" WHERE "position"='40th' AND "top_5">0; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE LOWEST AVERAGE FINISH FOR 40TH POSITION, WITH A TOP 5 LARGER THAN 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_sprint_cup_series" (
"year" text,
"starts" real,
"wins" real,
"top_5" real,
"top_10" real,
"poles" real,
"avg_start" real,
"avg_finish" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE LOWEST AVERAGE FINISH FOR 40TH POSITION, WITH A TOP 5 LARGER THAN 0?`:
```sql
|
SELECT "country" FROM "europe" WHERE "supermarkets"='50'; |
## Task
Generate a SQL query to answer the following question:
`What country has 50 supermarkets?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "europe" (
"country" text,
"first_store" text,
"hypermarkets" text,
"supermarkets" text,
"hard_discounters" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country has 50 supermarkets?`:
```sql
|
SELECT "country" FROM "europe" WHERE "supermarkets"='370'; |
## Task
Generate a SQL query to answer the following question:
`What country has 370 supermarkets?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "europe" (
"country" text,
"first_store" text,
"hypermarkets" text,
"supermarkets" text,
"hard_discounters" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country has 370 supermarkets?`:
```sql
|
SELECT "country" FROM "europe" WHERE "first_store"='1991' AND "hard_discounters"='397'; |
## Task
Generate a SQL query to answer the following question:
`What country has a fire store of 1991 and a hard discounter of 397?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "europe" (
"country" text,
"first_store" text,
"hypermarkets" text,
"supermarkets" text,
"hard_discounters" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country has a fire store of 1991 and a hard discounter of 397?`:
```sql
|
SELECT "engine" FROM "teams_and_drivers" WHERE "rounds"='all' AND "driver"='tsugio matsuda'; |
## Task
Generate a SQL query to answer the following question:
`Which engine is in all rounds with Tsugio Matsuda driving?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_drivers" (
"team" text,
"driver" text,
"chassis" text,
"engine" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which engine is in all rounds with Tsugio Matsuda driving?`:
```sql
|
SELECT "engine" FROM "teams_and_drivers" WHERE "team"='team lemans' AND "driver"='hiroaki ishiura'; |
## Task
Generate a SQL query to answer the following question:
`Which engine is used by Team Lemans with Hiroaki Ishiura driving?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_drivers" (
"team" text,
"driver" text,
"chassis" text,
"engine" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which engine is used by Team Lemans with Hiroaki Ishiura driving?`:
```sql
|
SELECT MIN("rank") FROM "eliminations_standing" WHERE "loss">3 AND "sets_lost"<25; |
## Task
Generate a SQL query to answer the following question:
`What is the least rank with more than 3 losses and less than 25 sets lost?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eliminations_standing" (
"rank" real,
"team" text,
"loss" real,
"sets_won" real,
"sets_lost" real,
"percentage" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least rank with more than 3 losses and less than 25 sets lost?`:
```sql
|
SELECT MIN("rank") FROM "eliminations_standing" WHERE "sets_won">16 AND "loss"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the least rank with more than 16 sets won and less than 1 loss?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eliminations_standing" (
"rank" real,
"team" text,
"loss" real,
"sets_won" real,
"sets_lost" real,
"percentage" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least rank with more than 16 sets won and less than 1 loss?`:
```sql
|
SELECT "home_team" FROM "fifth_round_proper" WHERE "away_team"='telford united'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home team when the away team was Telford United?`
### 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 `Who was the home team when the away team was Telford United?`:
```sql
|
SELECT "score" FROM "fifth_round_proper" WHERE "away_team"='west ham united'; |
## Task
Generate a SQL query to answer the following question:
`What was the score when the away team was West Ham United?`
### 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 score when the away team was West Ham United?`:
```sql
|
SELECT "tie_no" FROM "fifth_round_proper" WHERE "home_team"='west ham united'; |
## Task
Generate a SQL query to answer the following question:
`What is the Tie Number when the home team was West Ham United?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fifth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Tie Number when the home team was West Ham United?`:
```sql
|
SELECT "model_number" FROM "ultra_low_voltage_90_nm" WHERE "fsb_speed"='400 mhz'; |
## Task
Generate a SQL query to answer the following question:
`Name the Model Number which has a FSB Speed of 400 mhz?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ultra_low_voltage_90_nm" (
"model_number" text,
"clock_speed" text,
"l2_cache" text,
"fsb_speed" text,
"voltage_range" text,
"socket" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Model Number which has a FSB Speed of 400 mhz?`:
```sql
|
SELECT "voltage_range" FROM "ultra_low_voltage_90_nm" WHERE "fsb_speed"='400 mhz' AND "clock_speed"='1 ghz'; |
## Task
Generate a SQL query to answer the following question:
`Name the Voltage Range which has a FSB Speed of 400 mhz, and a Clock Speed of 1 ghz?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ultra_low_voltage_90_nm" (
"model_number" text,
"clock_speed" text,
"l2_cache" text,
"fsb_speed" text,
"voltage_range" text,
"socket" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Voltage Range which has a FSB Speed of 400 mhz, and a Clock Speed of 1 ghz?`:
```sql
|
SELECT "l2_cache" FROM "ultra_low_voltage_90_nm" WHERE "clock_speed"='1.5 ghz'; |
## Task
Generate a SQL query to answer the following question:
`Name the L2 Cache which has a Clock Speed of 1.5 ghz?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ultra_low_voltage_90_nm" (
"model_number" text,
"clock_speed" text,
"l2_cache" text,
"fsb_speed" text,
"voltage_range" text,
"socket" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the L2 Cache which has a Clock Speed of 1.5 ghz?`:
```sql
|
SELECT MIN("game") FROM "regular_season" WHERE "team"='orlando'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest game against Orlando?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest game against Orlando?`:
```sql
|
SELECT MAX("week") FROM "schedule" WHERE "attendance"='72,855'; |
## Task
Generate a SQL query to answer the following question:
`Which Week has an Attendance of 72,855?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Week has an Attendance of 72,855?`:
```sql
|
SELECT AVG("week") FROM "schedule" WHERE "date"='december 8, 1991'; |
## Task
Generate a SQL query to answer the following question:
`Which Week has a Date of december 8, 1991?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Week has a Date of december 8, 1991?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "date"='november 24, 1991'; |
## Task
Generate a SQL query to answer the following question:
`Which Opponent has a Date of november 24, 1991?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Opponent has a Date of november 24, 1991?`:
```sql
|
SELECT "location" FROM "the_200_most_topographically_isolated_su" WHERE "rank"=147; |
## Task
Generate a SQL query to answer the following question:
`Which location has a rank of 147?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "the_200_most_topographically_isolated_su" (
"rank" real,
"mountain_peak" text,
"state" text,
"mountain_range" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which location has a rank of 147?`:
```sql
|
SELECT "mountain_range" FROM "the_200_most_topographically_isolated_su" WHERE "mountain_peak"='sierra blanca peak'; |
## Task
Generate a SQL query to answer the following question:
`Which mountain range contains Sierra Blanca Peak?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "the_200_most_topographically_isolated_su" (
"rank" real,
"mountain_peak" text,
"state" text,
"mountain_range" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which mountain range contains Sierra Blanca Peak?`:
```sql
|
SELECT "location" FROM "the_200_most_topographically_isolated_su" WHERE "state"='oregon' AND "rank"<121 AND "mountain_peak"='mount mcloughlin'; |
## Task
Generate a SQL query to answer the following question:
`Which location is in Oregon, ranked under 121, and contains Mount McLoughlin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "the_200_most_topographically_isolated_su" (
"rank" real,
"mountain_peak" text,
"state" text,
"mountain_range" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which location is in Oregon, ranked under 121, and contains Mount McLoughlin?`:
```sql
|
SELECT "film_or_television_series_or_miniseries" FROM "golden_globe_awards_fictional_presidents" WHERE "year"=2001; |
## Task
Generate a SQL query to answer the following question:
`What is the film, television series, or miniseries with a nomination in 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "golden_globe_awards_fictional_presidents" (
"year" real,
"category" text,
"president" text,
"nominee" text,
"film_or_television_series_or_miniseries" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the film, television series, or miniseries with a nomination in 2001?`:
```sql
|
SELECT "year" FROM "golden_globe_awards_fictional_presidents" WHERE "nominee"='martin sheen'; |
## Task
Generate a SQL query to answer the following question:
`In what year was Martin Sheen nominated?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "golden_globe_awards_fictional_presidents" (
"year" real,
"category" text,
"president" text,
"nominee" text,
"film_or_television_series_or_miniseries" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what year was Martin Sheen nominated?`:
```sql
|
SELECT "president" FROM "golden_globe_awards_fictional_presidents" WHERE "year"=1999; |
## Task
Generate a SQL query to answer the following question:
`Who was the president in 1999?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "golden_globe_awards_fictional_presidents" (
"year" real,
"category" text,
"president" text,
"nominee" text,
"film_or_television_series_or_miniseries" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the president in 1999?`:
```sql
|
SELECT "date" FROM "matches" WHERE "status"='second test'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has a Status of second test?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "matches" (
"opposing_team" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date has a Status of second test?`:
```sql
|
SELECT "venue" FROM "matches" WHERE "against"=25; |
## Task
Generate a SQL query to answer the following question:
`Which Venue has an Against of 25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "matches" (
"opposing_team" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Venue has an Against of 25?`:
```sql
|
SELECT "status" FROM "matches" WHERE "date"='19/05/1981'; |
## Task
Generate a SQL query to answer the following question:
`Which Status has a Date of 19/05/1981?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "matches" (
"opposing_team" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Status has a Date of 19/05/1981?`:
```sql
|
SELECT COUNT("against") FROM "matches" WHERE "date"='30/05/1981'; |
## Task
Generate a SQL query to answer the following question:
`Which Against has a Date of 30/05/1981?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "matches" (
"opposing_team" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Against has a Date of 30/05/1981?`:
```sql
|
SELECT "date" FROM "matches" WHERE "against"<21 AND "status"='second test'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has an Against smaller than 21, and a Status of second test?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "matches" (
"opposing_team" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date has an Against smaller than 21, and a Status of second test?`:
```sql
|
SELECT "rochester" FROM "members_of_the_marcellus_formation_from_" WHERE "syracuse"='cardiff dark gray shale' AND "albany"='(mt. marion fm.)'; |
## Task
Generate a SQL query to answer the following question:
`What is Rochester, when Syracuse is Cardiff Dark Gray Shale, and when Albany is (Mt. Marion Fm.)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members_of_the_marcellus_formation_from_" (
"buffalo" text,
"rochester" text,
"syracuse" text,
"utica" text,
"albany" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Rochester, when Syracuse is Cardiff Dark Gray Shale, and when Albany is (Mt. Marion Fm.)?`:
```sql
|
SELECT "albany" FROM "members_of_the_marcellus_formation_from_" WHERE "buffalo"='oatka creek shale' AND "syracuse"='cardiff dark gray shale'; |
## Task
Generate a SQL query to answer the following question:
`What is Albany, when Buffalo is Oatka Creek Shale, and when Syracuse is Cardiff Dark Gray Shale?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members_of_the_marcellus_formation_from_" (
"buffalo" text,
"rochester" text,
"syracuse" text,
"utica" text,
"albany" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Albany, when Buffalo is Oatka Creek Shale, and when Syracuse is Cardiff Dark Gray Shale?`:
```sql
|
SELECT "syracuse" FROM "members_of_the_marcellus_formation_from_" WHERE "utica"='union springs shale and limestone' AND "rochester"='union springs shale and limestone'; |
## Task
Generate a SQL query to answer the following question:
`What is Syracuse, when Utica is Union Springs Shale And Limestone, and when Rochester is Union Springs Shale And Limestone?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members_of_the_marcellus_formation_from_" (
"buffalo" text,
"rochester" text,
"syracuse" text,
"utica" text,
"albany" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Syracuse, when Utica is Union Springs Shale And Limestone, and when Rochester is Union Springs Shale And Limestone?`:
```sql
|
SELECT "syracuse" FROM "members_of_the_marcellus_formation_from_" WHERE "utica"='solsville shale and sandstone'; |
## Task
Generate a SQL query to answer the following question:
`What is Syracuse, when Utica is Solsville Shale And Sandstone?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members_of_the_marcellus_formation_from_" (
"buffalo" text,
"rochester" text,
"syracuse" text,
"utica" text,
"albany" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Syracuse, when Utica is Solsville Shale And Sandstone?`:
```sql
|
SELECT "syracuse" FROM "members_of_the_marcellus_formation_from_" WHERE "buffalo"='oatka creek shale' AND "albany"='berne'; |
## Task
Generate a SQL query to answer the following question:
`What is Syracuse, when Buffalo is Oatka Creek Shale, and when Albany is Berne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members_of_the_marcellus_formation_from_" (
"buffalo" text,
"rochester" text,
"syracuse" text,
"utica" text,
"albany" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Syracuse, when Buffalo is Oatka Creek Shale, and when Albany is Berne?`:
```sql
|
SELECT "name" FROM "ice_dancing" WHERE "rank"=18; |
## Task
Generate a SQL query to answer the following question:
`What is the Name of the Players with a Rank of 18?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ice_dancing" (
"rank" real,
"name" text,
"nation" text,
"points" real,
"placings" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Name of the Players with a Rank of 18?`:
```sql
|
SELECT "points" FROM "ice_dancing" WHERE "placings">100 AND "rank"=17; |
## Task
Generate a SQL query to answer the following question:
`How many Points for the couple ranking 17 with Placings larger than 100?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ice_dancing" (
"rank" real,
"name" text,
"nation" text,
"points" real,
"placings" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Points for the couple ranking 17 with Placings larger than 100?`:
```sql
|
SELECT "rank" FROM "ice_dancing" WHERE "points"<408.8 AND "placings"=160; |
## Task
Generate a SQL query to answer the following question:
`What is the Rank of the couple with less than 408.8 Points and Placings of 160?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ice_dancing" (
"rank" real,
"name" text,
"nation" text,
"points" real,
"placings" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Rank of the couple with less than 408.8 Points and Placings of 160?`:
```sql
|
SELECT SUM("placings") FROM "ice_dancing" WHERE "rank"<7 AND "points"=514.55; |
## Task
Generate a SQL query to answer the following question:
`What is the Place of the couple with a Rank smaller than 7 and 514.55 Points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ice_dancing" (
"rank" real,
"name" text,
"nation" text,
"points" real,
"placings" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Place of the couple with a Rank smaller than 7 and 514.55 Points?`:
```sql
|
SELECT SUM("lane") FROM "heats" WHERE "mark"='47.02' AND "heat">5; |
## Task
Generate a SQL query to answer the following question:
`What is the total Lane with a Mark of 47.02, and a Heat higher than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"country" text,
"mark" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total Lane with a Mark of 47.02, and a Heat higher than 5?`:
```sql
|
SELECT MIN("heat") FROM "heats" WHERE "mark"='46.47'; |
## Task
Generate a SQL query to answer the following question:
`With a Mark of 46.47, What is the lowest Heat?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"country" text,
"mark" text
);
### SQL
Given the database schema, here is the SQL query that answers `With a Mark of 46.47, What is the lowest Heat?`:
```sql
|
SELECT "country" FROM "heats" WHERE "lane">3 AND "name"='richard buck'; |
## Task
Generate a SQL query to answer the following question:
`What is the Country that has Richard Buck Lane higher than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"country" text,
"mark" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Country that has Richard Buck Lane higher than 3?`:
```sql
|
SELECT "date_married" FROM "britain" WHERE "name_dates"='louise, princess royal'; |
## Task
Generate a SQL query to answer the following question:
`When did Louise, Princess royal get married?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "britain" (
"name_dates" text,
"eldest_daughter_from_date_to_date" text,
"father" text,
"date_married" text,
"husband_dates" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did Louise, Princess royal get married?`:
```sql
|
SELECT "djurg_rden_scorers" FROM "svenska_cupen_2005" WHERE "score"='2-1'; |
## Task
Generate a SQL query to answer the following question:
`What are the Djurgården scorers that have a Score of 2-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "svenska_cupen_2005" (
"date" text,
"venue" text,
"opponents" text,
"score" text,
"round" text,
"djurg_rden_scorers" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the Djurgården scorers that have a Score of 2-1?`:
```sql
|
SELECT "opponents" FROM "svenska_cupen_2005" WHERE "djurg_rden_scorers"='sjölund (2)'; |
## Task
Generate a SQL query to answer the following question:
`What are the Opponents that have Djurgården scorers of sjölund (2)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "svenska_cupen_2005" (
"date" text,
"venue" text,
"opponents" text,
"score" text,
"round" text,
"djurg_rden_scorers" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the Opponents that have Djurgården scorers of sjölund (2)?`:
```sql
|
SELECT "score" FROM "svenska_cupen_2005" WHERE "date"='2005-10-29'; |
## Task
Generate a SQL query to answer the following question:
`What is the Score that has a Date of 2005-10-29?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "svenska_cupen_2005" (
"date" text,
"venue" text,
"opponents" text,
"score" text,
"round" text,
"djurg_rden_scorers" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Score that has a Date of 2005-10-29?`:
```sql
|
SELECT "score" FROM "svenska_cupen_2005" WHERE "attendance"='4 679'; |
## Task
Generate a SQL query to answer the following question:
`What is the Score that has an Attendance of 4 679?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "svenska_cupen_2005" (
"date" text,
"venue" text,
"opponents" text,
"score" text,
"round" text,
"djurg_rden_scorers" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Score that has an Attendance of 4 679?`:
```sql
|
SELECT "date" FROM "svenska_cupen_2005" WHERE "round"='semifinal'; |
## Task
Generate a SQL query to answer the following question:
`What is the Date that has a Round of semifinal?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "svenska_cupen_2005" (
"date" text,
"venue" text,
"opponents" text,
"score" text,
"round" text,
"djurg_rden_scorers" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Date that has a Round of semifinal?`:
```sql
|
SELECT MAX("round") FROM "washington_redskins_draft_history" WHERE "college"='arizona' AND "overall">120; |
## Task
Generate a SQL query to answer the following question:
`Which Round is the highest one that has a College of arizona, and an Overall larger than 120?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "washington_redskins_draft_history" (
"round" real,
"pick" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Round is the highest one that has a College of arizona, and an Overall larger than 120?`:
```sql
|
SELECT SUM("pick") FROM "washington_redskins_draft_history" WHERE "name"='ed hickerson' AND "round"<10; |
## Task
Generate a SQL query to answer the following question:
`Which Pick has a Name of ed hickerson, and a Round smaller than 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "washington_redskins_draft_history" (
"round" real,
"pick" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Pick has a Name of ed hickerson, and a Round smaller than 10?`:
```sql
|
SELECT COUNT("overall") FROM "washington_redskins_draft_history" WHERE "pick"=10 AND "round"<8 AND "position"='e' AND "college"='tennessee'; |
## Task
Generate a SQL query to answer the following question:
`How much Overall has a Pick of 10, and a Round smaller than 8, and a Position of e, and a College of tennessee?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "washington_redskins_draft_history" (
"round" real,
"pick" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `How much Overall has a Pick of 10, and a Round smaller than 8, and a Position of e, and a College of tennessee?`:
```sql
|
SELECT "date" FROM "first_round_proper" WHERE "away_team"='morecambe'; |
## Task
Generate a SQL query to answer the following question:
`What date was the away team Morecambe?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the away team Morecambe?`:
```sql
|
SELECT "away_team" FROM "first_round_proper" WHERE "home_team"='grimsby town'; |
## Task
Generate a SQL query to answer the following question:
`What team was the away team when the home team was Grimsby Town?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the away team when the home team was Grimsby Town?`:
```sql
|
SELECT "away_team" FROM "first_round_proper" WHERE "home_team"='hereford united'; |
## Task
Generate a SQL query to answer the following question:
`What team was the away team when the home team was Hereford United?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the away team when the home team was Hereford United?`:
```sql
|
SELECT "away_team" FROM "first_round_proper" WHERE "tie_no"='40'; |
## Task
Generate a SQL query to answer the following question:
`What team was the away team when the tie no is 40?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the away team when the tie no is 40?`:
```sql
|
SELECT "1st_leg" FROM "second_preliminary_round" WHERE "agg"='151-134'; |
## Task
Generate a SQL query to answer the following question:
`What was the 1st leg score for the team with an Agg score of 151-134?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_preliminary_round" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the 1st leg score for the team with an Agg score of 151-134?`:
```sql
|
SELECT "1st_leg" FROM "second_preliminary_round" WHERE "team_num1"='unics kazan'; |
## Task
Generate a SQL query to answer the following question:
`What was the team Unics Kazan's 1st leg score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_preliminary_round" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the team Unics Kazan's 1st leg score?`:
```sql
|
SELECT "team_num1" FROM "second_preliminary_round" WHERE "team_num2"='kalise gran canaria'; |
## Task
Generate a SQL query to answer the following question:
`Who was the first team when the second team was Kalise Gran Canaria?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_preliminary_round" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the first team when the second team was Kalise Gran Canaria?`:
```sql
|
SELECT "team_num2" FROM "second_preliminary_round" WHERE "1st_leg"='83-69'; |
## Task
Generate a SQL query to answer the following question:
`Which second team had a first leg score of 83-69?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_preliminary_round" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which second team had a first leg score of 83-69?`:
```sql
|
SELECT "team_num1" FROM "second_preliminary_round" WHERE "2nd_leg"='88-83'; |
## Task
Generate a SQL query to answer the following question:
`Which Team #1 had a 2nd leg score of 88-83?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_preliminary_round" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Team #1 had a 2nd leg score of 88-83?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "game"=30; |
## Task
Generate a SQL query to answer the following question:
`What was the score of game 30?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of game 30?`:
```sql
|
SELECT "high_points" FROM "game_log" WHERE "team"='toronto'; |
## Task
Generate a SQL query to answer the following question:
`Who was the high scorer in the Toronto game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the high scorer in the Toronto game?`:
```sql
|
SELECT MAX("october") FROM "schedule_and_results" WHERE "record"='4-4-0' AND "game">8; |
## Task
Generate a SQL query to answer the following question:
`What is the highest date in october for a game number larger than 8 with a record of 4-4-0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"october" real,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest date in october for a game number larger than 8 with a record of 4-4-0?`:
```sql
|
SELECT "total" FROM "missed_the_cut" WHERE "country"='united states' AND "to_par"<14 AND "player"='tom watson'; |
## Task
Generate a SQL query to answer the following question:
`When the tom watson is playing for the United States and the To par is under 14, what's the total?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" text,
"to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `When the tom watson is playing for the United States and the To par is under 14, what's the total?`:
```sql
|
SELECT "player" FROM "missed_the_cut" WHERE "total"='158'; |
## Task
Generate a SQL query to answer the following question:
`What player has a total of 158/`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" text,
"to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `What player has a total of 158/`:
```sql
|
SELECT "player" FROM "missed_the_cut" WHERE "total"='wd' AND "to_par"<16 AND "year_s_won"='1967'; |
## Task
Generate a SQL query to answer the following question:
`If 1967 is the winning year and a player has a total recorded as wd with a To par under 16, what's the players name?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" text,
"to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `If 1967 is the winning year and a player has a total recorded as wd with a To par under 16, what's the players name?`:
```sql
|
SELECT "kicks" FROM "statistics" WHERE "games"='7'; |
## Task
Generate a SQL query to answer the following question:
`How many kicks did he get in the year when he played 7 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics" (
"season" text,
"team" text,
"games" text,
"disposals" text,
"kicks" text,
"handballs" text,
"marks" text,
"tackles" text,
"goals" text,
"behinds" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many kicks did he get in the year when he played 7 games?`:
```sql
|
SELECT "marks" FROM "statistics" WHERE "season"='2005'; |
## Task
Generate a SQL query to answer the following question:
`How many marks did he get in 2005?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics" (
"season" text,
"team" text,
"games" text,
"disposals" text,
"kicks" text,
"handballs" text,
"marks" text,
"tackles" text,
"goals" text,
"behinds" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many marks did he get in 2005?`:
```sql
|
SELECT "west_ham_wins" FROM "record_by_competition" WHERE "millwall_wins">5 AND "millwall_goals">23 AND "drawn"=8; |
## Task
Generate a SQL query to answer the following question:
`How many wins did West Ham get when Millwall had more than 23 goal and 5 wins, and they tied 8 times?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "record_by_competition" (
"competition" text,
"played" real,
"millwall_wins" real,
"drawn" real,
"west_ham_wins" real,
"millwall_goals" real,
"west_ham_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins did West Ham get when Millwall had more than 23 goal and 5 wins, and they tied 8 times?`:
```sql
|
SELECT MIN("west_ham_wins") FROM "record_by_competition" WHERE "drawn">27; |
## Task
Generate a SQL query to answer the following question:
`What is the least number of wins West Ham got when they tied 27 times?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "record_by_competition" (
"competition" text,
"played" real,
"millwall_wins" real,
"drawn" real,
"west_ham_wins" real,
"millwall_goals" real,
"west_ham_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least number of wins West Ham got when they tied 27 times?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "date"='october 22, 2000'; |
## Task
Generate a SQL query to answer the following question:
`what is the attendance when the date is october 22, 2000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the attendance when the date is october 22, 2000?`:
```sql
|
SELECT MAX("2000") FROM "share_of_global_gdp_ppp_pct" WHERE "1950"=3.5 AND "1970">3.4; |
## Task
Generate a SQL query to answer the following question:
`What is the highest value for 2000, when the value for 1950 is 3.5, and when the value for 1970 is greater than 3.4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "share_of_global_gdp_ppp_pct" (
"region" text,
"1950" real,
"1960" real,
"1970" real,
"1980" real,
"1990" real,
"2000" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest value for 2000, when the value for 1950 is 3.5, and when the value for 1970 is greater than 3.4?`:
```sql
|
SELECT MIN("1990") FROM "share_of_global_gdp_ppp_pct" WHERE "region"='east asia (10 economies)' AND "1960"<12.6; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest value for 1990, when the Region is East Asia (10 Economies), and when 1960 has a value less than 12.6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "share_of_global_gdp_ppp_pct" (
"region" text,
"1950" real,
"1960" real,
"1970" real,
"1980" real,
"1990" real,
"2000" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest value for 1990, when the Region is East Asia (10 Economies), and when 1960 has a value less than 12.6?`:
```sql
|
SELECT AVG("1970") FROM "share_of_global_gdp_ppp_pct" WHERE "region"='east europe (7 economies)' AND "2000">2; |
## Task
Generate a SQL query to answer the following question:
`What is the average value for 1970, when the Region is East Europe (7 Economies), and when 2000 has a value greater than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "share_of_global_gdp_ppp_pct" (
"region" text,
"1950" real,
"1960" real,
"1970" real,
"1980" real,
"1990" real,
"2000" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average value for 1970, when the Region is East Europe (7 Economies), and when 2000 has a value greater than 2?`:
```sql
|
SELECT MAX("1970") FROM "share_of_global_gdp_ppp_pct" WHERE "1960"<61.9 AND "1980"<3.8 AND "1990"=3.3 AND "2000">3.2; |
## Task
Generate a SQL query to answer the following question:
`What is the highest value for 1970, when the value for 1960 is less than 61.9, when the value for 1980 is less than 3.8, when the value for 1990 is 3.3, and when the value for 2000 is greater than 3.2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "share_of_global_gdp_ppp_pct" (
"region" text,
"1950" real,
"1960" real,
"1970" real,
"1980" real,
"1990" real,
"2000" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest value for 1970, when the value for 1960 is less than 61.9, when the value for 1980 is less than 3.8, when the value for 1990 is 3.3, and when the value for 2000 is greater than 3.2?`:
```sql
|
SELECT MIN("1960") FROM "share_of_global_gdp_ppp_pct" WHERE "2000"<8.4 AND "1950">3.5 AND "1990"<3.3; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest value for 1960, when the value for 2000 is less than 8.4, when the value for 1950 is greater than 3.5, and when the value for 1990 is less than 3.3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "share_of_global_gdp_ppp_pct" (
"region" text,
"1950" real,
"1960" real,
"1970" real,
"1980" real,
"1990" real,
"2000" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest value for 1960, when the value for 2000 is less than 8.4, when the value for 1950 is greater than 3.5, and when the value for 1990 is less than 3.3?`:
```sql
|
SELECT AVG("drawn") FROM "final_table" WHERE "played">42; |
## Task
Generate a SQL query to answer the following question:
`What average drawn has a played greater than 42?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" real
);
### SQL
Given the database schema, here is the SQL query that answers `What average drawn has a played greater than 42?`:
```sql
|
SELECT MAX("played") FROM "final_table" WHERE "position"<17 AND "goals_for"=63; |
## Task
Generate a SQL query to answer the following question:
`What is the highest played that has a position less than 17, and 63 as the goals for?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest played that has a position less than 17, and 63 as the goals for?`:
```sql
|
SELECT MIN("played") FROM "final_table" WHERE "position">6 AND "goals_against"=61 AND "lost"<16; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest played that has a position greater than 6, 61 as the goals against, with a loss less than 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest played that has a position greater than 6, 61 as the goals against, with a loss less than 16?`:
```sql
|
SELECT MAX("goals_for") FROM "final_table" WHERE "drawn"<11 AND "played"<42; |
## Task
Generate a SQL query to answer the following question:
`What is the highest goals for that has a drawn less than 11, with a played less than 42?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest goals for that has a drawn less than 11, with a played less than 42?`:
```sql
|
SELECT AVG("goals_for") FROM "final_table" WHERE "goal_difference"='+40' AND "points_1">55; |
## Task
Generate a SQL query to answer the following question:
`What is the average goals for that has +40 as the goals difference, with points 1 greater than 55?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average goals for that has +40 as the goals difference, with points 1 greater than 55?`:
```sql
|
SELECT AVG("total") FROM "missed_the_cut" WHERE "to_par"=15; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the average Total that has the To par of 15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the average Total that has the To par of 15?`:
```sql
|
SELECT "country" FROM "missed_the_cut" WHERE "to_par">9 AND "year_s_won"='1984'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Country that has the To par larger than 9, and the Year(s) won of 1984?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Country that has the To par larger than 9, and the Year(s) won of 1984?`:
```sql
|
SELECT "producer_s" FROM "turkish_cd_track_listings" WHERE "length"='4:16'; |
## Task
Generate a SQL query to answer the following question:
`Who produced the track that is 4:16 long?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "turkish_cd_track_listings" (
"track" real,
"title" text,
"songwriter_s" text,
"producer_s" text,
"length" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who produced the track that is 4:16 long?`:
```sql
|
SELECT "producer_s" FROM "turkish_cd_track_listings" WHERE "track"=7; |
## Task
Generate a SQL query to answer the following question:
`Who produced track 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "turkish_cd_track_listings" (
"track" real,
"title" text,
"songwriter_s" text,
"producer_s" text,
"length" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who produced track 7?`:
```sql
|
SELECT "contract_length" FROM "contracts" WHERE "status"='rejected'; |
## Task
Generate a SQL query to answer the following question:
`What is the contract length when rejected is the status?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "contracts" (
"nat" text,
"name" text,
"status" text,
"contract_length" text,
"expiry_date" real,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the contract length when rejected is the status?`:
```sql
|
SELECT AVG("drawn") FROM "first_round" WHERE "points">15 AND "lost"=1 AND "played"<14; |
## Task
Generate a SQL query to answer the following question:
`what is the average drawn when the points is more than 15, lost is 1 and played is 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 is the average drawn when the points is more than 15, lost is 1 and played is less than 14?`:
```sql
|
SELECT MIN("position") FROM "first_round" WHERE "points">11 AND "name"='ea schongau' AND "lost"<3; |
## Task
Generate a SQL query to answer the following question:
`what is the lowest position when points is more than 11, name is ea schongau and lost is less than 3?`
### 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 lowest position when points is more than 11, name is ea schongau and lost is less than 3?`:
```sql
|
SELECT AVG("lost") FROM "first_round" WHERE "played">14; |
## Task
Generate a SQL query to answer the following question:
`what is the average lost when played is more 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 is the average lost when played is more than 14?`:
```sql
|
SELECT SUM("drawn") FROM "first_round" WHERE "points"<15 AND "lost"=8 AND "position">6; |
## Task
Generate a SQL query to answer the following question:
`what is the sum of drawn when points is less than 15, lost is 8 and position is more than 6?`
### 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 sum of drawn when points is less than 15, lost is 8 and position is more than 6?`:
```sql
|
SELECT MIN("points") FROM "first_round" WHERE "name"='ehc münchen ii' AND "position"<7; |
## Task
Generate a SQL query to answer the following question:
`what is the lowest points when name is ehc münchen ii and position is less than 7?`
### 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 lowest points when name is ehc münchen ii and position is less than 7?`:
```sql
|
SELECT "result" FROM "season_schedule" WHERE "week"<9 AND "attendance"='25,188'; |
## Task
Generate a SQL query to answer the following question:
`what is the result when the week is earlier than 9 and attendance is 25,188?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"record" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the result when the week is earlier than 9 and attendance is 25,188?`:
```sql
|
SELECT "team" FROM "game_log" WHERE "high_points"='rashard lewis (18)'; |
## Task
Generate a SQL query to answer the following question:
`What is Team, when High Points is "Rashard Lewis (18)"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Team, when High Points is "Rashard Lewis (18)"?`:
```sql
|
SELECT "high_rebounds" FROM "game_log" WHERE "high_assists"='rafer alston , rashard lewis , hedo türkoğlu (3)'; |
## Task
Generate a SQL query to answer the following question:
`What is High Rebounds, when High Assists is "Rafer Alston , Rashard Lewis , Hedo Türkoğlu (3)"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is High Rebounds, when High Assists is "Rafer Alston , Rashard Lewis , Hedo Türkoğlu (3)"?`:
```sql
|
SELECT "team" FROM "game_log" WHERE "high_points"='rashard lewis , mickaël piétrus (17)'; |
## Task
Generate a SQL query to answer the following question:
`What is Team, when High Points is "Rashard Lewis , Mickaël Piétrus (17)"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Team, when High Points is "Rashard Lewis , Mickaël Piétrus (17)"?`:
```sql
|
SELECT MAX("game") FROM "game_log" WHERE "team"='celtics' AND "high_assists"='hedo türkoğlu (4)'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Game, when Team is "Celtics", and when High Assists is "Hedo Türkoğlu (4)"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Game, when Team is "Celtics", and when High Assists is "Hedo Türkoğlu (4)"?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.