output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "years" FROM "kaikoura_district" WHERE "roll">23 AND "decile">5; |
## Task
Generate a SQL query to answer the following question:
`Name the Years of schools with a Roll Larger than 23 and a Decile greater than 5.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "kaikoura_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Years of schools with a Roll Larger than 23 and a Decile greater than 5.`:
```sql
|
SELECT COUNT("roll") FROM "kaikoura_district" WHERE "authority"='state' AND "area"='hapuku' AND "decile">4; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Rolls of State schools in Hapuku with a Decile greater than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "kaikoura_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Rolls of State schools in Hapuku with a Decile greater than 4?`:
```sql
|
SELECT "d_45" FROM "senate_composition_before_the_elections" WHERE "d_42"='r 22'; |
## Task
Generate a SQL query to answer the following question:
`What is the D45 associated with a D42 of r 22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_before_the_elections" (
"d_48" text,
"d_47" text,
"d_46" text,
"d_45" text,
"d_44" text,
"d_43" text,
"d_42" text,
"d_41" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the D45 associated with a D42 of r 22?`:
```sql
|
SELECT "d_43" FROM "senate_composition_before_the_elections" WHERE "d_41"='r 21'; |
## Task
Generate a SQL query to answer the following question:
`What is the D43 associated with a D41 of r 21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_before_the_elections" (
"d_48" text,
"d_47" text,
"d_46" text,
"d_45" text,
"d_44" text,
"d_43" text,
"d_42" text,
"d_41" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the D43 associated with a D41 of r 21?`:
```sql
|
SELECT "d_42" FROM "senate_composition_before_the_elections" WHERE "d_47"='d 27'; |
## Task
Generate a SQL query to answer the following question:
`What is the D42 associated with a D47 of d 27?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_before_the_elections" (
"d_48" text,
"d_47" text,
"d_46" text,
"d_45" text,
"d_44" text,
"d_43" text,
"d_42" text,
"d_41" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the D42 associated with a D47 of d 27?`:
```sql
|
SELECT "d_43" FROM "senate_composition_before_the_elections" WHERE "d_41"='r 16'; |
## Task
Generate a SQL query to answer the following question:
`What is the D43 associated with a D41 of r 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_before_the_elections" (
"d_48" text,
"d_47" text,
"d_46" text,
"d_45" text,
"d_44" text,
"d_43" text,
"d_42" text,
"d_41" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the D43 associated with a D41 of r 16?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "loss"='hargan (14β13)'; |
## Task
Generate a SQL query to answer the following question:
`What is the record for the game when the loss was hargan (14β13)?`
### 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,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record for the game when the loss was hargan (14β13)?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "score"='7β5'; |
## Task
Generate a SQL query to answer the following question:
`What is the record for the game with a score of 7β5?`
### 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,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record for the game with a score of 7β5?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "loss"='aker (3β8)'; |
## Task
Generate a SQL query to answer the following question:
`What date was the game with loss of Aker (3β8)?`
### 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,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the game with loss of Aker (3β8)?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "score"='7β1'; |
## Task
Generate a SQL query to answer the following question:
`What team was the opponent when the score was 7β1?`
### 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,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the opponent when the score was 7β1?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "opponent"='orioles' AND "loss"='morehead (5β4)'; |
## Task
Generate a SQL query to answer the following question:
`What was the score when the opponent was the Orioles and the loss shows morehead (5β4)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score when the opponent was the Orioles and the loss shows morehead (5β4)?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "record"='60-61'; |
## Task
Generate a SQL query to answer the following question:
`Name the opponent with a record of 60-61`
### 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 `Name the opponent with a record of 60-61`:
```sql
|
SELECT "name" FROM "final_results_2007_fai_world_grand_prix" WHERE "perfection"='77.96%'; |
## Task
Generate a SQL query to answer the following question:
`Who had a perfection percentage of 77.96%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_results_2007_fai_world_grand_prix" (
"rank" real,
"name" text,
"nationality" text,
"score" text,
"perfection" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had a perfection percentage of 77.96%?`:
```sql
|
SELECT "rank" FROM "final_results_2007_fai_world_grand_prix" WHERE "name"='svetlana fedorenko'; |
## Task
Generate a SQL query to answer the following question:
`What was the rank of Svetlana Fedorenko?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_results_2007_fai_world_grand_prix" (
"rank" real,
"name" text,
"nationality" text,
"score" text,
"perfection" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the rank of Svetlana Fedorenko?`:
```sql
|
SELECT "name" FROM "final_results_2007_fai_world_grand_prix" WHERE "perfection"='73.24%'; |
## Task
Generate a SQL query to answer the following question:
`Who had a perfection percentage of 73.24%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_results_2007_fai_world_grand_prix" (
"rank" real,
"name" text,
"nationality" text,
"score" text,
"perfection" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had a perfection percentage of 73.24%?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "date"='june 1'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game on June 1?`
### 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,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game on June 1?`:
```sql
|
SELECT "score" FROM "futures_and_challengers_singles_titles" WHERE "opponent"='andrei pavel'; |
## Task
Generate a SQL query to answer the following question:
`What was the score against andrei pavel?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "futures_and_challengers_singles_titles" (
"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 against andrei pavel?`:
```sql
|
SELECT "date" FROM "futures_and_challengers_singles_titles" WHERE "tournament"='bologna'; |
## Task
Generate a SQL query to answer the following question:
`When was the tournament of bologna?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "futures_and_challengers_singles_titles" (
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the tournament of bologna?`:
```sql
|
SELECT "opponent" FROM "futures_and_challengers_singles_titles" WHERE "surface"='clay' AND "score"='6β1, 7β6'; |
## Task
Generate a SQL query to answer the following question:
`Who played on clay and had a score of 6β1, 7β6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "futures_and_challengers_singles_titles" (
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who played on clay and had a score of 6β1, 7β6?`:
```sql
|
SELECT "opponent" FROM "futures_and_challengers_singles_titles" WHERE "surface"='clay' AND "date"='3 march 2012'; |
## Task
Generate a SQL query to answer the following question:
`Who played on clay on 3 march 2012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "futures_and_challengers_singles_titles" (
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who played on clay on 3 march 2012?`:
```sql
|
SELECT "score" FROM "futures_and_challengers_singles_titles" WHERE "opponent"='fabrice martin'; |
## Task
Generate a SQL query to answer the following question:
`What was the score against fabrice martin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "futures_and_challengers_singles_titles" (
"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 against fabrice martin?`:
```sql
|
SELECT "surface" FROM "futures_and_challengers_singles_titles" WHERE "score"='7β5, 3β6, 7β6'; |
## Task
Generate a SQL query to answer the following question:
`What was the surface of the score of 7β5, 3β6, 7β6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "futures_and_challengers_singles_titles" (
"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 surface of the score of 7β5, 3β6, 7β6?`:
```sql
|
SELECT "order" FROM "cardinal_electors" WHERE "elector"='marino bulcani'; |
## Task
Generate a SQL query to answer the following question:
`What's the Order with an Elector of Marino Bulcani?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cardinal_electors" (
"elector" text,
"order" text,
"title" text,
"elevated" text,
"elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the Order with an Elector of Marino Bulcani?`:
```sql
|
SELECT "elevator" FROM "cardinal_electors" WHERE "elevated"='1378, september 18' AND "order"='cardinal-priest' AND "elector"='poncello orsini'; |
## Task
Generate a SQL query to answer the following question:
`What's the Elevator that has Elevated: 1378, September 18, an Order of Cardinal-Priest, and an Elector of Poncello Orsini?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cardinal_electors" (
"elector" text,
"order" text,
"title" text,
"elevated" text,
"elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the Elevator that has Elevated: 1378, September 18, an Order of Cardinal-Priest, and an Elector of Poncello Orsini?`:
```sql
|
SELECT "elector" FROM "cardinal_electors" WHERE "title"='deacon of s. maria in domnica'; |
## Task
Generate a SQL query to answer the following question:
`What is listed as the Elector with the Title of Deacon of S. Maria in Domnica?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cardinal_electors" (
"elector" text,
"order" text,
"title" text,
"elevated" text,
"elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is listed as the Elector with the Title of Deacon of S. Maria in Domnica?`:
```sql
|
SELECT "elevated" FROM "cardinal_electors" WHERE "order"='cardinal-bishop'; |
## Task
Generate a SQL query to answer the following question:
`What's listed for the Elevated category that has an Order of Cardinal-Bishop?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cardinal_electors" (
"elector" text,
"order" text,
"title" text,
"elevated" text,
"elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's listed for the Elevated category that has an Order of Cardinal-Bishop?`:
```sql
|
SELECT "division_record" FROM "2006_regular_season_football_standings" WHERE "school"='milford'; |
## Task
Generate a SQL query to answer the following question:
`The Milford School has what Division Record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_regular_season_football_standings" (
"school" text,
"team" text,
"division_record" text,
"overall_record" text,
"season_outcome" text
);
### SQL
Given the database schema, here is the SQL query that answers `The Milford School has what Division Record?`:
```sql
|
SELECT "team" FROM "2006_regular_season_football_standings" WHERE "school"='sussex tech'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the School of the Sussex Tech's Team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_regular_season_football_standings" (
"school" text,
"team" text,
"division_record" text,
"overall_record" text,
"season_outcome" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the School of the Sussex Tech's Team?`:
```sql
|
SELECT "score" FROM "final_leaderboard" WHERE "player"='arnold palmer'; |
## Task
Generate a SQL query to answer the following question:
`What was Arnold Palmer's score in the tournamnet?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money_us" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was Arnold Palmer's score in the tournamnet?`:
```sql
|
SELECT "party" FROM "see_also" WHERE "member"='peter white'; |
## Task
Generate a SQL query to answer the following question:
`What the name of Peter White's party?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"term_in_office" text
);
### SQL
Given the database schema, here is the SQL query that answers `What the name of Peter White's party?`:
```sql
|
SELECT "term_in_office" FROM "see_also" WHERE "electorate"='indi'; |
## Task
Generate a SQL query to answer the following question:
`What term did an Electorate of indi have in office?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"term_in_office" text
);
### SQL
Given the database schema, here is the SQL query that answers `What term did an Electorate of indi have in office?`:
```sql
|
SELECT "term_in_office" FROM "see_also" WHERE "member"='hon ralph hunt'; |
## Task
Generate a SQL query to answer the following question:
`What term did hon ralph hunt serve in office?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"term_in_office" text
);
### SQL
Given the database schema, here is the SQL query that answers `What term did hon ralph hunt serve in office?`:
```sql
|
SELECT "party" FROM "see_also" WHERE "state"='vic' AND "member"='peter fisher'; |
## Task
Generate a SQL query to answer the following question:
`What party is Peter Fisher from Vic serve in office?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"term_in_office" text
);
### SQL
Given the database schema, here is the SQL query that answers `What party is Peter Fisher from Vic serve in office?`:
```sql
|
SELECT SUM("laps") FROM "24_hours_of_le_mans_results" WHERE "year"=2012; |
## Task
Generate a SQL query to answer the following question:
`How many laps were done in 2012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many laps were done in 2012?`:
```sql
|
SELECT "date" FROM "singles_6_6" WHERE "score"='1β6 6β1 3β6'; |
## Task
Generate a SQL query to answer the following question:
`On what day was the score of 1β6 6β1 3β6 achieved?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_6_6" (
"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 day was the score of 1β6 6β1 3β6 achieved?`:
```sql
|
SELECT AVG("gold") FROM "medal_table" WHERE "total"<14 AND "bronze"<1 AND "nation"='czech republic'; |
## Task
Generate a SQL query to answer the following question:
`Name the average gold for czech republic and bronze less than 1 when total is less than 14`
### 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 `Name the average gold for czech republic and bronze less than 1 when total is less than 14`:
```sql
|
SELECT MAX("rank") FROM "medal_table" WHERE "silver"=4 AND "bronze"<3; |
## Task
Generate a SQL query to answer the following question:
`Name the highest rank when silver is 4 and bronze is less than 3`
### 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 `Name the highest rank when silver is 4 and bronze is less than 3`:
```sql
|
SELECT COUNT("total") FROM "medal_table" WHERE "bronze"=4 AND "silver">6; |
## Task
Generate a SQL query to answer the following question:
`Name the total number of total for bronze of 4 and silver more than 6`
### 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 `Name the total number of total for bronze of 4 and silver more than 6`:
```sql
|
SELECT "outcome" FROM "doubles_19_5_14" WHERE "surface"='carpet (i)'; |
## Task
Generate a SQL query to answer the following question:
`When the Surface was Carpet (i), what was the Outcome?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_19_5_14" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the Surface was Carpet (i), what was the Outcome?`:
```sql
|
SELECT SUM("draw") FROM "eurolaul_26_january_2002" WHERE "place">6 AND "votes">38; |
## Task
Generate a SQL query to answer the following question:
`What is the draw number of the song with a place lower than 6 and more than 38 votes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eurolaul_26_january_2002" (
"draw" real,
"artist" text,
"song" text,
"votes" real,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the draw number of the song with a place lower than 6 and more than 38 votes?`:
```sql
|
SELECT COUNT("votes") FROM "eurolaul_26_january_2002" WHERE "artist"='sahlene' AND "place">1; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of votes Sahlene with a place below 1 has?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eurolaul_26_january_2002" (
"draw" real,
"artist" text,
"song" text,
"votes" real,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of votes Sahlene with a place below 1 has?`:
```sql
|
SELECT MAX("place") FROM "eurolaul_26_january_2002" WHERE "votes"=38 AND "draw">3; |
## Task
Generate a SQL query to answer the following question:
`What is the highest place of the song with 38 votes and a draw great than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eurolaul_26_january_2002" (
"draw" real,
"artist" text,
"song" text,
"votes" real,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest place of the song with 38 votes and a draw great than 3?`:
```sql
|
SELECT SUM("votes") FROM "eurolaul_26_january_2002" WHERE "draw"<4 AND "artist"='yvetta kadakas & ivo linna'; |
## Task
Generate a SQL query to answer the following question:
`How many votes did Yvetta Kadakas & Ivo Linna, who had less than 4 draws, have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eurolaul_26_january_2002" (
"draw" real,
"artist" text,
"song" text,
"votes" real,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many votes did Yvetta Kadakas & Ivo Linna, who had less than 4 draws, have?`:
```sql
|
SELECT "year" FROM "indianapolis_500" WHERE "finish"='3'; |
## Task
Generate a SQL query to answer the following question:
`What year was there a finish of 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indianapolis_500" (
"year" real,
"chassis" text,
"engine" text,
"start" text,
"finish" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was there a finish of 3?`:
```sql
|
SELECT SUM("year") FROM "indianapolis_500" WHERE "start"='33'; |
## Task
Generate a SQL query to answer the following question:
`What year was the start 33?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indianapolis_500" (
"year" real,
"chassis" text,
"engine" text,
"start" text,
"finish" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was the start 33?`:
```sql
|
SELECT "year" FROM "indianapolis_500" WHERE "team"='simon' AND "start"='3'; |
## Task
Generate a SQL query to answer the following question:
`When was there a team of Simon and the start was 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indianapolis_500" (
"year" real,
"chassis" text,
"engine" text,
"start" text,
"finish" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was there a team of Simon and the start was 3?`:
```sql
|
SELECT "city" FROM "completed" WHERE "spire_m"='105' AND "roof_m"<96 AND "built"=1985; |
## Task
Generate a SQL query to answer the following question:
`What's the name of the 1985 city with a Spire (m) of 105, and a Roof (m) smaller than 96?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "completed" (
"rank" real,
"city" text,
"roof_m" real,
"spire_m" text,
"floors" real,
"built" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the name of the 1985 city with a Spire (m) of 105, and a Roof (m) smaller than 96?`:
```sql
|
SELECT AVG("floors") FROM "completed" WHERE "built"=2004 AND "roof_m"=106; |
## Task
Generate a SQL query to answer the following question:
`What's the average number of floors that were built in 2004, and have a roof (m) of 106?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "completed" (
"rank" real,
"city" text,
"roof_m" real,
"spire_m" text,
"floors" real,
"built" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the average number of floors that were built in 2004, and have a roof (m) of 106?`:
```sql
|
SELECT SUM("floors") FROM "completed" WHERE "built">2006 AND "rank"=12; |
## Task
Generate a SQL query to answer the following question:
`What's the total number of floors built after 2006, and have a rank of 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "completed" (
"rank" real,
"city" text,
"roof_m" real,
"spire_m" text,
"floors" real,
"built" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the total number of floors built after 2006, and have a rank of 12?`:
```sql
|
SELECT SUM("attendance") FROM "league_cup" WHERE "h_a"='n'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of attendance for H/A values of "n"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_cup" (
"date" text,
"round" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of attendance for H/A values of "n"?`:
```sql
|
SELECT "score" FROM "singles" WHERE "opponent"='stefano galvani'; |
## Task
Generate a SQL query to answer the following question:
`Name the score which has opponent of stefano galvani`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"outcome" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the score which has opponent of stefano galvani`:
```sql
|
SELECT "score" FROM "singles" WHERE "opponent"='javier genaro-martinez'; |
## Task
Generate a SQL query to answer the following question:
`Name the score with opponent of javier genaro-martinez`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"outcome" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the score with opponent of javier genaro-martinez`:
```sql
|
SELECT "outcome" FROM "singles" WHERE "tournament"='dunlop world challenge'; |
## Task
Generate a SQL query to answer the following question:
`Name the outcome for dunlop world challenge`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"outcome" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the outcome for dunlop world challenge`:
```sql
|
SELECT "visiting_team" FROM "1998" WHERE "date"='december 6'; |
## Task
Generate a SQL query to answer the following question:
`Who was the visiting team on December 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1998" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the visiting team on December 6?`:
```sql
|
SELECT "host_team" FROM "1998" WHERE "date"='october 4'; |
## Task
Generate a SQL query to answer the following question:
`Who was the host team on October 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1998" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the host team on October 4?`:
```sql
|
SELECT "value_usd" FROM "list_of_subsidiaries" WHERE "date"='unknown' AND "business"='energy' AND "country"='new zealand'; |
## Task
Generate a SQL query to answer the following question:
`In New Zealand, what's the value that has an unknown date and is an energy business?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_subsidiaries" (
"date" text,
"company" text,
"business" text,
"country" text,
"value_usd" text
);
### SQL
Given the database schema, here is the SQL query that answers `In New Zealand, what's the value that has an unknown date and is an energy business?`:
```sql
|
SELECT "company" FROM "list_of_subsidiaries" WHERE "business"='energy' AND "date"='unknown'; |
## Task
Generate a SQL query to answer the following question:
`What company has an unknown date and is an energy business?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_subsidiaries" (
"date" text,
"company" text,
"business" text,
"country" text,
"value_usd" text
);
### SQL
Given the database schema, here is the SQL query that answers `What company has an unknown date and is an energy business?`:
```sql
|
SELECT "company" FROM "list_of_subsidiaries" WHERE "business"='energy' AND "date"='unknown' AND "country"='united kingdom'; |
## Task
Generate a SQL query to answer the following question:
`In the United Kingdom, what company has an unknown date and is an energy business?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_subsidiaries" (
"date" text,
"company" text,
"business" text,
"country" text,
"value_usd" text
);
### SQL
Given the database schema, here is the SQL query that answers `In the United Kingdom, what company has an unknown date and is an energy business?`:
```sql
|
SELECT "date" FROM "list_of_subsidiaries" WHERE "country"='united kingdom'; |
## Task
Generate a SQL query to answer the following question:
`For the United Kingdom, what's the date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_subsidiaries" (
"date" text,
"company" text,
"business" text,
"country" text,
"value_usd" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the United Kingdom, what's the date?`:
```sql
|
SELECT "country" FROM "list_of_subsidiaries" WHERE "date"='unknown' AND "company"='enernoc australia pty ltd'; |
## Task
Generate a SQL query to answer the following question:
`For the Enernoc Australia Pty Ltd, what's the country with an unknown date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_subsidiaries" (
"date" text,
"company" text,
"business" text,
"country" text,
"value_usd" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the Enernoc Australia Pty Ltd, what's the country with an unknown date?`:
```sql
|
SELECT "date" FROM "international_goals" WHERE "venue"='luxembourg'; |
## Task
Generate a SQL query to answer the following question:
`Which date is associated with a venue of Luxembourg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which date is associated with a venue of Luxembourg?`:
```sql
|
SELECT SUM("year") FROM "complete_formula_one_world_championship_" WHERE "chassis"='kurtis kraft 500a' AND "points"<1.5; |
## Task
Generate a SQL query to answer the following question:
`What is the year with a Kurtis Kraft 500a chassis, and less than 1.5 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the year with a Kurtis Kraft 500a chassis, and less than 1.5 points?`:
```sql
|
SELECT SUM("year") FROM "complete_formula_one_world_championship_" WHERE "chassis"='kurtis kraft 500a'; |
## Task
Generate a SQL query to answer the following question:
`What is the year with a kurtis kraft 500a chassis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the year with a kurtis kraft 500a chassis?`:
```sql
|
SELECT MIN("pick_num") FROM "indianapolis_colts_draft_history" WHERE "college"='saint vincent college'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Pick # of Saint Vincent College?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indianapolis_colts_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Pick # of Saint Vincent College?`:
```sql
|
SELECT MIN("overall") FROM "indianapolis_colts_draft_history" WHERE "name"='jack harmon' AND "pick_num"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the Overall for Pick # less than 5 Jack Harmon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indianapolis_colts_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Overall for Pick # less than 5 Jack Harmon?`:
```sql
|
SELECT "rank" FROM "eurostat_data_for_2009" WHERE "total_gdp_bn"='β¬11.243'; |
## Task
Generate a SQL query to answer the following question:
`Which rank has a Total GDP (β¬ bn) of β¬11.243??`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eurostat_data_for_2009" (
"rank" text,
"region" text,
"total_gdp_bn" text,
"pct_growth" text,
"per_capita" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which rank has a Total GDP (β¬ bn) of β¬11.243??`:
```sql
|
SELECT "region" FROM "eurostat_data_for_2009" WHERE "total_gdp_bn"='β¬11,745.353'; |
## Task
Generate a SQL query to answer the following question:
`What is the Region that has a Total GDP (β¬ bn ) of β¬11,745.353?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eurostat_data_for_2009" (
"rank" text,
"region" text,
"total_gdp_bn" text,
"pct_growth" text,
"per_capita" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Region that has a Total GDP (β¬ bn ) of β¬11,745.353?`:
```sql
|
SELECT "region" FROM "eurostat_data_for_2009" WHERE "pct_growth"='β3.6'; |
## Task
Generate a SQL query to answer the following question:
`Which Region that has a growth of β3.6%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eurostat_data_for_2009" (
"rank" text,
"region" text,
"total_gdp_bn" text,
"pct_growth" text,
"per_capita" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Region that has a growth of β3.6%?`:
```sql
|
SELECT "per_capita" FROM "eurostat_data_for_2009" WHERE "region"='greece'; |
## Task
Generate a SQL query to answer the following question:
`What is the per capita of Greece?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eurostat_data_for_2009" (
"rank" text,
"region" text,
"total_gdp_bn" text,
"pct_growth" text,
"per_capita" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the per capita of Greece?`:
```sql
|
SELECT MIN("silver") FROM "medal_table" WHERE "bronze"=40 AND "gold">42; |
## Task
Generate a SQL query to answer the following question:
`What is the fewest number of silver medals received by a nation who received 40 bronze medals and more than 42 gold medals?`
### 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 `What is the fewest number of silver medals received by a nation who received 40 bronze medals and more than 42 gold medals?`:
```sql
|
SELECT MIN("silver") FROM "medal_table" WHERE "total">3 AND "bronze">22 AND "gold"<395 AND "nation"='austria'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of silver medals received by Austria when they receive more than 3 total medals, more than 22 bronze medals, and fewer than 395 gold medals?`
### 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 `What is the lowest number of silver medals received by Austria when they receive more than 3 total medals, more than 22 bronze medals, and fewer than 395 gold medals?`:
```sql
|
SELECT AVG("silver") FROM "medal_table" WHERE "gold">6 AND "bronze"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the average number of silver medals with more than 6 gold meals and less than 5 bronze medals?`
### 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 average number of silver medals with more than 6 gold meals and less than 5 bronze medals?`:
```sql
|
SELECT COUNT("rank") FROM "medal_table" WHERE "nation"='switzerland' AND "total">2; |
## Task
Generate a SQL query to answer the following question:
`How many ranks are for Switzerland with more than 2 total medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many ranks are for Switzerland with more than 2 total medals?`:
```sql
|
SELECT "event" FROM "mixed_martial_arts_record" WHERE "round">2 AND "method"='ko (kick)'; |
## Task
Generate a SQL query to answer the following question:
`What is the event of the match with a round larger than 2 and ended with a method of ko (kick)?`
### 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 `What is the event of the match with a round larger than 2 and ended with a method of ko (kick)?`:
```sql
|
SELECT "method" FROM "mixed_martial_arts_record" WHERE "round">1 AND "event"='k-1 andy memorial 2001 japan gp final'; |
## Task
Generate a SQL query to answer the following question:
`What is the method of the match after round 1 in the k-1 andy memorial 2001 japan gp final?`
### 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 `What is the method of the match after round 1 in the k-1 andy memorial 2001 japan gp final?`:
```sql
|
SELECT MAX("round") FROM "mixed_martial_arts_record" WHERE "opponent"='rene rooze' AND "location"='saitama, japan'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest round of the match with Rene Rooze as the opponent in Saitama, Japan?`
### 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 `What is the highest round of the match with Rene Rooze as the opponent in Saitama, Japan?`:
```sql
|
SELECT MAX("round") FROM "mixed_martial_arts_record" WHERE "time"='0:57'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest round of the match with a time of 0:57?`
### 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 `What is the highest round of the match with a time of 0:57?`:
```sql
|
SELECT "points_for" FROM "2011_2012_table" WHERE "tries_for"='52' AND "try_bonus"='7'; |
## Task
Generate a SQL query to answer the following question:
`How many points did the Club score that has a try bonus of 7 and 52 tries for ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_2012_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many points did the Club score that has a try bonus of 7 and 52 tries for ?`:
```sql
|
SELECT "losing_bonus" FROM "2011_2012_table" WHERE "tries_against"='80'; |
## Task
Generate a SQL query to answer the following question:
`What is the Losing bonus of the club that has 80 tries against ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_2012_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Losing bonus of the club that has 80 tries against ?`:
```sql
|
SELECT "tries_for" FROM "2011_2012_table" WHERE "club"='waunarlwydd rfc'; |
## Task
Generate a SQL query to answer the following question:
`How many tries for does waunarlwydd rfc have ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_2012_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many tries for does waunarlwydd rfc have ?`:
```sql
|
SELECT "lost" FROM "2011_2012_table" WHERE "points"='47'; |
## Task
Generate a SQL query to answer the following question:
`How many losses did the club with 47 points have ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_2012_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many losses did the club with 47 points have ?`:
```sql
|
SELECT "points_against" FROM "2011_2012_table" WHERE "try_bonus"='6' AND "tries_against"='54'; |
## Task
Generate a SQL query to answer the following question:
`How many points against does the club that has a try bonus of 6 and tries against of 54 have ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_2012_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many points against does the club that has a try bonus of 6 and tries against of 54 have ?`:
```sql
|
SELECT "co_drivers" FROM "24_hours_of_le_mans_results" WHERE "year"=2008; |
## Task
Generate a SQL query to answer the following question:
`Who were the co-drivers in 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the co-drivers in 2008?`:
```sql
|
SELECT "pos" FROM "24_hours_of_le_mans_results" WHERE "year"=2006; |
## Task
Generate a SQL query to answer the following question:
`What was the position in 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the position in 2006?`:
```sql
|
SELECT "class" FROM "24_hours_of_le_mans_results" WHERE "laps"=325; |
## Task
Generate a SQL query to answer the following question:
`What was the class when there were 325 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the class when there were 325 laps?`:
```sql
|
SELECT "pos" FROM "24_hours_of_le_mans_results" WHERE "year">2005 AND "class_pos"='5th'; |
## Task
Generate a SQL query to answer the following question:
`What was the position in a year after 2005 with a class position of 5th?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the position in a year after 2005 with a class position of 5th?`:
```sql
|
SELECT "english_title" FROM "2000s" WHERE "year"=2001; |
## Task
Generate a SQL query to answer the following question:
`What is the English title of the film from 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000s" (
"year" real,
"english_title" text,
"original_title" text,
"country" text,
"director_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the English title of the film from 2001?`:
```sql
|
SELECT "original_title" FROM "2000s" WHERE "year"<2003 AND "country"='japan/taiwan'; |
## Task
Generate a SQL query to answer the following question:
`What is the original title of the film from Japan/Taiwan before 2003?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000s" (
"year" real,
"english_title" text,
"original_title" text,
"country" text,
"director_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the original title of the film from Japan/Taiwan before 2003?`:
```sql
|
SELECT "english_title" FROM "2000s" WHERE "director_s"='fernando meirelles'; |
## Task
Generate a SQL query to answer the following question:
`What is the English title of the film directed by Fernando Meirelles?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000s" (
"year" real,
"english_title" text,
"original_title" text,
"country" text,
"director_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the English title of the film directed by Fernando Meirelles?`:
```sql
|
SELECT "country" FROM "2000s" WHERE "original_title"='cidade de deus'; |
## Task
Generate a SQL query to answer the following question:
`What is the country of the original title Cidade de deus?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000s" (
"year" real,
"english_title" text,
"original_title" text,
"country" text,
"director_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the country of the original title Cidade de deus?`:
```sql
|
SELECT MIN("year") FROM "2000s" WHERE "country"='mexico'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year of a film from Mexico?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000s" (
"year" real,
"english_title" text,
"original_title" text,
"country" text,
"director_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year of a film from Mexico?`:
```sql
|
SELECT AVG("year") FROM "2000s" WHERE "country"='france/hong kong'; |
## Task
Generate a SQL query to answer the following question:
`What is the average year of the film from France/Hong Kong?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000s" (
"year" real,
"english_title" text,
"original_title" text,
"country" text,
"director_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average year of the film from France/Hong Kong?`:
```sql
|
SELECT "country" FROM "second_round" WHERE "place"='t3'; |
## Task
Generate a SQL query to answer the following question:
`Name the country for t3 place`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the country for t3 place`:
```sql
|
SELECT "country" FROM "second_round" WHERE "to_par"='+2'; |
## Task
Generate a SQL query to answer the following question:
`Name the country with +2 to par`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the country with +2 to par`:
```sql
|
SELECT "to_par" FROM "second_round" WHERE "player"='colin montgomerie'; |
## Task
Generate a SQL query to answer the following question:
`Name the to par for colin montgomerie`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the to par for colin montgomerie`:
```sql
|
SELECT "score" FROM "second_round" WHERE "country"='scotland'; |
## Task
Generate a SQL query to answer the following question:
`Name the score for scotland`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the score for scotland`:
```sql
|
SELECT "island" FROM "main_list" WHERE "population">76 AND "height_m">210 AND "area_ha">12068; |
## Task
Generate a SQL query to answer the following question:
`What island has a population over 76, a height over 210, and an area larger than 12068?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "main_list" (
"island" text,
"location" text,
"area_ha" real,
"population" real,
"height_m" real
);
### SQL
Given the database schema, here is the SQL query that answers `What island has a population over 76, a height over 210, and an area larger than 12068?`:
```sql
|
SELECT MAX("population") FROM "main_list" WHERE "location"='scalloway islands' AND "island"='trondra'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest population of Trondra Island in the Scalloway Islands?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "main_list" (
"island" text,
"location" text,
"area_ha" real,
"population" real,
"height_m" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest population of Trondra Island in the Scalloway Islands?`:
```sql
|
SELECT COUNT("drawn") FROM "rugby_spain_internationals_1989" WHERE "percentage"='7.14%' AND "lost">12; |
## Task
Generate a SQL query to answer the following question:
`How many matches were drawn associated with a percentage of 7.14% and more than 12 losses?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rugby_spain_internationals_1989" (
"first_game" real,
"played" real,
"drawn" real,
"lost" real,
"percentage" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many matches were drawn associated with a percentage of 7.14% and more than 12 losses?`:
```sql
|
SELECT "percentage" FROM "rugby_spain_internationals_1989" WHERE "first_game"<1997 AND "lost"<2 AND "played"<5; |
## Task
Generate a SQL query to answer the following question:
`Which percentage has a first game before 1997, fewer than 2 losses, and fewer than 5 matches played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rugby_spain_internationals_1989" (
"first_game" real,
"played" real,
"drawn" real,
"lost" real,
"percentage" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which percentage has a first game before 1997, fewer than 2 losses, and fewer than 5 matches played?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.