output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "player" FROM "r" WHERE "nationality"='united states' AND "years_in_toronto"='2003-06'; |
## Task
Generate a SQL query to answer the following question:
`Who is the player from United States who play in year 2003-06 in Toronto?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "r" (
"player" text,
"nationality" text,
"position" text,
"years_in_toronto" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the player from United States who play in year 2003-06 in Toronto?`:
```sql
|
SELECT AVG("units_sold") FROM "japan" WHERE "publisher"='square enix'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the average units sold for square enix`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "japan" (
"place" real,
"title" text,
"platform" text,
"publisher" text,
"units_sold" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the average units sold for square enix`:
```sql
|
SELECT "date" FROM "doubles_wins_30" WHERE "partnering"='nicolas pereira'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the date for nicolas pereira`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_wins_30" (
"date" text,
"tournament" text,
"surface" text,
"partnering" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the date for nicolas pereira`:
```sql
|
SELECT "date" FROM "1980s" WHERE "year"=1986; |
## Task
Generate a SQL query to answer the following question:
`what is the date in 1986?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980s" (
"year" real,
"competition" text,
"date" text,
"location" text,
"score" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the date in 1986?`:
```sql
|
SELECT AVG("year") FROM "achievements" WHERE "venue"='ponce, puerto rico'; |
## Task
Generate a SQL query to answer the following question:
`What is the average year for Ponce, Puerto Rico events?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average year for Ponce, Puerto Rico events?`:
```sql
|
SELECT "year" FROM "achievements" WHERE "event"='junior race' AND "position"='8th'; |
## Task
Generate a SQL query to answer the following question:
`What year did she place 8th in the junior race?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year did she place 8th in the junior race?`:
```sql
|
SELECT "nhl_team" FROM "round_two" WHERE "player"='ryan johnson'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the NHL team for ryan johnson`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_two" (
"pick" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the NHL team for ryan johnson`:
```sql
|
SELECT "position" FROM "round_two" WHERE "pick"='47'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the position for pick of 47`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_two" (
"pick" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the position for pick of 47`:
```sql
|
SELECT "pick" FROM "round_two" WHERE "nhl_team"='pittsburgh penguins'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the pick for pittsburgh penguins`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_two" (
"pick" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the pick for pittsburgh penguins`:
```sql
|
SELECT "nationality" FROM "round_two" WHERE "player"='rudolf vercik'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the nationality for rudolf vercik`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_two" (
"pick" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the nationality for rudolf vercik`:
```sql
|
SELECT "player" FROM "round_two" WHERE "nationality"='canada' AND "pick"='43'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the player for nationality of canada for pick of 43`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_two" (
"pick" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the player for nationality of canada for pick of 43`:
```sql
|
SELECT "college_junior_club_team" FROM "round_two" WHERE "player"='jason holland'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the college for jason holland`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_two" (
"pick" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the college for jason holland`:
```sql
|
SELECT "date" FROM "non_championship_grands_prix" WHERE "winning_driver"='rudolf caracciola' AND "name"='avusrennen'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the date for rudolf caracciola for avusrennen`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the date for rudolf caracciola for avusrennen`:
```sql
|
SELECT "circuit" FROM "non_championship_grands_prix" WHERE "date"='10 may' AND "name"='targa florio'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the circuit for 10 may for targa florio`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the circuit for 10 may for targa florio`:
```sql
|
SELECT "score" FROM "singles_36_14_22" WHERE "tournament"='washington'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the Washington tournament?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_36_14_22" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the Washington tournament?`:
```sql
|
SELECT "date" FROM "singles_36_14_22" WHERE "opponent"='patty fendick'; |
## Task
Generate a SQL query to answer the following question:
`On what date was Patty Fendick an opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_36_14_22" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was Patty Fendick an opponent?`:
```sql
|
SELECT "score" FROM "international_goals" WHERE "venue"='vasil levski national stadium, sofia'; |
## Task
Generate a SQL query to answer the following question:
`What score does Vasil Levski National Stadium, Sofia earn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What score does Vasil Levski National Stadium, Sofia earn?`:
```sql
|
SELECT "score" FROM "international_goals" WHERE "competition"='friendly' AND "venue"='vasil levski national stadium, sofia'; |
## Task
Generate a SQL query to answer the following question:
`What score did vasil levski national stadium, sofia, which was friendly during competition, earn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What score did vasil levski national stadium, sofia, which was friendly during competition, earn?`:
```sql
|
SELECT "nationality" FROM "round_seven" WHERE "nhl_team"='washington capitals'; |
## Task
Generate a SQL query to answer the following question:
`What is the nationality of the Washington Capitals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_seven" (
"pick" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the nationality of the Washington Capitals?`:
```sql
|
SELECT "nhl_team" FROM "round_seven" WHERE "player"='roman vopat'; |
## Task
Generate a SQL query to answer the following question:
`On what NHL team does Roman Vopat play for?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_seven" (
"pick" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what NHL team does Roman Vopat play for?`:
```sql
|
SELECT "position" FROM "round_seven" WHERE "nationality"='ukraine'; |
## Task
Generate a SQL query to answer the following question:
`What is the position of the player from the Ukraine?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_seven" (
"pick" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the position of the player from the Ukraine?`:
```sql
|
SELECT "tournament" FROM "achievements" WHERE "result"='12th'; |
## Task
Generate a SQL query to answer the following question:
`What Tournament did he place 12th in?`
### 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 `What Tournament did he place 12th in?`:
```sql
|
SELECT MIN("year") FROM "achievements" WHERE "result"='12th'; |
## Task
Generate a SQL query to answer the following question:
`What was the first year he placed 12th`
### 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 `What was the first year he placed 12th`:
```sql
|
SELECT "circuit" FROM "other_grands_prix" WHERE "winning_constructor"='alfa romeo' AND "name"='swedish ice race'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the circuit for alfa romeo swedish ice race`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the circuit for alfa romeo swedish ice race`:
```sql
|
SELECT "date" FROM "other_grands_prix" WHERE "winning_constructor"='bugatti' AND "winning_driver"='stanislas czaykowski'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the date for bugatti fpr stanislas czaykowski`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the date for bugatti fpr stanislas czaykowski`:
```sql
|
SELECT "circuit" FROM "other_grands_prix" WHERE "date"='20 august'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the circuit for 20 august`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the circuit for 20 august`:
```sql
|
SELECT "winning_driver" FROM "other_grands_prix" WHERE "name"='avusrennen'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the winning driver for avusrennen`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the winning driver for avusrennen`:
```sql
|
SELECT "report" FROM "other_grands_prix" WHERE "winning_constructor"='bugatti' AND "circuit"='brooklands'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the report for bugatti and brooklands`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the report for bugatti and brooklands`:
```sql
|
SELECT COUNT("year") FROM "1980_1989" WHERE "location"='helsinki'; |
## Task
Generate a SQL query to answer the following question:
`How many years has there been a competition in Helsinki?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980_1989" (
"year" real,
"competition" text,
"date" text,
"location" text,
"score" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years has there been a competition in Helsinki?`:
```sql
|
SELECT "competition" FROM "1980_1989" WHERE "year"<1982 AND "score"='2:3'; |
## Task
Generate a SQL query to answer the following question:
`Which competition before 1982 had a score of 2:3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980_1989" (
"year" real,
"competition" text,
"date" text,
"location" text,
"score" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which competition before 1982 had a score of 2:3?`:
```sql
|
SELECT "competition" FROM "1980_1989" WHERE "year">1980 AND "score"='0:5' AND "location"='jerusalem'; |
## Task
Generate a SQL query to answer the following question:
`Which competition occurred after 1980 with a score of 0:5 in Jerusalem?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980_1989" (
"year" real,
"competition" text,
"date" text,
"location" text,
"score" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which competition occurred after 1980 with a score of 0:5 in Jerusalem?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "attendance"='51,342'; |
## Task
Generate a SQL query to answer the following question:
`When was there an attendance of 51,342?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was there an attendance of 51,342?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "week"=7; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance during week 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance during week 7?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "week"=16; |
## Task
Generate a SQL query to answer the following question:
`What was the score during week 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score during week 16?`:
```sql
|
SELECT "minister" FROM "list_of_ghanaian_foreign_ministers" WHERE "left_office"='1960'; |
## Task
Generate a SQL query to answer the following question:
`Who is the mInister who left office during 1960?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_ghanaian_foreign_ministers" (
"number" real,
"minister" text,
"took_office" text,
"left_office" text,
"government" text,
"party" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the mInister who left office during 1960?`:
```sql
|
SELECT "government" FROM "list_of_ghanaian_foreign_ministers" WHERE "number"=6; |
## Task
Generate a SQL query to answer the following question:
`Which government is number 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_ghanaian_foreign_ministers" (
"number" real,
"minister" text,
"took_office" text,
"left_office" text,
"government" text,
"party" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which government is number 6?`:
```sql
|
SELECT "rider" FROM "1970_isle_of_man_lightweight_tt_250cc_fi" WHERE "speed"='90.57mph'; |
## Task
Generate a SQL query to answer the following question:
`Which rider had a speed of 90.57mph?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1970_isle_of_man_lightweight_tt_250cc_fi" (
"place" real,
"rider" text,
"country" text,
"machine" text,
"speed" text,
"time" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which rider had a speed of 90.57mph?`:
```sql
|
SELECT "country" FROM "1970_isle_of_man_lightweight_tt_250cc_fi" WHERE "place"<8 AND "points"<5; |
## Task
Generate a SQL query to answer the following question:
`Which country has a place smaller than 8 and points smaller than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1970_isle_of_man_lightweight_tt_250cc_fi" (
"place" real,
"rider" text,
"country" text,
"machine" text,
"speed" text,
"time" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which country has a place smaller than 8 and points smaller than 5?`:
```sql
|
SELECT MIN("losses") FROM "group_b" WHERE "wins"<4 AND "ties"=2 AND "place"=5; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of Losses when the number of Wins is less than 4, the number of Tie is 2, and the Place is 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_b" (
"place" real,
"team" text,
"wins" real,
"ties" real,
"losses" real,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest number of Losses when the number of Wins is less than 4, the number of Tie is 2, and the Place is 5?`:
```sql
|
SELECT "post_season_record_e" FROM "season_by_season_results" WHERE "mlb_affiliate"='kansas city'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the post-season record for kansas city`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_by_season_results" (
"season" text,
"manager" text,
"record_a" text,
"win_pct" real,
"post_season_record_e" text,
"post_season_win_pct" text,
"mlb_affiliate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the post-season record for kansas city`:
```sql
|
SELECT "venue" FROM "international_goals" WHERE "date"='29 april 2007'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the venue of 29 april 2007`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the venue of 29 april 2007`:
```sql
|
SELECT "competition" FROM "international_goals" WHERE "date"='20 august 2008'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the competition of 20 august 2008`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the competition of 20 august 2008`:
```sql
|
SELECT "date" FROM "international_goals" WHERE "venue"='stade des martyrs, dr congo'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the date of stade des martyrs, dr congo`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the date of stade des martyrs, dr congo`:
```sql
|
SELECT "amount_millions" FROM "finance" WHERE "payee"='infotalent'; |
## Task
Generate a SQL query to answer the following question:
`How much money, in millions, is paid to Infotalent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "finance" (
"payee" text,
"purpose" text,
"amount_millions" text,
"signatories" text,
"date_signed" text
);
### SQL
Given the database schema, here is the SQL query that answers `How much money, in millions, is paid to Infotalent?`:
```sql
|
SELECT "purpose" FROM "finance" WHERE "payee"='euromarine'; |
## Task
Generate a SQL query to answer the following question:
`What is the purpose of Euromarine?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "finance" (
"payee" text,
"purpose" text,
"amount_millions" text,
"signatories" text,
"date_signed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the purpose of Euromarine?`:
```sql
|
SELECT "signatories" FROM "finance" WHERE "purpose"='police security' AND "payee"='infotalent'; |
## Task
Generate a SQL query to answer the following question:
`What signatory has a purpose of police security and Infotalent payee?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "finance" (
"payee" text,
"purpose" text,
"amount_millions" text,
"signatories" text,
"date_signed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What signatory has a purpose of police security and Infotalent payee?`:
```sql
|
SELECT MAX("launched") FROM "oil_refining_and_petrochemical_facilitie" WHERE "name"='trn'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the highest launced for trn`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "oil_refining_and_petrochemical_facilitie" (
"name" text,
"location" text,
"launched" real,
"acquired" text,
"capacity_mln_tpa" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the highest launced for trn`:
```sql
|
SELECT AVG("launched") FROM "oil_refining_and_petrochemical_facilitie" WHERE "capacity_mln_tpa"='15,0'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the average launced for capacity mln tpa of 15,0`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "oil_refining_and_petrochemical_facilitie" (
"name" text,
"location" text,
"launched" real,
"acquired" text,
"capacity_mln_tpa" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the average launced for capacity mln tpa of 15,0`:
```sql
|
SELECT "period" FROM "see_also" WHERE "place"='red rock'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the period for red rock`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"camp" text,
"place" text,
"province" text,
"location" text,
"period" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the period for red rock`:
```sql
|
SELECT "province" FROM "see_also" WHERE "location"='260km ese of calgary'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the province for 260km ese of calgary`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"camp" text,
"place" text,
"province" text,
"location" text,
"period" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the province for 260km ese of calgary`:
```sql
|
SELECT "province" FROM "see_also" WHERE "period"='1941-1946'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the province of 1941-1946`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"camp" text,
"place" text,
"province" text,
"location" text,
"period" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the province of 1941-1946`:
```sql
|
SELECT "degree" FROM "nobel_laureate_alumni" WHERE "degree_year"='1983'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the degree for degree year of 1983`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nobel_laureate_alumni" (
"name" text,
"degree" text,
"degree_year" text,
"award_year" real,
"award" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the degree for degree year of 1983`:
```sql
|
SELECT "degree" FROM "nobel_laureate_alumni" WHERE "award_year"=1965 AND "award"='chemistry'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the degree for chemistry 1965`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nobel_laureate_alumni" (
"name" text,
"degree" text,
"degree_year" text,
"award_year" real,
"award" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the degree for chemistry 1965`:
```sql
|
SELECT "mp_s_term" FROM "initial_composition_of_the_2nd_parliamen" WHERE "electorate"='grey and bell'; |
## Task
Generate a SQL query to answer the following question:
`What is the MP's term who was elected from grey and bell?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "initial_composition_of_the_2nd_parliamen" (
"member" text,
"electorate" text,
"province" text,
"mp_s_term" text,
"election_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the MP's term who was elected from grey and bell?`:
```sql
|
SELECT "election_date" FROM "initial_composition_of_the_2nd_parliamen" WHERE "member"='william richmond category:articles with hcards'; |
## Task
Generate a SQL query to answer the following question:
`What is the Election date for Member william richmond category:articles with hcards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "initial_composition_of_the_2nd_parliamen" (
"member" text,
"electorate" text,
"province" text,
"mp_s_term" text,
"election_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Election date for Member william richmond category:articles with hcards?`:
```sql
|
SELECT "mp_s_term" FROM "initial_composition_of_the_2nd_parliamen" WHERE "member"='alfred east category:articles with hcards'; |
## Task
Generate a SQL query to answer the following question:
`What is Member alfred east category:articles with hcards's term?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "initial_composition_of_the_2nd_parliamen" (
"member" text,
"electorate" text,
"province" text,
"mp_s_term" text,
"election_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Member alfred east category:articles with hcards's term?`:
```sql
|
SELECT "election_date" FROM "initial_composition_of_the_2nd_parliamen" WHERE "electorate"='city of auckland category:articles with hcards'; |
## Task
Generate a SQL query to answer the following question:
`What is the election date for the city of auckland category:articles with hcards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "initial_composition_of_the_2nd_parliamen" (
"member" text,
"electorate" text,
"province" text,
"mp_s_term" text,
"election_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the election date for the city of auckland category:articles with hcards?`:
```sql
|
SELECT "electorate" FROM "initial_composition_of_the_2nd_parliamen" WHERE "member"='dingley brittin category:articles with hcards'; |
## Task
Generate a SQL query to answer the following question:
`What electorate does Member dingley brittin category:articles with hcards represent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "initial_composition_of_the_2nd_parliamen" (
"member" text,
"electorate" text,
"province" text,
"mp_s_term" text,
"election_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What electorate does Member dingley brittin category:articles with hcards represent?`:
```sql
|
SELECT "election_date" FROM "initial_composition_of_the_2nd_parliamen" WHERE "member"='charles brown category:articles with hcards'; |
## Task
Generate a SQL query to answer the following question:
`What is the election date for the electorate of member charles brown category:articles with hcards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "initial_composition_of_the_2nd_parliamen" (
"member" text,
"electorate" text,
"province" text,
"mp_s_term" text,
"election_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the election date for the electorate of member charles brown category:articles with hcards?`:
```sql
|
SELECT "date" FROM "1980s" WHERE "acts"='6 bands' AND "year">1981 AND "event"='monsters of rock'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the date for acts of 6 bands and year larger than 1981 for monsters of rock`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980s" (
"year" real,
"date" text,
"event" text,
"days" text,
"stages" text,
"acts" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the date for acts of 6 bands and year larger than 1981 for monsters of rock`:
```sql
|
SELECT "stages" FROM "1980s" WHERE "year"=1981; |
## Task
Generate a SQL query to answer the following question:
`Tell me the stages for 1981`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980s" (
"year" real,
"date" text,
"event" text,
"days" text,
"stages" text,
"acts" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the stages for 1981`:
```sql
|
SELECT "event" FROM "1980s" WHERE "acts"='6 bands'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the event for 6 bands`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980s" (
"year" real,
"date" text,
"event" text,
"days" text,
"stages" text,
"acts" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the event for 6 bands`:
```sql
|
SELECT "lightweight" FROM "popular_languages_used_for_data_exchange" WHERE "information_model"='no' AND "flexible"='unknown'; |
## Task
Generate a SQL query to answer the following question:
`What is the lightweight value with no information model and the flexible value is unknown?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "popular_languages_used_for_data_exchange" (
"schemas" text,
"flexible" text,
"semantic_verification" text,
"dictionary" text,
"information_model" text,
"synonyms_and_homonyms" text,
"dialecting" text,
"web_standard" text,
"transformations" text,
"lightweight" text,
"human_readable" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lightweight value with no information model and the flexible value is unknown?`:
```sql
|
SELECT "u_s_dance" FROM "solo" WHERE "year"=1986 AND "u_s_r_b"='9'; |
## Task
Generate a SQL query to answer the following question:
`What value for U.S. dance occurred in 1986 when the value of U.S. R&B was 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "solo" (
"year" real,
"title" text,
"u_s" text,
"u_s_r_b" text,
"u_s_dance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What value for U.S. dance occurred in 1986 when the value of U.S. R&B was 9?`:
```sql
|
SELECT "bore" FROM "salmson_post_world_war_one_engines" WHERE "cyl"='9-cyl radial' AND "name"='9 ad'; |
## Task
Generate a SQL query to answer the following question:
`What is the bore for a 9-cyl radial on a 9 AD?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "salmson_post_world_war_one_engines" (
"name" text,
"cyl" text,
"bore" text,
"capacity" text,
"power" text,
"weight" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the bore for a 9-cyl radial on a 9 AD?`:
```sql
|
SELECT "bore" FROM "salmson_post_world_war_one_engines" WHERE "name"='18 ab'; |
## Task
Generate a SQL query to answer the following question:
`What bore goes with an 18 AB?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "salmson_post_world_war_one_engines" (
"name" text,
"cyl" text,
"bore" text,
"capacity" text,
"power" text,
"weight" text
);
### SQL
Given the database schema, here is the SQL query that answers `What bore goes with an 18 AB?`:
```sql
|
SELECT "venue" FROM "major_achievements" WHERE "notes"='10.93 secs'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the venue for notes of 10.93 secs`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "major_achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the venue for notes of 10.93 secs`:
```sql
|
SELECT "venue" FROM "major_achievements" WHERE "year"<2003; |
## Task
Generate a SQL query to answer the following question:
`Tell me the venue for year less than 2003`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "major_achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the venue for year less than 2003`:
```sql
|
SELECT SUM("points") FROM "complete_formula_one_results" WHERE "team_chassis"='alfa romeo 184t'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of points team Alfa Romeo 184T won?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"team_chassis" text,
"engine" text,
"tyres" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of points team Alfa Romeo 184T won?`:
```sql
|
SELECT "engine" FROM "complete_formula_one_results" WHERE "year">1984; |
## Task
Generate a SQL query to answer the following question:
`What engine was used after 1984?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"team_chassis" text,
"engine" text,
"tyres" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What engine was used after 1984?`:
```sql
|
SELECT "year" FROM "complete_formula_one_results" WHERE "points">0; |
## Task
Generate a SQL query to answer the following question:
`In which year were the points more than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"team_chassis" text,
"engine" text,
"tyres" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `In which year were the points more than 0?`:
```sql
|
SELECT "tyres" FROM "complete_formula_one_results" WHERE "year">1984; |
## Task
Generate a SQL query to answer the following question:
`What were the Tyres after 1984?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"team_chassis" text,
"engine" text,
"tyres" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What were the Tyres after 1984?`:
```sql
|
SELECT "b_p_comp_2_c" FROM "binary_azeotropes" WHERE "pct_wt_comp_1"=76; |
## Task
Generate a SQL query to answer the following question:
`Tell me the bp comp 2 for % wt comp 1 of 76`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "binary_azeotropes" (
"component_1" text,
"b_p_comp_1_c" text,
"component_2" text,
"b_p_comp_2_c" text,
"b_p_azeo_c" text,
"pct_wt_comp_1" real,
"pct_wt_comp_2" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the bp comp 2 for % wt comp 1 of 76`:
```sql
|
SELECT COUNT("pct_wt_comp_1") FROM "binary_azeotropes" WHERE "pct_wt_comp_2"=27; |
## Task
Generate a SQL query to answer the following question:
`Tell me the total number of % wt comp 1 foR % wt comp 2 or 27`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "binary_azeotropes" (
"component_1" text,
"b_p_comp_1_c" text,
"component_2" text,
"b_p_comp_2_c" text,
"b_p_azeo_c" text,
"pct_wt_comp_1" real,
"pct_wt_comp_2" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the total number of % wt comp 1 foR % wt comp 2 or 27`:
```sql
|
SELECT "pct_of_popular_vote" FROM "election_results" WHERE "num_of_seats_available"=90; |
## Task
Generate a SQL query to answer the following question:
`What is the percentage of the popular vote when there were 90 seats available?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "election_results" (
"year_of_election" real,
"candidates_elected" real,
"num_of_seats_available" real,
"num_of_votes" text,
"pct_of_popular_vote" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the percentage of the popular vote when there were 90 seats available?`:
```sql
|
SELECT "gold" FROM "medals_by_country" WHERE "silver"=39; |
## Task
Generate a SQL query to answer the following question:
`Name the gold for silver of 39`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_by_country" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the gold for silver of 39`:
```sql
|
SELECT "compression_ratio" FROM "1973_engines" WHERE "engine"='302-2v windsor v8'; |
## Task
Generate a SQL query to answer the following question:
`What is the compression ratio for the 302-2v Windsor v8 engine?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1973_engines" (
"engine" text,
"horsepower" text,
"torque" text,
"carburetor" text,
"compression_ratio" text,
"bore_stroke" text,
"vin_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the compression ratio for the 302-2v Windsor v8 engine?`:
```sql
|
SELECT COUNT("games") FROM "career_rushing_statistics_at_ohio_state" WHERE "rushes"=41 AND "yards"<197; |
## Task
Generate a SQL query to answer the following question:
`How many games had 41 rushes and were than 197 yards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_rushing_statistics_at_ohio_state" (
"year" text,
"games" real,
"rushes" real,
"yards" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many games had 41 rushes and were than 197 yards?`:
```sql
|
SELECT MAX("yards") FROM "career_rushing_statistics_at_ohio_state" WHERE "rushes"<51 AND "games">12; |
## Task
Generate a SQL query to answer the following question:
`What was the highest number of yards in years where there were fewer than 51 rushes and more than 12 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_rushing_statistics_at_ohio_state" (
"year" text,
"games" real,
"rushes" real,
"yards" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the highest number of yards in years where there were fewer than 51 rushes and more than 12 games?`:
```sql
|
SELECT MIN("pick_num") FROM "round_three" WHERE "player"='dimelon westfield'; |
## Task
Generate a SQL query to answer the following question:
`What is the pick # for Dimelon Westfield?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_three" (
"pick_num" real,
"mls_team" text,
"player" text,
"position" text,
"affiliation" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the pick # for Dimelon Westfield?`:
```sql
|
SELECT "result" FROM "schedule_and_results" WHERE "date"='november 8, 2001'; |
## Task
Generate a SQL query to answer the following question:
`What was the final score of the November 8, 2001 game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"date" text,
"opponent" text,
"location" text,
"result" text,
"overall" text,
"conf" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the final score of the November 8, 2001 game?`:
```sql
|
SELECT "bullet_tip_color" FROM "headstamps_and_colour_coding" WHERE "headstamp_id"='h1z'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the bullet tip color of headstamp id of h1z`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "headstamps_and_colour_coding" (
"headstamp_id" text,
"primer_annulus_color" text,
"bullet_tip_color" text,
"other_features" text,
"functional_type" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the bullet tip color of headstamp id of h1z`:
```sql
|
SELECT COUNT("gold") FROM "medal_table" WHERE "bronze">0 AND "rank"='total' AND "total">100; |
## Task
Generate a SQL query to answer the following question:
`Tell me the total number of gold for bronze more than 0 and total more than 100`
### 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" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the total number of gold for bronze more than 0 and total more than 100`:
```sql
|
SELECT MIN("silver") FROM "medal_table" WHERE "total"<6 AND "rank"='8'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the least silver for total less than 6 and rank of 8`
### 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" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the least silver for total less than 6 and rank of 8`:
```sql
|
SELECT "men_s_singles" FROM "winners" WHERE "year"='1951'; |
## Task
Generate a SQL query to answer the following question:
`Who played men's singles in 1951?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" text,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who played men's singles in 1951?`:
```sql
|
SELECT "women_s_singles" FROM "winners" WHERE "year"='1955'; |
## Task
Generate a SQL query to answer the following question:
`Who played women's singles in 1955?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" text,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who played women's singles in 1955?`:
```sql
|
SELECT "women_s_singles" FROM "winners" WHERE "men_s_singles"='xiong guobao' AND "men_s_doubles"='tian bingyi li yongbo'; |
## Task
Generate a SQL query to answer the following question:
`Who played Women's singles when xiong guobao played men's singles, and tian bingyi li yongbo played Men's doubles?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" text,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who played Women's singles when xiong guobao played men's singles, and tian bingyi li yongbo played Men's doubles?`:
```sql
|
SELECT "men_s_doubles" FROM "winners" WHERE "women_s_doubles"='gao ling huang sui' AND "year"='2007'; |
## Task
Generate a SQL query to answer the following question:
`Who played men's doubles when gao ling huang sui played women's doubles in 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" text,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who played men's doubles when gao ling huang sui played women's doubles in 2007?`:
```sql
|
SELECT "year" FROM "winners" WHERE "women_s_doubles"='huang nanyan yang wei' AND "men_s_doubles"='lee dong-soo yoo yong-sung'; |
## Task
Generate a SQL query to answer the following question:
`What year did huang nanyan yang wei play women's doubles and Men's doubles was played by lee dong-soo yoo yong-sung?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" text,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year did huang nanyan yang wei play women's doubles and Men's doubles was played by lee dong-soo yoo yong-sung?`:
```sql
|
SELECT "men_s_doubles" FROM "winners" WHERE "men_s_singles"='wong peng soon' AND "women_s_singles"='cecilia samuel' AND "year"='1952'; |
## Task
Generate a SQL query to answer the following question:
`Who played men's doubles when men's singles were played by wong peng soon and Women's singles was played by cecilia samuel, in 1952?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" text,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who played men's doubles when men's singles were played by wong peng soon and Women's singles was played by cecilia samuel, in 1952?`:
```sql
|
SELECT "1st_leg" FROM "round_of_16" WHERE "team_1"='marseille'; |
## Task
Generate a SQL query to answer the following question:
`What is the first leg score in that match where Marseille was the first team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_of_16" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the first leg score in that match where Marseille was the first team?`:
```sql
|
SELECT "discovery_publication_of_name" FROM "comparative_table_of_homo_species_view_t" WHERE "fossil_record"='still living'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the discovery/publication for still living`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparative_table_of_homo_species_view_t" (
"species" text,
"lived_when_mya" text,
"lived_where" text,
"fossil_record" text,
"discovery_publication_of_name" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the discovery/publication for still living`:
```sql
|
SELECT "discovery_publication_of_name" FROM "comparative_table_of_homo_species_view_t" WHERE "species"='red deer cave people'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the discovery/publication for red deer cave people`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparative_table_of_homo_species_view_t" (
"species" text,
"lived_when_mya" text,
"lived_where" text,
"fossil_record" text,
"discovery_publication_of_name" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the discovery/publication for red deer cave people`:
```sql
|
SELECT "discovery_publication_of_name" FROM "comparative_table_of_homo_species_view_t" WHERE "species"='h.heidelbergensis'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the discovery/publicatio of name for h.heidelbergensis`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparative_table_of_homo_species_view_t" (
"species" text,
"lived_when_mya" text,
"lived_where" text,
"fossil_record" text,
"discovery_publication_of_name" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the discovery/publicatio of name for h.heidelbergensis`:
```sql
|
SELECT "fossil_record" FROM "comparative_table_of_homo_species_view_t" WHERE "discovery_publication_of_name"='1994/2003'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the fossil record for name of 1994/2003`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparative_table_of_homo_species_view_t" (
"species" text,
"lived_when_mya" text,
"lived_where" text,
"fossil_record" text,
"discovery_publication_of_name" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the fossil record for name of 1994/2003`:
```sql
|
SELECT "lived_when_mya" FROM "comparative_table_of_homo_species_view_t" WHERE "discovery_publication_of_name"='1994/2003'; |
## Task
Generate a SQL query to answer the following question:
`Tell me lived for name of 1994/2003`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparative_table_of_homo_species_view_t" (
"species" text,
"lived_when_mya" text,
"lived_where" text,
"fossil_record" text,
"discovery_publication_of_name" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me lived for name of 1994/2003`:
```sql
|
SELECT "date" FROM "european_championship_grands_prix" WHERE "circuit"='monza'; |
## Task
Generate a SQL query to answer the following question:
`When was the Monza circuit?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_championship_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_drivers" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the Monza circuit?`:
```sql
|
SELECT "win_pct" FROM "record_by_conference" WHERE "conference"='metro'; |
## Task
Generate a SQL query to answer the following question:
`What is Metro's win percentage?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "record_by_conference" (
"conference" text,
"num_of_bids" real,
"record" text,
"win_pct" text,
"round_of_32" text,
"elite_eight" text,
"final_four" text,
"championship_game" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Metro's win percentage?`:
```sql
|
SELECT "elite_eight" FROM "record_by_conference" WHERE "conference"='atlantic 10'; |
## Task
Generate a SQL query to answer the following question:
`How many elite eight teams came from the Atlantic 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "record_by_conference" (
"conference" text,
"num_of_bids" real,
"record" text,
"win_pct" text,
"round_of_32" text,
"elite_eight" text,
"final_four" text,
"championship_game" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many elite eight teams came from the Atlantic 10?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "attendance"='55,527'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the opponent for attendance of 55,527`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the opponent for attendance of 55,527`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.