output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "area" FROM "dunedin_city" WHERE "authority"='state' AND "decile">6 AND "gender"='coed' AND "roll"=26; |
## Task
Generate a SQL query to answer the following question:
`Where is the coed school with state authority, a Decile larger than 6 and 26 enrolled?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dunedin_city" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `Where is the coed school with state authority, a Decile larger than 6 and 26 enrolled?`:
```sql
|
SELECT AVG("roll") FROM "dunedin_city" WHERE "name"='fairfield school'; |
## Task
Generate a SQL query to answer the following question:
`What is the average roll for Fairfield school?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dunedin_city" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average roll for Fairfield school?`:
```sql
|
SELECT "name" FROM "dunedin_city" WHERE "roll">26 AND "area"='fairfield'; |
## Task
Generate a SQL query to answer the following question:
`Which school has a roll larger than 26 and is located in Fairfield?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dunedin_city" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which school has a roll larger than 26 and is located in Fairfield?`:
```sql
|
SELECT COUNT("points") FROM "world_championship_results" WHERE "chassis"='porsche 718' AND "year"<1964; |
## Task
Generate a SQL query to answer the following question:
`how many points are there for a Chassis of porsche 718, and a Year smaller than 1964?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `how many points are there for a Chassis of porsche 718, and a Year smaller than 1964?`:
```sql
|
SELECT "engine" FROM "world_championship_results" WHERE "points"=0 AND "chassis"='porsche 718' AND "year"=1961; |
## Task
Generate a SQL query to answer the following question:
`what is the engine that saw 0 points, and a Chassis of porsche 718, in 1961?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the engine that saw 0 points, and a Chassis of porsche 718, in 1961?`:
```sql
|
SELECT "engine" FROM "world_championship_results" WHERE "chassis"='porsche 718' AND "points"=0 AND "year"<1964; |
## Task
Generate a SQL query to answer the following question:
`what is the engine that saw a Chassis of porsche 718, and 0 points, prior to 1964?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the engine that saw a Chassis of porsche 718, and 0 points, prior to 1964?`:
```sql
|
SELECT "bronze" FROM "medal_table" WHERE "nation"='poland'; |
## Task
Generate a SQL query to answer the following question:
`Which bronze has a Nation of poland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" text,
"silver" text,
"bronze" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which bronze has a Nation of poland?`:
```sql
|
SELECT "gold" FROM "medal_table" WHERE "silver"='3' AND "total"='5'; |
## Task
Generate a SQL query to answer the following question:
`Which gold has 3 silver and a Total of 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" text,
"silver" text,
"bronze" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which gold has 3 silver and a Total of 5?`:
```sql
|
SELECT "gold" FROM "medal_table" WHERE "bronze"='1' AND "rank"='47' AND "nation"='spain'; |
## Task
Generate a SQL query to answer the following question:
`Which gold has a Bronze of 1, a Rank of 47, and a Nation of spain?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" text,
"silver" text,
"bronze" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which gold has a Bronze of 1, a Rank of 47, and a Nation of spain?`:
```sql
|
SELECT "nation" FROM "medal_table" WHERE "silver"='1' AND "gold"='0' AND "total"='1'; |
## Task
Generate a SQL query to answer the following question:
`Which nation has a Silver of 1, a Gold of 0, and a Total of 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" text,
"silver" text,
"bronze" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which nation has a Silver of 1, a Gold of 0, and a Total of 1?`:
```sql
|
SELECT "bronze" FROM "medal_table" WHERE "rank"='37'; |
## Task
Generate a SQL query to answer the following question:
`Which bronze has a Rank of 37?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" text,
"silver" text,
"bronze" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which bronze has a Rank of 37?`:
```sql
|
SELECT "silver" FROM "medal_table" WHERE "bronze"='1' AND "total"='4' AND "nation"='slovakia'; |
## Task
Generate a SQL query to answer the following question:
`Which silver has a Bronze of 1, a Total of 4, and a Nation of slovakia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" text,
"silver" text,
"bronze" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which silver has a Bronze of 1, a Total of 4, and a Nation of slovakia?`:
```sql
|
SELECT "issue_date_s" FROM "notes" WHERE "volume_issue"='32:18-19'; |
## Task
Generate a SQL query to answer the following question:
`What is the Issue Date(s) of Volume:Issue of 32:18-19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notes" (
"volume_issue" text,
"issue_date_s" text,
"weeks_on_top" real,
"song" text,
"artist" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Issue Date(s) of Volume:Issue of 32:18-19?`:
```sql
|
SELECT "weeks_on_top" FROM "notes" WHERE "volume_issue"='32:26-33:5'; |
## Task
Generate a SQL query to answer the following question:
`Volume:Issue of 32:26-33:5 was how many Weeks on Top?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notes" (
"volume_issue" text,
"issue_date_s" text,
"weeks_on_top" real,
"song" text,
"artist" text
);
### SQL
Given the database schema, here is the SQL query that answers `Volume:Issue of 32:26-33:5 was how many Weeks on Top?`:
```sql
|
SELECT MIN("laps") FROM "indy_500_results" WHERE "qual"='138.750'; |
## Task
Generate a SQL query to answer the following question:
`What car had the fewest laps with a qual of 138.750?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `What car had the fewest laps with a qual of 138.750?`:
```sql
|
SELECT "laps" FROM "indy_500_results" WHERE "qual"='138.750'; |
## Task
Generate a SQL query to answer the following question:
`How many laps were there for the car with a qual of 138.750?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many laps were there for the car with a qual of 138.750?`:
```sql
|
SELECT "rank" FROM "indy_500_results" WHERE "qual"='134.288'; |
## Task
Generate a SQL query to answer the following question:
`For the car with a qual of 134.288, what was the rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `For the car with a qual of 134.288, what was the rank?`:
```sql
|
SELECT "finish" FROM "indy_500_results" WHERE "year"='1953'; |
## Task
Generate a SQL query to answer the following question:
`What was the finishing place for 1953?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the finishing place for 1953?`:
```sql
|
SELECT "name" FROM "class" WHERE "laid_down"='22 september 1939' AND "commissioned"='30 august 1941'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the name for commissioned of 30 august 1941 and laid down of 22 september 1939`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "class" (
"name" text,
"pennant" text,
"builder" text,
"laid_down" text,
"launched" text,
"commissioned" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the name for commissioned of 30 august 1941 and laid down of 22 september 1939`:
```sql
|
SELECT "score" FROM "game_log" WHERE "loss"='birkbeck (0β3)'; |
## Task
Generate a SQL query to answer the following question:
`What is the score when there was a Loss of birkbeck (0β3)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score when there was a Loss of birkbeck (0β3)?`:
```sql
|
SELECT "gpu" FROM "bioinformatics" WHERE "application"='cushaw'; |
## Task
Generate a SQL query to answer the following question:
`Which GPU has the cushaw application?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bioinformatics" (
"application" text,
"expected_speed_up" text,
"gpu" text,
"multi_gpu_support" text,
"release_status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which GPU has the cushaw application?`:
```sql
|
SELECT "expected_speed_up" FROM "bioinformatics" WHERE "application"='gpu-hmmer'; |
## Task
Generate a SQL query to answer the following question:
`What is the expected speed up of the gpu-hmmer application?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bioinformatics" (
"application" text,
"expected_speed_up" text,
"gpu" text,
"multi_gpu_support" text,
"release_status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the expected speed up of the gpu-hmmer application?`:
```sql
|
SELECT "host_team" FROM "1999" WHERE "stadium"='cleveland browns stadium'; |
## Task
Generate a SQL query to answer the following question:
`Who was the host team at the game at the Cleveland Browns Stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1999" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the host team at the game at the Cleveland Browns Stadium?`:
```sql
|
SELECT "final_score" FROM "1999" WHERE "visiting_team"='buffalo bills'; |
## Task
Generate a SQL query to answer the following question:
`What was the final score when the Buffalo Bills were the visiting team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1999" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the final score when the Buffalo Bills were the visiting team?`:
```sql
|
SELECT "final_score" FROM "1999" WHERE "visiting_team"='denver broncos'; |
## Task
Generate a SQL query to answer the following question:
`What was the final score when the Denver Broncos were the visiting team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1999" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the final score when the Denver Broncos were the visiting team?`:
```sql
|
SELECT "date" FROM "1999" WHERE "stadium"='alltel stadium' AND "final_score"='6-20'; |
## Task
Generate a SQL query to answer the following question:
`What is the date that a game at the Alltel Stadium had a final score of 6-20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1999" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date that a game at the Alltel Stadium had a final score of 6-20?`:
```sql
|
SELECT AVG("season") FROM "by_season" WHERE "2nd_pl"<2 AND "3rd_pl">6; |
## Task
Generate a SQL query to answer the following question:
`what is the average season when results is less than 2 times in 2nd and more than 6 times in 3rd?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_season" (
"season" real,
"champion" text,
"motorcycle" text,
"wins" real,
"2nd_pl" real,
"3rd_pl" real,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the average season when results is less than 2 times in 2nd and more than 6 times in 3rd?`:
```sql
|
SELECT SUM("2nd_pl") FROM "by_season" WHERE "motorcycle"='ducati 916' AND "wins"<7; |
## Task
Generate a SQL query to answer the following question:
`How many times was the motorcycle ducati 916 2nd place when wins is less than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_season" (
"season" real,
"champion" text,
"motorcycle" text,
"wins" real,
"2nd_pl" real,
"3rd_pl" real,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many times was the motorcycle ducati 916 2nd place when wins is less than 7?`:
```sql
|
SELECT "champion" FROM "by_season" WHERE "motorcycle"='ducati 916' AND "2nd_pl"<5; |
## Task
Generate a SQL query to answer the following question:
`Who is the champion when the motorcycle is ducati 916 and 2nd place is less than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_season" (
"season" real,
"champion" text,
"motorcycle" text,
"wins" real,
"2nd_pl" real,
"3rd_pl" real,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the champion when the motorcycle is ducati 916 and 2nd place is less than 5?`:
```sql
|
SELECT "catalog" FROM "release_history" WHERE "label"='alfa records' AND "date"='november 21, 1980'; |
## Task
Generate a SQL query to answer the following question:
`What Catalog has a label of Alfa records and a date of November 21, 1980?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Catalog has a label of Alfa records and a date of November 21, 1980?`:
```sql
|
SELECT "catalog" FROM "release_history" WHERE "format"='ed remaster cd' AND "date"='december 19, 2001'; |
## Task
Generate a SQL query to answer the following question:
`What catalog has a format of ED remaster CD and a date of December 19, 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What catalog has a format of ED remaster CD and a date of December 19, 2001?`:
```sql
|
SELECT "date" FROM "release_history" WHERE "label"='alfa records'; |
## Task
Generate a SQL query to answer the following question:
`What Date has a label of alfa records?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Date has a label of alfa records?`:
```sql
|
SELECT "region" FROM "release_history" WHERE "label"='alfa records' AND "date"='january 23, 1987'; |
## Task
Generate a SQL query to answer the following question:
`What region has the label of alfa records and the date of January 23, 1987?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What region has the label of alfa records and the date of January 23, 1987?`:
```sql
|
SELECT "date" FROM "release_history" WHERE "format"='cd' AND "catalog"='alca-274'; |
## Task
Generate a SQL query to answer the following question:
`What date has the format of CD and catalog of alca-274?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date has the format of CD and catalog of alca-274?`:
```sql
|
SELECT "date" FROM "release_history" WHERE "format"='cd'; |
## Task
Generate a SQL query to answer the following question:
`What date has the format of cd?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date has the format of cd?`:
```sql
|
SELECT "decile" FROM "otorohanga_district" WHERE "name"='st mary''s catholic school'; |
## Task
Generate a SQL query to answer the following question:
`What is the Decile number for St Mary's Catholic School?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "otorohanga_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Decile number for St Mary's Catholic School?`:
```sql
|
SELECT "authority" FROM "otorohanga_district" WHERE "name"='hauturu school'; |
## Task
Generate a SQL query to answer the following question:
`Which Authority is set for Hauturu School?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "otorohanga_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Authority is set for Hauturu School?`:
```sql
|
SELECT "name" FROM "otorohanga_district" WHERE "area"='kio kio'; |
## Task
Generate a SQL query to answer the following question:
`What School is in the kio kio area?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "otorohanga_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `What School is in the kio kio area?`:
```sql
|
SELECT "race" FROM "2012_tt_results" WHERE "position"='5th'; |
## Task
Generate a SQL query to answer the following question:
`What race is in the 5th position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2012_tt_results" (
"race" text,
"position" text,
"time_hh_mm_ss" text,
"speed_mph" text,
"replica" text
);
### SQL
Given the database schema, here is the SQL query that answers `What race is in the 5th position?`:
```sql
|
SELECT "replica" FROM "2012_tt_results" WHERE "race"='supersport race 1'; |
## Task
Generate a SQL query to answer the following question:
`What Replica has a race of supersport race 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2012_tt_results" (
"race" text,
"position" text,
"time_hh_mm_ss" text,
"speed_mph" text,
"replica" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Replica has a race of supersport race 1?`:
```sql
|
SELECT "replica" FROM "2012_tt_results" WHERE "position"='5th'; |
## Task
Generate a SQL query to answer the following question:
`What replica has the 5th position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2012_tt_results" (
"race" text,
"position" text,
"time_hh_mm_ss" text,
"speed_mph" text,
"replica" text
);
### SQL
Given the database schema, here is the SQL query that answers `What replica has the 5th position?`:
```sql
|
SELECT "decimal" FROM "32_bit_systems" WHERE "byte_string"='standard' AND "model"='sigma 7'; |
## Task
Generate a SQL query to answer the following question:
`When a Sigma 7 has a standard byte string, what is the value for the decimal?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "32_bit_systems" (
"model" text,
"floating_point" text,
"decimal" text,
"byte_string" text,
"memory_map" text,
"max_memory_kwords" real
);
### SQL
Given the database schema, here is the SQL query that answers `When a Sigma 7 has a standard byte string, what is the value for the decimal?`:
```sql
|
SELECT "byte_string" FROM "32_bit_systems" WHERE "memory_map"='standard' AND "decimal"='standard' AND "floating_point"='standard' AND "max_memory_kwords"<512; |
## Task
Generate a SQL query to answer the following question:
`What is the value for the byte string when the memory map, decimal, and floating points are all standard and the max memory is smaller than 512?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "32_bit_systems" (
"model" text,
"floating_point" text,
"decimal" text,
"byte_string" text,
"memory_map" text,
"max_memory_kwords" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the value for the byte string when the memory map, decimal, and floating points are all standard and the max memory is smaller than 512?`:
```sql
|
SELECT "model" FROM "32_bit_systems" WHERE "byte_string"='standard' AND "floating_point"='standard'; |
## Task
Generate a SQL query to answer the following question:
`What model has both a standard byte string and floating-point?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "32_bit_systems" (
"model" text,
"floating_point" text,
"decimal" text,
"byte_string" text,
"memory_map" text,
"max_memory_kwords" real
);
### SQL
Given the database schema, here is the SQL query that answers `What model has both a standard byte string and floating-point?`:
```sql
|
SELECT "memory_map" FROM "32_bit_systems" WHERE "byte_string"='standard' AND "max_memory_kwords">128 AND "model"='sigma 9'; |
## Task
Generate a SQL query to answer the following question:
`On a Sigma 9 with a standard byte string and more than 128 max memory, what is the value of the memory map?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "32_bit_systems" (
"model" text,
"floating_point" text,
"decimal" text,
"byte_string" text,
"memory_map" text,
"max_memory_kwords" real
);
### SQL
Given the database schema, here is the SQL query that answers `On a Sigma 9 with a standard byte string and more than 128 max memory, what is the value of the memory map?`:
```sql
|
SELECT "decimal" FROM "32_bit_systems" WHERE "byte_string"='standard' AND "memory_map"='standard' AND "max_memory_kwords"=512; |
## Task
Generate a SQL query to answer the following question:
`What is the decimal value when the memory map and byte string are standard, and the max memory is 512?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "32_bit_systems" (
"model" text,
"floating_point" text,
"decimal" text,
"byte_string" text,
"memory_map" text,
"max_memory_kwords" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the decimal value when the memory map and byte string are standard, and the max memory is 512?`:
```sql
|
SELECT "co_drivers" FROM "24_hours_of_le_mans_results" WHERE "pos"='dnf' AND "class"='gt1'; |
## Task
Generate a SQL query to answer the following question:
`Who was the co-driver in the DNF position in the GT1 class?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"pos" text,
"class_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the co-driver in the DNF position in the GT1 class?`:
```sql
|
SELECT "co_drivers" FROM "24_hours_of_le_mans_results" WHERE "year"<1986 AND "team"='martini lancia'; |
## Task
Generate a SQL query to answer the following question:
`Which co-driver was part of team Martini Lancia earlier than 1986?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"pos" text,
"class_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which co-driver was part of team Martini Lancia earlier than 1986?`:
```sql
|
SELECT "class" FROM "24_hours_of_le_mans_results" WHERE "team"='le mans porsche team joest racing'; |
## Task
Generate a SQL query to answer the following question:
`The Le Mans Porsche team Joest Racing is in which class?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"pos" text,
"class_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `The Le Mans Porsche team Joest Racing is in which class?`:
```sql
|
SELECT "build_date" FROM "switchers_s_series" WHERE "total_produced"=146; |
## Task
Generate a SQL query to answer the following question:
`Name the build date for total produced of 146`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "switchers_s_series" (
"model" text,
"specification" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the build date for total produced of 146`:
```sql
|
SELECT "model" FROM "switchers_s_series" WHERE "specification"='dl-066'; |
## Task
Generate a SQL query to answer the following question:
`Name the model for specification of dl-066`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "switchers_s_series" (
"model" text,
"specification" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the model for specification of dl-066`:
```sql
|
SELECT "power_output" FROM "switchers_s_series" WHERE "model"='s-13'; |
## Task
Generate a SQL query to answer the following question:
`Name the power output for model of s-13`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "switchers_s_series" (
"model" text,
"specification" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the power output for model of s-13`:
```sql
|
SELECT "worst_score" FROM "highest_and_lowest_scoring_performances" WHERE "best_score"=36 AND "worst_dancer_s"='john barnes'; |
## Task
Generate a SQL query to answer the following question:
`What's the worst score for the worst dancer(s) john barnes, with a best score of 36?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_and_lowest_scoring_performances" (
"dance" text,
"best_dancer_s" text,
"best_score" real,
"worst_dancer_s" text,
"worst_score" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the worst score for the worst dancer(s) john barnes, with a best score of 36?`:
```sql
|
SELECT "worst_dancer_s" FROM "highest_and_lowest_scoring_performances" WHERE "dance"='jive'; |
## Task
Generate a SQL query to answer the following question:
`What's the worst dance of jive dancer(s)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_and_lowest_scoring_performances" (
"dance" text,
"best_dancer_s" text,
"best_score" real,
"worst_dancer_s" text,
"worst_score" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the worst dance of jive dancer(s)?`:
```sql
|
SELECT "best_score" FROM "highest_and_lowest_scoring_performances" WHERE "worst_dancer_s"='gethin jones/kenny logan'; |
## Task
Generate a SQL query to answer the following question:
`What's the best score, with the worst dancer(s) gethin jones/kenny logan?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_and_lowest_scoring_performances" (
"dance" text,
"best_dancer_s" text,
"best_score" real,
"worst_dancer_s" text,
"worst_score" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the best score, with the worst dancer(s) gethin jones/kenny logan?`:
```sql
|
SELECT AVG("best_score") FROM "highest_and_lowest_scoring_performances" WHERE "worst_score"=15; |
## Task
Generate a SQL query to answer the following question:
`What's the best average score with a bad score of 15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_and_lowest_scoring_performances" (
"dance" text,
"best_dancer_s" text,
"best_score" real,
"worst_dancer_s" text,
"worst_score" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the best average score with a bad score of 15?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "record"='66-69'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the opponent that has a record of 66-69?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the opponent that has a record of 66-69?`:
```sql
|
SELECT "score" FROM "final_round" WHERE "player"='olin dutra'; |
## Task
Generate a SQL query to answer the following question:
`What was Olin Dutra's score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Olin Dutra's score?`:
```sql
|
SELECT "score" FROM "final_round" WHERE "player"='craig wood'; |
## Task
Generate a SQL query to answer the following question:
`What was Craig Wood's score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Craig Wood's score?`:
```sql
|
SELECT "score" FROM "final_round" WHERE "player"='paul runyan'; |
## Task
Generate a SQL query to answer the following question:
`What was Paul Runyan's score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Paul Runyan's score?`:
```sql
|
SELECT "country" FROM "final_round" WHERE "to_par"='e'; |
## Task
Generate a SQL query to answer the following question:
`What country has a To par of e?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country has a To par of e?`:
```sql
|
SELECT "position" FROM "june_draft" WHERE "school"='villa park high school'; |
## Task
Generate a SQL query to answer the following question:
`What position for the player from villa park high school?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "june_draft" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What position for the player from villa park high school?`:
```sql
|
SELECT "total" FROM "medal_table" WHERE "nation"='czech republic'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of medals by the Czech republic?`
### 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 `What is the total number of medals by the Czech republic?`:
```sql
|
SELECT SUM("gold") FROM "medal_table" WHERE "rank"<2 AND "bronze">8; |
## Task
Generate a SQL query to answer the following question:
`How many gold medals does the country ranked higher than 2 with more than 8 bronze have?`
### 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 many gold medals does the country ranked higher than 2 with more than 8 bronze have?`:
```sql
|
SELECT MAX("rank") FROM "medal_table" WHERE "gold"<3 AND "silver">2 AND "total"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the highest rank a country with less than 3 gold, more than 2 silver, and less than 5 total medals has?`
### 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 `What is the highest rank a country with less than 3 gold, more than 2 silver, and less than 5 total medals has?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "record"='5-4'; |
## Task
Generate a SQL query to answer the following question:
`When is the record 5-4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `When is the record 5-4?`:
```sql
|
SELECT "genre" FROM "100_million_to_119_million_records" WHERE "artist"='prince'; |
## Task
Generate a SQL query to answer the following question:
`What is the Genre when the Artist is Prince?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "100_million_to_119_million_records" (
"artist" text,
"country_of_origin" text,
"period_active" text,
"release_year_of_first_charted_record" real,
"genre" text,
"claimed_sales" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Genre when the Artist is Prince?`:
```sql
|
SELECT "genre" FROM "100_million_to_119_million_records" WHERE "release_year_of_first_charted_record"=1968 AND "country_of_origin"='united states'; |
## Task
Generate a SQL query to answer the following question:
`What is the Genre, when the Release-year of first charted record is 1968, and when the Country of origin is United States?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "100_million_to_119_million_records" (
"artist" text,
"country_of_origin" text,
"period_active" text,
"release_year_of_first_charted_record" real,
"genre" text,
"claimed_sales" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Genre, when the Release-year of first charted record is 1968, and when the Country of origin is United States?`:
```sql
|
SELECT "builder_nos" FROM "numbering" WHERE "rr_class"='a1' AND "year"<1916; |
## Task
Generate a SQL query to answer the following question:
`Name the builder numbers with RR class of a1 and year less than 1916`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "numbering" (
"year" real,
"rr_class" text,
"rr_nos" text,
"builder" text,
"builder_nos" text,
"gwr_br_nos" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the builder numbers with RR class of a1 and year less than 1916`:
```sql
|
SELECT "rr_nos" FROM "numbering" WHERE "builder"='hudswell clarke' AND "year"<1914; |
## Task
Generate a SQL query to answer the following question:
`Name the RR numbers of hudswell clarke and years before 1914`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "numbering" (
"year" real,
"rr_class" text,
"rr_nos" text,
"builder" text,
"builder_nos" text,
"gwr_br_nos" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the RR numbers of hudswell clarke and years before 1914`:
```sql
|
SELECT "to_par" FROM "final_round_sunday" WHERE "player"='vijay singh'; |
## Task
Generate a SQL query to answer the following question:
`What is the To par has the presence of Vijay Singh?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round_sunday" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"hole" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the To par has the presence of Vijay Singh?`:
```sql
|
SELECT "laps" FROM "indy_500_results" WHERE "rank"='14'; |
## Task
Generate a SQL query to answer the following question:
`How many laps did Dick Rathmann complete when he ranked 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"qual" text,
"rank" text,
"finish" text,
"laps" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many laps did Dick Rathmann complete when he ranked 14?`:
```sql
|
SELECT "finish" FROM "indy_500_results" WHERE "qual"='130.928'; |
## Task
Generate a SQL query to answer the following question:
`What was Dick Rathmann's Finish the year he Qualed at 130.928?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"qual" text,
"rank" text,
"finish" text,
"laps" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Dick Rathmann's Finish the year he Qualed at 130.928?`:
```sql
|
SELECT AVG("total_produced") FROM "4_axle_units" WHERE "prime_mover"='12-251c'; |
## Task
Generate a SQL query to answer the following question:
`What is the average total produced when the prime mover is 12-251c?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "4_axle_units" (
"model" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average total produced when the prime mover is 12-251c?`:
```sql
|
SELECT "build_date" FROM "4_axle_units" WHERE "total_produced"=2; |
## Task
Generate a SQL query to answer the following question:
`What is the build date when total produced is 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "4_axle_units" (
"model" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the build date when total produced is 2?`:
```sql
|
SELECT MIN("total_produced") FROM "4_axle_units" WHERE "model"='m-420'; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest total produced with a model of M-420?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "4_axle_units" (
"model" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest total produced with a model of M-420?`:
```sql
|
SELECT "prime_mover" FROM "4_axle_units" WHERE "build_date"='1975'; |
## Task
Generate a SQL query to answer the following question:
`What is the prime mover for a build date in 1975?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "4_axle_units" (
"model" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the prime mover for a build date in 1975?`:
```sql
|
SELECT "model" FROM "4_axle_units" WHERE "total_produced">5 AND "prime_mover"='12-251c'; |
## Task
Generate a SQL query to answer the following question:
`What model has a total produced more than 5 and a prime move of 12-251c?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "4_axle_units" (
"model" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `What model has a total produced more than 5 and a prime move of 12-251c?`:
```sql
|
SELECT "date" FROM "january" WHERE "decision"='joseph' AND "home"='detroit' AND "record"='27β13β5β2'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the home Detroit game with a decision of Joseph and a record of 27β13β5β2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the home Detroit game with a decision of Joseph and a record of 27β13β5β2?`:
```sql
|
SELECT "score" FROM "january" WHERE "decision"='legace' AND "home"='dallas'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the home Dallas game that had a decision of Legace?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the home Dallas game that had a decision of Legace?`:
```sql
|
SELECT "score" FROM "january" WHERE "decision"='joseph' AND "record"='26β13β4β2'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game that had a record of 26β13β4β2 and a decision of Joseph?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game that had a record of 26β13β4β2 and a decision of Joseph?`:
```sql
|
SELECT "visitor" FROM "january" WHERE "record"='28β14β6β2'; |
## Task
Generate a SQL query to answer the following question:
`Who was the visiting team when the record was 28β14β6β2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the visiting team when the record was 28β14β6β2?`:
```sql
|
SELECT MIN("points") FROM "complete_international_formula_3000_resu" WHERE "engine"='mugen v8' AND "chassis"='reynard 91d'; |
## Task
Generate a SQL query to answer the following question:
`What are the lowest points that have a Mugen V8 engine and a Reynard 91D chassis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_international_formula_3000_resu" (
"year" real,
"chassis" text,
"engine" text,
"tyres" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are the lowest points that have a Mugen V8 engine and a Reynard 91D chassis?`:
```sql
|
SELECT MAX("points") FROM "complete_international_formula_3000_resu" WHERE "engine"='mugen v8' AND "year"=1991; |
## Task
Generate a SQL query to answer the following question:
`What are the highest points that have a Mugen V8 engine and happened in 1991?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_international_formula_3000_resu" (
"year" real,
"chassis" text,
"engine" text,
"tyres" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are the highest points that have a Mugen V8 engine and happened in 1991?`:
```sql
|
SELECT SUM("year") FROM "complete_formula_one_results" WHERE "engine"='cosworth v8' AND "entrant"='john player lotus'; |
## Task
Generate a SQL query to answer the following question:
`How many years did John Player Lotus used Cosworth v8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many years did John Player Lotus used Cosworth v8?`:
```sql
|
SELECT "entrant" FROM "complete_formula_one_results" WHERE "year">1989 AND "chassis"='eurobrun er189b'; |
## Task
Generate a SQL query to answer the following question:
`Who used Eurobrun er189b after 1989?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who used Eurobrun er189b after 1989?`:
```sql
|
SELECT "entrant" FROM "complete_formula_one_results" WHERE "year">1990 AND "engine"='ford v8' AND "points"=8 AND "chassis"='jordan 191'; |
## Task
Generate a SQL query to answer the following question:
`Who used Ford v8 and Jordan 191 after 1990 and got 8 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who used Ford v8 and Jordan 191 after 1990 and got 8 points?`:
```sql
|
SELECT "leftfielder" FROM "opening_day_starting_lineups" WHERE "second_baseman"='davey lopes' AND "first_baseman"='steve garvey' AND "shortstop"='bill russell' AND "year">1977; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the Leftfielder when Davey Lopes was the Second Baseman and first baseman was steve garvey, Shortstop of bill russell eariler than 1977?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opening_day_starting_lineups" (
"year" real,
"catcher" text,
"first_baseman" text,
"second_baseman" text,
"shortstop" text,
"third_baseman" text,
"rightfielder" text,
"centerfielder" text,
"leftfielder" text,
"starting_pitcher" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the Leftfielder when Davey Lopes was the Second Baseman and first baseman was steve garvey, Shortstop of bill russell eariler than 1977?`:
```sql
|
SELECT "shortstop" FROM "opening_day_starting_lineups" WHERE "catcher"='johnny roseboro' AND "third_baseman"='jim lefebvre' AND "second_baseman"='nate oliver'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the shortstop when the Catcher was johnny roseboro, and a Third Baseman of jim lefebvre, and a Second Baseman of nate oliver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opening_day_starting_lineups" (
"year" real,
"catcher" text,
"first_baseman" text,
"second_baseman" text,
"shortstop" text,
"third_baseman" text,
"rightfielder" text,
"centerfielder" text,
"leftfielder" text,
"starting_pitcher" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the shortstop when the Catcher was johnny roseboro, and a Third Baseman of jim lefebvre, and a Second Baseman of nate oliver?`:
```sql
|
SELECT "first_baseman" FROM "opening_day_starting_lineups" WHERE "shortstop"='zoilo versalles'; |
## Task
Generate a SQL query to answer the following question:
`Who was the First Baseman when the Shortstop was zoilo versalles?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opening_day_starting_lineups" (
"year" real,
"catcher" text,
"first_baseman" text,
"second_baseman" text,
"shortstop" text,
"third_baseman" text,
"rightfielder" text,
"centerfielder" text,
"leftfielder" text,
"starting_pitcher" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the First Baseman when the Shortstop was zoilo versalles?`:
```sql
|
SELECT "leftfielder" FROM "opening_day_starting_lineups" WHERE "shortstop"='bill russell' AND "second_baseman"='steve sax' AND "year"=1983; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the Leftfielder when the Shortstop was bill russell, and the Second Baseman was steve sax in 1983?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opening_day_starting_lineups" (
"year" real,
"catcher" text,
"first_baseman" text,
"second_baseman" text,
"shortstop" text,
"third_baseman" text,
"rightfielder" text,
"centerfielder" text,
"leftfielder" text,
"starting_pitcher" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the Leftfielder when the Shortstop was bill russell, and the Second Baseman was steve sax in 1983?`:
```sql
|
SELECT MIN("year") FROM "complete_formula_one_results" WHERE "points"<3 AND "entrant"='parmalat forti ford'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year with less than 3 points and Parmalat Forti Ford was the entrant?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year with less than 3 points and Parmalat Forti Ford was the entrant?`:
```sql
|
SELECT AVG("points") FROM "complete_formula_one_results" WHERE "entrant"='equipe ligier gauloises blondes'; |
## Task
Generate a SQL query to answer the following question:
`What is the average Points when equipe ligier gauloises blondes is the entrant?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Points when equipe ligier gauloises blondes is the entrant?`:
```sql
|
SELECT MIN("points") FROM "complete_formula_one_results" WHERE "entrant"='parmalat forti ford' AND "year">1995; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest amount of points for parmalat forti ford entrant later than 1995?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest amount of points for parmalat forti ford entrant later than 1995?`:
```sql
|
SELECT "chassis" FROM "complete_formula_one_results" WHERE "entrant"='danka arrows yamaha'; |
## Task
Generate a SQL query to answer the following question:
`What is the company that made the chassis for the entrant danka arrows yamaha?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the company that made the chassis for the entrant danka arrows yamaha?`:
```sql
|
SELECT "college" FROM "indianapolis_colts_draft_history" WHERE "name"='ray graves'; |
## Task
Generate a SQL query to answer the following question:
`What college did Ray Graves attend?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indianapolis_colts_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What college did Ray Graves attend?`:
```sql
|
SELECT "pick_num" FROM "indianapolis_colts_draft_history" WHERE "name"='bill athey'; |
## Task
Generate a SQL query to answer the following question:
`What number pick was Bill Athey?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indianapolis_colts_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What number pick was Bill Athey?`:
```sql
|
SELECT COUNT("overall") FROM "indianapolis_colts_draft_history" WHERE "name"='john cole'; |
## Task
Generate a SQL query to answer the following question:
`What is John Cole's overall pick number?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indianapolis_colts_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is John Cole's overall pick number?`:
```sql
|
SELECT "date_made" FROM "sligo_leitrim_and_northern_counties_rail" WHERE "class"='waterford'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the locomotive with a Waterford class?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sligo_leitrim_and_northern_counties_rail" (
"class" text,
"type" text,
"names" text,
"quantity_made" text,
"manufacturer" text,
"date_made" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the locomotive with a Waterford class?`:
```sql
|
SELECT "date_made" FROM "sligo_leitrim_and_northern_counties_rail" WHERE "names"='blacklion glencar'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the locomotive named Blacklion Glencar?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sligo_leitrim_and_northern_counties_rail" (
"class" text,
"type" text,
"names" text,
"quantity_made" text,
"manufacturer" text,
"date_made" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the locomotive named Blacklion Glencar?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.