output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "employed" FROM "notable_masters" WHERE "position_held"='mathematics & prefect master'; |
## Task
Generate a SQL query to answer the following question:
`What are the years employed shown for mathematics & prefect master?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notable_masters" (
"name" text,
"employed" text,
"position_held" text,
"honour" text,
"citation" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the years employed shown for mathematics & prefect master?`:
```sql
|
SELECT "citation" FROM "notable_masters" WHERE "employed"='1970–1996'; |
## Task
Generate a SQL query to answer the following question:
`What citation is shown for the employed years of 1970–1996?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notable_masters" (
"name" text,
"employed" text,
"position_held" text,
"honour" text,
"citation" text
);
### SQL
Given the database schema, here is the SQL query that answers `What citation is shown for the employed years of 1970–1996?`:
```sql
|
SELECT "name" FROM "notable_masters" WHERE "employed"='1970–2005'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the person employed 1970–2005?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notable_masters" (
"name" text,
"employed" text,
"position_held" text,
"honour" text,
"citation" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the person employed 1970–2005?`:
```sql
|
SELECT "time" FROM "repechage_1" WHERE "rank"<4 AND "country"='finland'; |
## Task
Generate a SQL query to answer the following question:
`What is the Time of the Rowers from Finland with a Rank of less than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "repechage_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Time of the Rowers from Finland with a Rank of less than 4?`:
```sql
|
SELECT SUM("rank") FROM "repechage_1" WHERE "time"='7:30.92'; |
## Task
Generate a SQL query to answer the following question:
`What is the Rank of the Rowers with a Time of 7:30.92?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "repechage_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Rank of the Rowers with a Time of 7:30.92?`:
```sql
|
SELECT "notes" FROM "repechage_1" WHERE "country"='finland'; |
## Task
Generate a SQL query to answer the following question:
`What are the Notes of the Country of finland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "repechage_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the Notes of the Country of finland?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "week"=12; |
## Task
Generate a SQL query to answer the following question:
`Who were the opponents for week 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the opponents for week 12?`:
```sql
|
SELECT "polling_institute" FROM "opinion_polls" WHERE "lead"='6%'; |
## Task
Generate a SQL query to answer the following question:
`Which polling institute showed a lead of 6%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polls" (
"date_s_released" text,
"polling_institute" text,
"nationalist" text,
"labour" text,
"democratic_alternative" text,
"undecided_no_answer" text,
"lead" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which polling institute showed a lead of 6%?`:
```sql
|
SELECT "date_s_released" FROM "opinion_polls" WHERE "democratic_alternative"='1%' AND "labour"='34%'; |
## Task
Generate a SQL query to answer the following question:
`Which date released had a Democratic Alternative value of 1% and Labour of 34%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polls" (
"date_s_released" text,
"polling_institute" text,
"nationalist" text,
"labour" text,
"democratic_alternative" text,
"undecided_no_answer" text,
"lead" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which date released had a Democratic Alternative value of 1% and Labour of 34%?`:
```sql
|
SELECT "nationalist" FROM "opinion_polls" WHERE "undecided_no_answer"='29.2%'; |
## Task
Generate a SQL query to answer the following question:
`What is the Nationalist share of the poll for the response in which Undecided/No Answer received 29.2%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polls" (
"date_s_released" text,
"polling_institute" text,
"nationalist" text,
"labour" text,
"democratic_alternative" text,
"undecided_no_answer" text,
"lead" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Nationalist share of the poll for the response in which Undecided/No Answer received 29.2%?`:
```sql
|
SELECT "democratic_alternative" FROM "opinion_polls" WHERE "polling_institute"='malta today'; |
## Task
Generate a SQL query to answer the following question:
`What is the value of the Democratic Alternative for the poll released by Malta Today?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polls" (
"date_s_released" text,
"polling_institute" text,
"nationalist" text,
"labour" text,
"democratic_alternative" text,
"undecided_no_answer" text,
"lead" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the value of the Democratic Alternative for the poll released by Malta Today?`:
```sql
|
SELECT "polling_institute" FROM "opinion_polls" WHERE "lead"='12%' AND "labour"='40.2%'; |
## Task
Generate a SQL query to answer the following question:
`Which polling institute showed a lead of 12% and a Labour share of the poll at 40.2%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "opinion_polls" (
"date_s_released" text,
"polling_institute" text,
"nationalist" text,
"labour" text,
"democratic_alternative" text,
"undecided_no_answer" text,
"lead" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which polling institute showed a lead of 12% and a Labour share of the poll at 40.2%?`:
```sql
|
SELECT MIN("week") FROM "schedule" WHERE "opponent"='minnesota vikings'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest week that has Minnesota Vikings as the opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest week that has Minnesota Vikings as the opponent?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "date"='december 6, 1964'; |
## Task
Generate a SQL query to answer the following question:
`What opponent has December 6, 1964 as the date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What opponent has December 6, 1964 as the date?`:
```sql
|
SELECT "attendance" FROM "season_schedule" WHERE "week"<3 AND "date"='september 18, 1965'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance of the game on September 18, 1965 before week 3?`
### 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,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance of the game on September 18, 1965 before week 3?`:
```sql
|
SELECT "result" FROM "season_schedule" WHERE "week"<3 AND "attendance"='53,658'; |
## Task
Generate a SQL query to answer the following question:
`What was the result of the game before week 3 with an attendance of 53,658?`
### 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,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of the game before week 3 with an attendance of 53,658?`:
```sql
|
SELECT MIN("week") FROM "season_schedule" WHERE "date"='september 26, 1965'; |
## Task
Generate a SQL query to answer the following question:
`What was the earliest week on September 26, 1965?`
### 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,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the earliest week on September 26, 1965?`:
```sql
|
SELECT SUM("year") FROM "tallest_buildings" WHERE "name"='one south broad'; |
## Task
Generate a SQL query to answer the following question:
`What is the total time for one south broad?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tallest_buildings" (
"rank" text,
"name" text,
"height_ft_m" text,
"floors" real,
"year" real,
"address" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total time for one south broad?`:
```sql
|
SELECT "name" FROM "tallest_buildings" WHERE "year"<1973 AND "address"='123 south broad street'; |
## Task
Generate a SQL query to answer the following question:
`What is the 123 south broad street address name before 1973?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tallest_buildings" (
"rank" text,
"name" text,
"height_ft_m" text,
"floors" real,
"year" real,
"address" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 123 south broad street address name before 1973?`:
```sql
|
SELECT "competition" FROM "international_goals" WHERE "goal"<2; |
## Task
Generate a SQL query to answer the following question:
`Which competition has goals less than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which competition has goals less than 2?`:
```sql
|
SELECT "result" FROM "international_goals" WHERE "goal">4; |
## Task
Generate a SQL query to answer the following question:
`What's the result of a goal larger than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the result of a goal larger than 4?`:
```sql
|
SELECT "type" FROM "stage_results" WHERE "course"='marostica to bibione'; |
## Task
Generate a SQL query to answer the following question:
`tell me the type that has the marostica to bibione course.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `tell me the type that has the marostica to bibione course.`:
```sql
|
SELECT "winner" FROM "stage_results" WHERE "date"='29 may'; |
## Task
Generate a SQL query to answer the following question:
`who won on 29 may?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `who won on 29 may?`:
```sql
|
SELECT "term" FROM "territorial_house" WHERE "hometown"='ester creek'; |
## Task
Generate a SQL query to answer the following question:
`What is the term for hometown Ester Creek?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "territorial_house" (
"name" text,
"party" text,
"hometown" text,
"division" text,
"term" text,
"legislatures" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the term for hometown Ester Creek?`:
```sql
|
SELECT MIN("gold") FROM "medal_table" WHERE "total"=5 AND "rank">1; |
## Task
Generate a SQL query to answer the following question:
`What is the number of Gold medals for the Nation with a Total of 5 and Rank larger than 1?`
### 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 number of Gold medals for the Nation with a Total of 5 and Rank larger than 1?`:
```sql
|
SELECT COUNT("silver") FROM "medal_table" WHERE "bronze">1 AND "rank"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Silver for the Nation with more than 1 Bronze and a Rank less than 5?`
### 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 Silver for the Nation with more than 1 Bronze and a Rank less than 5?`:
```sql
|
SELECT "round" FROM "mixed_martial_arts_record" WHERE "res"='loss' AND "event"='ufc 118'; |
## Task
Generate a SQL query to answer the following question:
`In what round was the loss at ufc 118?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what round was the loss at ufc 118?`:
```sql
|
SELECT MIN("decile") FROM "tauranga_city" WHERE "area"='otumoetai'; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest decile with an Area of otumoetai?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tauranga_city" (
"name" text,
"gender" text,
"area" text,
"authority" text,
"decile" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest decile with an Area of otumoetai?`:
```sql
|
SELECT "decile" FROM "tauranga_city" WHERE "area"='welcome bay' AND "authority"='state'; |
## Task
Generate a SQL query to answer the following question:
`Which decile has an Area of welcome bay, and an Authority of state?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tauranga_city" (
"name" text,
"gender" text,
"area" text,
"authority" text,
"decile" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which decile has an Area of welcome bay, and an Authority of state?`:
```sql
|
SELECT SUM("decile") FROM "tauranga_city" WHERE "gender"='coed' AND "authority"='state' AND "name"='mount maunganui school'; |
## Task
Generate a SQL query to answer the following question:
`How many deciles have a Gender of coed, an Authority of state, and a Name of mount maunganui school?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tauranga_city" (
"name" text,
"gender" text,
"area" text,
"authority" text,
"decile" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many deciles have a Gender of coed, an Authority of state, and a Name of mount maunganui school?`:
```sql
|
SELECT "name" FROM "tauranga_city" WHERE "decile"=5 AND "area"='tauranga'; |
## Task
Generate a SQL query to answer the following question:
`Which name has a Decile of 5, and an Area of tauranga?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tauranga_city" (
"name" text,
"gender" text,
"area" text,
"authority" text,
"decile" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which name has a Decile of 5, and an Area of tauranga?`:
```sql
|
SELECT "authority" FROM "tauranga_city" WHERE "gender"='coed' AND "decile"<6 AND "area"='merivale'; |
## Task
Generate a SQL query to answer the following question:
`Which Authority has a Gender of coed, a Decile smaller than 6, and an Area of merivale?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tauranga_city" (
"name" text,
"gender" text,
"area" text,
"authority" text,
"decile" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Authority has a Gender of coed, a Decile smaller than 6, and an Area of merivale?`:
```sql
|
SELECT MIN("decile") FROM "tauranga_city" WHERE "name"='st mary''s catholic school'; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest decile with a Name of st mary's catholic school?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tauranga_city" (
"name" text,
"gender" text,
"area" text,
"authority" text,
"decile" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest decile with a Name of st mary's catholic school?`:
```sql
|
SELECT AVG("births_000s") FROM "population_movement_of_jews_from_former_" WHERE "total_fertility_rate"='na' AND "natural_growth"<2.5; |
## Task
Generate a SQL query to answer the following question:
`What is the average birth rate that has a total fertility rate of na, and a natural growth smaller than 2.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "population_movement_of_jews_from_former_" (
"year" text,
"births_000s" real,
"deaths" real,
"natural_growth" real,
"total_fertility_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average birth rate that has a total fertility rate of na, and a natural growth smaller than 2.5?`:
```sql
|
SELECT "deaths" FROM "population_movement_of_jews_from_former_" WHERE "natural_growth"<3.4 AND "total_fertility_rate"='1.63'; |
## Task
Generate a SQL query to answer the following question:
`What was the amount of deaths that had a natural growth smaller than 3.4, and a total fertility rate of 1.63?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "population_movement_of_jews_from_former_" (
"year" text,
"births_000s" real,
"deaths" real,
"natural_growth" real,
"total_fertility_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the amount of deaths that had a natural growth smaller than 3.4, and a total fertility rate of 1.63?`:
```sql
|
SELECT AVG("births_000s") FROM "population_movement_of_jews_from_former_" WHERE "deaths"=0.4; |
## Task
Generate a SQL query to answer the following question:
`What is the average births that had a death rate of 0.4`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "population_movement_of_jews_from_former_" (
"year" text,
"births_000s" real,
"deaths" real,
"natural_growth" real,
"total_fertility_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average births that had a death rate of 0.4`:
```sql
|
SELECT SUM("births_000s") FROM "population_movement_of_jews_from_former_" WHERE "deaths">7.6 AND "year"='1990-2009'; |
## Task
Generate a SQL query to answer the following question:
`What was the amount of Births (000s) that had a death rate larger than 7.6, and a Year of 1990-2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "population_movement_of_jews_from_former_" (
"year" text,
"births_000s" real,
"deaths" real,
"natural_growth" real,
"total_fertility_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the amount of Births (000s) that had a death rate larger than 7.6, and a Year of 1990-2009?`:
```sql
|
SELECT "total_fertility_rate" FROM "population_movement_of_jews_from_former_" WHERE "deaths">7.8; |
## Task
Generate a SQL query to answer the following question:
`What was the total fertility rate that had a death rate larger than 7.8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "population_movement_of_jews_from_former_" (
"year" text,
"births_000s" real,
"deaths" real,
"natural_growth" real,
"total_fertility_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the total fertility rate that had a death rate larger than 7.8?`:
```sql
|
SELECT "votes" FROM "28_seats" WHERE "occupation"='security guard'; |
## Task
Generate a SQL query to answer the following question:
`How many votes did the security guard get?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "28_seats" (
"riding" text,
"candidate_s_name" text,
"gender" text,
"residence" text,
"occupation" text,
"votes" real,
"rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many votes did the security guard get?`:
```sql
|
SELECT "occupation" FROM "28_seats" WHERE "candidate_s_name"='john marvin wierenga'; |
## Task
Generate a SQL query to answer the following question:
`What is John Marvin Wierenga's occupation?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "28_seats" (
"riding" text,
"candidate_s_name" text,
"gender" text,
"residence" text,
"occupation" text,
"votes" real,
"rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is John Marvin Wierenga's occupation?`:
```sql
|
SELECT AVG("2005") FROM "investment" WHERE "2008">0 AND "2007">310 AND "average_annual"=767 AND "total">'4,597'; |
## Task
Generate a SQL query to answer the following question:
`What is the average value for 2005, when the value for 2008 is greater than 0, when the value for 2007 is greater than 310, when the Average annual is 767, and when the Total is greater than 4,597?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "investment" (
"2005" real,
"2006" real,
"2007" real,
"2008" real,
"2009" real,
"2010" real,
"total" real,
"average_annual" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average value for 2005, when the value for 2008 is greater than 0, when the value for 2007 is greater than 310, when the Average annual is 767, and when the Total is greater than 4,597?`:
```sql
|
SELECT AVG("2005") FROM "investment" WHERE "average_annual"=767; |
## Task
Generate a SQL query to answer the following question:
`What is the average value for 2005, when the value for Average annual is 767?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "investment" (
"2005" real,
"2006" real,
"2007" real,
"2008" real,
"2009" real,
"2010" real,
"total" real,
"average_annual" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average value for 2005, when the value for Average annual is 767?`:
```sql
|
SELECT "year" FROM "achievements" WHERE "tournament"='1st division el salvador' AND "finish"='champion' AND "team"='fas'; |
## Task
Generate a SQL query to answer the following question:
`In what Year was 1st Division El Salvador with a Finish of Champion and a Team of Fas?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" text,
"finish" text,
"team" text,
"tournament" text,
"role" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what Year was 1st Division El Salvador with a Finish of Champion and a Team of Fas?`:
```sql
|
SELECT "year" FROM "achievements" WHERE "finish"='champions'; |
## Task
Generate a SQL query to answer the following question:
`In what Year was the Finish Champions?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" text,
"finish" text,
"team" text,
"tournament" text,
"role" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what Year was the Finish Champions?`:
```sql
|
SELECT "finish" FROM "achievements" WHERE "team"='platense municipal zacatecoluca' AND "tournament"='1st division el salvador'; |
## Task
Generate a SQL query to answer the following question:
`During the Tournament of 1st Division El Salvador, what was the Finish for the Team of Platense Municipal Zacatecoluca?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" text,
"finish" text,
"team" text,
"tournament" text,
"role" text
);
### SQL
Given the database schema, here is the SQL query that answers `During the Tournament of 1st Division El Salvador, what was the Finish for the Team of Platense Municipal Zacatecoluca?`:
```sql
|
SELECT "role" FROM "achievements" WHERE "tournament"='1st division honduras'; |
## Task
Generate a SQL query to answer the following question:
`What is the Role in the 1st Division Honduras Tournament?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" text,
"finish" text,
"team" text,
"tournament" text,
"role" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Role in the 1st Division Honduras Tournament?`:
```sql
|
SELECT "tournament" FROM "achievements" WHERE "year"='1986'; |
## Task
Generate a SQL query to answer the following question:
`What is the Tournament in the Year of 1986?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" text,
"finish" text,
"team" text,
"tournament" text,
"role" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Tournament in the Year of 1986?`:
```sql
|
SELECT "role" FROM "achievements" WHERE "team"='platense municipal zacatecoluca' AND "tournament"='torneo fraternidad/uncaf club championship'; |
## Task
Generate a SQL query to answer the following question:
`During the Tournament of Torneo Fraternidad/UNCAF Club championship, what is the Role of the Platense Municipal Zacatecoluca Team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" text,
"finish" text,
"team" text,
"tournament" text,
"role" text
);
### SQL
Given the database schema, here is the SQL query that answers `During the Tournament of Torneo Fraternidad/UNCAF Club championship, what is the Role of the Platense Municipal Zacatecoluca Team?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "opponent"='yankees' AND "loss"='mulholland (5-6)'; |
## Task
Generate a SQL query to answer the following question:
`What is the record of teams that play the yankees, and lose at mulholland (5-6)`
### 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 record of teams that play the yankees, and lose at mulholland (5-6)`:
```sql
|
SELECT MAX("total") FROM "medal_table" WHERE "gold"=0 AND "silver">0 AND "nation"='ukraine'; |
## Task
Generate a SQL query to answer the following question:
`Which total is highest with 0 gold and more than 0 silver, in Ukraine?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which total is highest with 0 gold and more than 0 silver, in Ukraine?`:
```sql
|
SELECT SUM("rank") FROM "medal_table" WHERE "silver"=2 AND "total">10; |
## Task
Generate a SQL query to answer the following question:
`What is the total rank with more than 2 silver and total larger than 10?`
### 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 rank with more than 2 silver and total larger than 10?`:
```sql
|
SELECT SUM("rank") FROM "medal_table" WHERE "total">2 AND "gold"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the total rank with a total larger than 2, and less than 0 gold`
### 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 rank with a total larger than 2, and less than 0 gold`:
```sql
|
SELECT MAX("bronze") FROM "medal_table" WHERE "gold"<0; |
## Task
Generate a SQL query to answer the following question:
`Which is the highest bronze with gold less than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which is the highest bronze with gold less than 0?`:
```sql
|
SELECT SUM("total") FROM "medal_table" WHERE "rank"<5 AND "gold">5 AND "bronze">8; |
## Task
Generate a SQL query to answer the following question:
`What is the total with a rank less than 5, gold larger than 5 and bronze larger than 8?`
### 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 with a rank less than 5, gold larger than 5 and bronze larger than 8?`:
```sql
|
SELECT MIN("year") FROM "achievements" WHERE "result"='1st' AND "extra"='4 x 400 m relay'; |
## Task
Generate a SQL query to answer the following question:
`Result of 1st, and an Extra of 4 x 400 m relay is in what lowest year?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `Result of 1st, and an Extra of 4 x 400 m relay is in what lowest year?`:
```sql
|
SELECT "venue" FROM "achievements" WHERE "year"<2007 AND "result"='1st'; |
## Task
Generate a SQL query to answer the following question:
`a Year smaller than 2007, and a Result of 1st is in what venue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `a Year smaller than 2007, and a Result of 1st is in what venue?`:
```sql
|
SELECT "result" FROM "achievements" WHERE "venue"='melbourne , australia' AND "extra"='200 m'; |
## Task
Generate a SQL query to answer the following question:
`Venue of melbourne , australia, and a Extra of 200 m has what results?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `Venue of melbourne , australia, and a Extra of 200 m has what results?`:
```sql
|
SELECT "year" FROM "achievements" WHERE "result"='1st' AND "venue"='melbourne , australia' AND "extra"='100 m'; |
## Task
Generate a SQL query to answer the following question:
`Result of 1st, and a Venue of melbourne , australia, and a Extra of 100 m happened in which year?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `Result of 1st, and a Venue of melbourne , australia, and a Extra of 100 m happened in which year?`:
```sql
|
SELECT "rectifier" FROM "variations_on_the_theme" WHERE "det_pre_amp"='x' AND "num_tubes"='4'; |
## Task
Generate a SQL query to answer the following question:
`Name the rectifier for Det/Pre-amp of x and # tubes of 4`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "variations_on_the_theme" (
"num_tubes" text,
"converter" text,
"det_pre_amp" text,
"audio_amp" text,
"rectifier" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the rectifier for Det/Pre-amp of x and # tubes of 4`:
```sql
|
SELECT "num_tubes" FROM "variations_on_the_theme" WHERE "det_pre_amp"='x' AND "audio_amp"='x x (push-pull)'; |
## Task
Generate a SQL query to answer the following question:
`Name the # tubes with Det/Pre-amp of x and audio amp of x x (push-pull)`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "variations_on_the_theme" (
"num_tubes" text,
"converter" text,
"det_pre_amp" text,
"audio_amp" text,
"rectifier" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the # tubes with Det/Pre-amp of x and audio amp of x x (push-pull)`:
```sql
|
SELECT "det_pre_amp" FROM "variations_on_the_theme" WHERE "num_tubes"='8'; |
## Task
Generate a SQL query to answer the following question:
`Name the det/pre-amp with # of tubes of 8`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "variations_on_the_theme" (
"num_tubes" text,
"converter" text,
"det_pre_amp" text,
"audio_amp" text,
"rectifier" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the det/pre-amp with # of tubes of 8`:
```sql
|
SELECT "det_pre_amp" FROM "variations_on_the_theme" WHERE "num_tubes"='4' AND "rectifier"='x'; |
## Task
Generate a SQL query to answer the following question:
`Name the det/pre-amp with # tubes of 4 and rectifier of x`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "variations_on_the_theme" (
"num_tubes" text,
"converter" text,
"det_pre_amp" text,
"audio_amp" text,
"rectifier" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the det/pre-amp with # tubes of 4 and rectifier of x`:
```sql
|
SELECT "num_tubes" FROM "variations_on_the_theme" WHERE "audio_amp"='x'; |
## Task
Generate a SQL query to answer the following question:
`Name the # tubes with audio amp of x`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "variations_on_the_theme" (
"num_tubes" text,
"converter" text,
"det_pre_amp" text,
"audio_amp" text,
"rectifier" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the # tubes with audio amp of x`:
```sql
|
SELECT "competition" FROM "international_goals" WHERE "goal"=3; |
## Task
Generate a SQL query to answer the following question:
`What type of Competition has a Goal of 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What type of Competition has a Goal of 3?`:
```sql
|
SELECT "competition" FROM "international_goals" WHERE "date"='july 1, 2000'; |
## Task
Generate a SQL query to answer the following question:
`Which Competition has the Date July 1, 2000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Competition has the Date July 1, 2000?`:
```sql
|
SELECT "years" FROM "external_links" WHERE "representative"='james robert jones'; |
## Task
Generate a SQL query to answer the following question:
`Which years did James Robert Jones serve?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "external_links" (
"representative" text,
"years" text,
"state" text,
"party" text,
"lifespan" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which years did James Robert Jones serve?`:
```sql
|
SELECT "years" FROM "external_links" WHERE "state"='new hampshire' AND "representative"='james hutchins johnson'; |
## Task
Generate a SQL query to answer the following question:
`James Hutchins Johnson, from New Hampshire, served during what years?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "external_links" (
"representative" text,
"years" text,
"state" text,
"party" text,
"lifespan" text
);
### SQL
Given the database schema, here is the SQL query that answers `James Hutchins Johnson, from New Hampshire, served during what years?`:
```sql
|
SELECT "team_name" FROM "all_time_record" WHERE "losses"=6 AND "games">18; |
## Task
Generate a SQL query to answer the following question:
`Who is the team that has played more than 18 games and has 6 losses?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_record" (
"season" text,
"team_name" text,
"games" real,
"losses" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the team that has played more than 18 games and has 6 losses?`:
```sql
|
SELECT "season" FROM "all_time_record" WHERE "points"<16 AND "losses"=18; |
## Task
Generate a SQL query to answer the following question:
`Which season did the Burnaby Lakers have less than 16 points and less than 18 losses?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_record" (
"season" text,
"team_name" text,
"games" real,
"losses" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which season did the Burnaby Lakers have less than 16 points and less than 18 losses?`:
```sql
|
SELECT "team_name" FROM "all_time_record" WHERE "losses">15 AND "season"='1988'; |
## Task
Generate a SQL query to answer the following question:
`Which team had more than 15 losses in 1988?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_record" (
"season" text,
"team_name" text,
"games" real,
"losses" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which team had more than 15 losses in 1988?`:
```sql
|
SELECT SUM("losses") FROM "all_time_record" WHERE "team_name"='burnaby lakers' AND "points"=8 AND "season"='1998' AND "games"<25; |
## Task
Generate a SQL query to answer the following question:
`How many losses did the Burnaby Lakers accumulate when they scored 8 points in 1998 playing less than 25 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_record" (
"season" text,
"team_name" text,
"games" real,
"losses" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many losses did the Burnaby Lakers accumulate when they scored 8 points in 1998 playing less than 25 games?`:
```sql
|
SELECT "school_club_team" FROM "cfl_draft" WHERE "position"='dl'; |
## Task
Generate a SQL query to answer the following question:
`What was the school for the player who was a DL?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the school for the player who was a DL?`:
```sql
|
SELECT MIN("pick") FROM "cfl_draft" WHERE "player"='ian hazlett'; |
## Task
Generate a SQL query to answer the following question:
`Which pick was used on Ian Hazlett?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which pick was used on Ian Hazlett?`:
```sql
|
SELECT "thumb_stick" FROM "available_keypads" WHERE "basic_shape"='curved' AND "backlit"='yes' AND "supplier"='genius'; |
## Task
Generate a SQL query to answer the following question:
`Which Thumb stick has a Basic shape of curved, a Backlit of yes, and a Supplier of genius?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "available_keypads" (
"supplier" text,
"basic_shape" text,
"keys_x_modes" text,
"wrist_pad" text,
"thumb_stick" text,
"backlit" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Thumb stick has a Basic shape of curved, a Backlit of yes, and a Supplier of genius?`:
```sql
|
SELECT "thumb_stick" FROM "available_keypads" WHERE "wrist_pad"='no' AND "supplier"='sharkoon'; |
## Task
Generate a SQL query to answer the following question:
`Which Thumb stick has a Wrist pad of no, and a Supplier of sharkoon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "available_keypads" (
"supplier" text,
"basic_shape" text,
"keys_x_modes" text,
"wrist_pad" text,
"thumb_stick" text,
"backlit" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Thumb stick has a Wrist pad of no, and a Supplier of sharkoon?`:
```sql
|
SELECT "keys_x_modes" FROM "available_keypads" WHERE "supplier"='wolfking'; |
## Task
Generate a SQL query to answer the following question:
`Which keys (x modes) have a Supplier of wolfking?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "available_keypads" (
"supplier" text,
"basic_shape" text,
"keys_x_modes" text,
"wrist_pad" text,
"thumb_stick" text,
"backlit" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which keys (x modes) have a Supplier of wolfking?`:
```sql
|
SELECT "supplier" FROM "available_keypads" WHERE "basic_shape"='flat' AND "wrist_pad"='no' AND "keys_x_modes"='25+'; |
## Task
Generate a SQL query to answer the following question:
`Which Supplier have a Basic shape of flat, a Wrist pad of no, and Keys (x modes) of 25+?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "available_keypads" (
"supplier" text,
"basic_shape" text,
"keys_x_modes" text,
"wrist_pad" text,
"thumb_stick" text,
"backlit" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Supplier have a Basic shape of flat, a Wrist pad of no, and Keys (x modes) of 25+?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "time"='3:59'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent with the time 3:59?`
### 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,
"time" text,
"att" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent with the time 3:59?`:
```sql
|
SELECT "israel_bowl" FROM "ifl_champions" WHERE "date"='march 30, 2012'; |
## Task
Generate a SQL query to answer the following question:
`Name the Israel Bowl for march 30, 2012`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ifl_champions" (
"season" text,
"champion" text,
"runner_up" text,
"israel_bowl" text,
"venue" text,
"date" text,
"finals_mvp" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Israel Bowl for march 30, 2012`:
```sql
|
SELECT "venue" FROM "ifl_champions" WHERE "date"='march 28, 2008'; |
## Task
Generate a SQL query to answer the following question:
`Name the venue for march 28, 2008`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ifl_champions" (
"season" text,
"champion" text,
"runner_up" text,
"israel_bowl" text,
"venue" text,
"date" text,
"finals_mvp" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the venue for march 28, 2008`:
```sql
|
SELECT "champion" FROM "ifl_champions" WHERE "israel_bowl"='iv'; |
## Task
Generate a SQL query to answer the following question:
`Name the champion for israel bowl of iv`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ifl_champions" (
"season" text,
"champion" text,
"runner_up" text,
"israel_bowl" text,
"venue" text,
"date" text,
"finals_mvp" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the champion for israel bowl of iv`:
```sql
|
SELECT "season" FROM "ifl_champions" WHERE "runner_up"='judean rebels'; |
## Task
Generate a SQL query to answer the following question:
`Name the season for runner up of judean rebels`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ifl_champions" (
"season" text,
"champion" text,
"runner_up" text,
"israel_bowl" text,
"venue" text,
"date" text,
"finals_mvp" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the season for runner up of judean rebels`:
```sql
|
SELECT "date_from" FROM "list_of_town_tramway_systems_in_the_neth" WHERE "name_of_system"='hsm (1883–1910) gt (1915–1922)' AND "traction_type"='steam'; |
## Task
Generate a SQL query to answer the following question:
`On what date did the event begin that had a steam traction type and used the system named HSM (1883–1910) GT (1915–1922)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_town_tramway_systems_in_the_neth" (
"name_of_system" text,
"location" text,
"traction_type" text,
"date_from" text,
"date_to" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date did the event begin that had a steam traction type and used the system named HSM (1883–1910) GT (1915–1922)?`:
```sql
|
SELECT "date_from" FROM "list_of_town_tramway_systems_in_the_neth" WHERE "location"='zaltbommel'; |
## Task
Generate a SQL query to answer the following question:
`On what date did the event at Zaltbommel begin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_town_tramway_systems_in_the_neth" (
"name_of_system" text,
"location" text,
"traction_type" text,
"date_from" text,
"date_to" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date did the event at Zaltbommel begin?`:
```sql
|
SELECT "location" FROM "list_of_town_tramway_systems_in_the_neth" WHERE "name_of_system"='atm (1880–1911) geta (1911–1944)' AND "traction_type"='electric'; |
## Task
Generate a SQL query to answer the following question:
`At what location did the event that used electric traction and system name ATM (1880–1911) GETA (1911–1944) occur?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_town_tramway_systems_in_the_neth" (
"name_of_system" text,
"location" text,
"traction_type" text,
"date_from" text,
"date_to" text
);
### SQL
Given the database schema, here is the SQL query that answers `At what location did the event that used electric traction and system name ATM (1880–1911) GETA (1911–1944) occur?`:
```sql
|
SELECT "to_par" FROM "third_round" WHERE "country"='england' AND "place"='t1'; |
## Task
Generate a SQL query to answer the following question:
`What is the to par of the player from England with a t1 place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the to par of the player from England with a t1 place?`:
```sql
|
SELECT "country" FROM "third_round" WHERE "score"='69-70-67=206' AND "player"='sergio garcía'; |
## Task
Generate a SQL query to answer the following question:
`What is the country sergio garcía, who has a score of 69-70-67=206, is from?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the country sergio garcía, who has a score of 69-70-67=206, is from?`:
```sql
|
SELECT "to_par" FROM "third_round" WHERE "country"='united states' AND "place"='t5'; |
## Task
Generate a SQL query to answer the following question:
`What is the to par of the player from the United States with a t5 place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the to par of the player from the United States with a t5 place?`:
```sql
|
SELECT "to_par" FROM "third_round" WHERE "country"='united states' AND "score"='69-68-65=202'; |
## Task
Generate a SQL query to answer the following question:
`What is the to par of the player from the United States with a score of 69-68-65=202?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the to par of the player from the United States with a score of 69-68-65=202?`:
```sql
|
SELECT COUNT("lane") FROM "semifinal_2" WHERE "time"='2:01.51' AND "rank"<4; |
## Task
Generate a SQL query to answer the following question:
`How many lanes had a rank smaller than 4 and a time of 2:01.51?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many lanes had a rank smaller than 4 and a time of 2:01.51?`:
```sql
|
SELECT "time" FROM "semifinal_2" WHERE "lane"=7; |
## Task
Generate a SQL query to answer the following question:
`What was the time of the person in lane 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the time of the person in lane 7?`:
```sql
|
SELECT MAX("employees") FROM "largest_employers" WHERE "company"='nokia' AND "rank"<3; |
## Task
Generate a SQL query to answer the following question:
`How many employees at nokia, ranked under 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "largest_employers" (
"rank" real,
"company" text,
"headquarters" text,
"industry" text,
"employees" real,
"reference_date" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many employees at nokia, ranked under 3?`:
```sql
|
SELECT "moving_from" FROM "incoming_transfers" WHERE "moving_to"='shakhtar donetsk' AND "rank"=8; |
## Task
Generate a SQL query to answer the following question:
`The person with a rank of 8 moving to Shakhtar Donetsk was moving from what Ukrainian Football Club as a transfer?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "incoming_transfers" (
"rank" real,
"year" real,
"name" text,
"moving_from" text,
"moving_to" text
);
### SQL
Given the database schema, here is the SQL query that answers `The person with a rank of 8 moving to Shakhtar Donetsk was moving from what Ukrainian Football Club as a transfer?`:
```sql
|
SELECT "moving_to" FROM "incoming_transfers" WHERE "year">2005 AND "rank">5 AND "name"='ismaël bangoura'; |
## Task
Generate a SQL query to answer the following question:
`Ismaël Bangoura with a rank larger than 5 after the year 2005 was moving to what football club?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "incoming_transfers" (
"rank" real,
"year" real,
"name" text,
"moving_from" text,
"moving_to" text
);
### SQL
Given the database schema, here is the SQL query that answers `Ismaël Bangoura with a rank larger than 5 after the year 2005 was moving to what football club?`:
```sql
|
SELECT "moving_from" FROM "incoming_transfers" WHERE "rank"=9; |
## Task
Generate a SQL query to answer the following question:
`The player with a rank of 9, made a move from what football club?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "incoming_transfers" (
"rank" real,
"year" real,
"name" text,
"moving_from" text,
"moving_to" text
);
### SQL
Given the database schema, here is the SQL query that answers `The player with a rank of 9, made a move from what football club?`:
```sql
|
SELECT MIN("rank") FROM "incoming_transfers" WHERE "year">2005 AND "moving_from"='nancy'; |
## Task
Generate a SQL query to answer the following question:
`Moving from Nancy after 2005, what is listed as the lowest rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "incoming_transfers" (
"rank" real,
"year" real,
"name" text,
"moving_from" text,
"moving_to" text
);
### SQL
Given the database schema, here is the SQL query that answers `Moving from Nancy after 2005, what is listed as the lowest rank?`:
```sql
|
SELECT "year" FROM "incoming_transfers" WHERE "rank"<8 AND "moving_from"='olympiacos'; |
## Task
Generate a SQL query to answer the following question:
`What is the listed year that has a rank smaller than 8 and moving from Olympiacos?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "incoming_transfers" (
"rank" real,
"year" real,
"name" text,
"moving_from" text,
"moving_to" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the listed year that has a rank smaller than 8 and moving from Olympiacos?`:
```sql
|
SELECT "home_venue" FROM "clubs_stadiums_and_locations" WHERE "state"='goa' AND "city"='salcette'; |
## Task
Generate a SQL query to answer the following question:
`Which team plays in Goa, Salcette?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "clubs_stadiums_and_locations" (
"team" text,
"city" text,
"state" text,
"home_venue" text,
"capacity" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which team plays in Goa, Salcette?`:
```sql
|
SELECT "home_venue" FROM "clubs_stadiums_and_locations" WHERE "team"='bengaluru fc'; |
## Task
Generate a SQL query to answer the following question:
`Where is the home venue of Bengaluru FC?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "clubs_stadiums_and_locations" (
"team" text,
"city" text,
"state" text,
"home_venue" text,
"capacity" real
);
### SQL
Given the database schema, here is the SQL query that answers `Where is the home venue of Bengaluru FC?`:
```sql
|
SELECT "state" FROM "clubs_stadiums_and_locations" WHERE "team"='mumbai'; |
## Task
Generate a SQL query to answer the following question:
`What is the state of the team who plays in Mumbai?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "clubs_stadiums_and_locations" (
"team" text,
"city" text,
"state" text,
"home_venue" text,
"capacity" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the state of the team who plays in Mumbai?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.