output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "team" FROM "teams_and_venues" WHERE "venue"='spartak, mogilev'; |
## Task
Generate a SQL query to answer the following question:
`What team plays at Spartak, Mogilev?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_venues" (
"team" text,
"location" text,
"venue" text,
"capacity" real,
"position_in_1996" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team plays at Spartak, Mogilev?`:
```sql
|
SELECT "producer_director" FROM "filmography" WHERE "film"='fear beneath'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Producer/Director of Fear Beneath?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "filmography" (
"year" real,
"film" text,
"role" text,
"producer_director" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Producer/Director of Fear Beneath?`:
```sql
|
SELECT "film" FROM "filmography" WHERE "year"=1996; |
## Task
Generate a SQL query to answer the following question:
`What film was released in 1996?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "filmography" (
"year" real,
"film" text,
"role" text,
"producer_director" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What film was released in 1996?`:
```sql
|
SELECT "producer_director" FROM "filmography" WHERE "film"='political engagement'; |
## Task
Generate a SQL query to answer the following question:
`Who is the Producer/Director of Political Engagement?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "filmography" (
"year" real,
"film" text,
"role" text,
"producer_director" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the Producer/Director of Political Engagement?`:
```sql
|
SELECT "original_airdate" FROM "season_7_1943_1944" WHERE "writer_s"='sidney slon' AND "episode"='7-17 (195)'; |
## Task
Generate a SQL query to answer the following question:
`What is the original airdate for episode 7-17 (195) from writer Sidney Slon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_7_1943_1944" (
"episode" text,
"title" text,
"writer_s" text,
"preservation" text,
"original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the original airdate for episode 7-17 (195) from writer Sidney Slon?`:
```sql
|
SELECT AVG("rank") FROM "leaders" WHERE "player"='greg norman' AND "earnings">'12,507,322'; |
## Task
Generate a SQL query to answer the following question:
`What is the rank of Greg Norman who earned more than $12,507,322?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank of Greg Norman who earned more than $12,507,322?`:
```sql
|
SELECT MAX("rank") FROM "leaders" WHERE "country"='united states' AND "player"='davis love iii' AND "earnings"<'12,487,463'; |
## Task
Generate a SQL query to answer the following question:
`What is the rank of the United States player Davis Love III with earnings under $12,487,463?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank of the United States player Davis Love III with earnings under $12,487,463?`:
```sql
|
SELECT "date" FROM "wta_tour_singles_finals_19_7_12" WHERE "tournament"='madrid, spain'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the tournament played in Madrid, Spain?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wta_tour_singles_finals_19_7_12" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the tournament played in Madrid, Spain?`:
```sql
|
SELECT "opponent" FROM "2007_08_cardiff_city_f_c_season" WHERE "round"='final'; |
## Task
Generate a SQL query to answer the following question:
`What opponent has final as the round?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007_08_cardiff_city_f_c_season" (
"date" text,
"round" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What opponent has final as the round?`:
```sql
|
SELECT "round" FROM "2007_08_cardiff_city_f_c_season" WHERE "opponent"='hereford united'; |
## Task
Generate a SQL query to answer the following question:
`What round has hereford united as the opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007_08_cardiff_city_f_c_season" (
"date" text,
"round" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What round has hereford united as the opponent?`:
```sql
|
SELECT "location_state" FROM "race_calendar" WHERE "winner"='craig lowndes' AND "date"='29–31 may'; |
## Task
Generate a SQL query to answer the following question:
`Which Location /State has a Winner of craig lowndes, and a Date of 29–31 may?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_calendar" (
"race_title" text,
"circuit" text,
"location_state" text,
"date" text,
"winner" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Location /State has a Winner of craig lowndes, and a Date of 29–31 may?`:
```sql
|
SELECT "team" FROM "race_calendar" WHERE "winner"='craig lowndes' AND "circuit"='phillip island grand prix circuit'; |
## Task
Generate a SQL query to answer the following question:
`Which Team has a Winner of craig lowndes, and a Circuit of phillip island grand prix circuit?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_calendar" (
"race_title" text,
"circuit" text,
"location_state" text,
"date" text,
"winner" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Team has a Winner of craig lowndes, and a Circuit of phillip island grand prix circuit?`:
```sql
|
SELECT "location_state" FROM "race_calendar" WHERE "date"='29–31 may'; |
## Task
Generate a SQL query to answer the following question:
`Which Location/ State has a Date of 29–31 may?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_calendar" (
"race_title" text,
"circuit" text,
"location_state" text,
"date" text,
"winner" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Location/ State has a Date of 29–31 may?`:
```sql
|
SELECT "winner" FROM "race_calendar" WHERE "circuit"='lakeside international raceway'; |
## Task
Generate a SQL query to answer the following question:
`Who won at the Circuit of lakeside international raceway?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_calendar" (
"race_title" text,
"circuit" text,
"location_state" text,
"date" text,
"winner" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won at the Circuit of lakeside international raceway?`:
```sql
|
SELECT "service_charge" FROM "table_of_dahlgren_boat_howitzers" WHERE "number_made"=456; |
## Task
Generate a SQL query to answer the following question:
`What is the service charge of the boat howitzers with 456 made?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table_of_dahlgren_boat_howitzers" (
"designation" text,
"bore" text,
"weight" text,
"service_charge" text,
"range_yards" text,
"number_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the service charge of the boat howitzers with 456 made?`:
```sql
|
SELECT "service_charge" FROM "table_of_dahlgren_boat_howitzers" WHERE "designation"='12-pdr light'; |
## Task
Generate a SQL query to answer the following question:
`What is the service chage of the boat howitzers with a 12-pdr light destination?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table_of_dahlgren_boat_howitzers" (
"designation" text,
"bore" text,
"weight" text,
"service_charge" text,
"range_yards" text,
"number_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the service chage of the boat howitzers with a 12-pdr light destination?`:
```sql
|
SELECT "service_charge" FROM "table_of_dahlgren_boat_howitzers" WHERE "number_made"=1009; |
## Task
Generate a SQL query to answer the following question:
`What is the service charge of the boat howitzers with 1009 made?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table_of_dahlgren_boat_howitzers" (
"designation" text,
"bore" text,
"weight" text,
"service_charge" text,
"range_yards" text,
"number_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the service charge of the boat howitzers with 1009 made?`:
```sql
|
SELECT "bore" FROM "table_of_dahlgren_boat_howitzers" WHERE "designation"='12-pdr heavy'; |
## Task
Generate a SQL query to answer the following question:
`What is the bore of the boat howitzers with a 12-pdr heavy designation?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table_of_dahlgren_boat_howitzers" (
"designation" text,
"bore" text,
"weight" text,
"service_charge" text,
"range_yards" text,
"number_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the bore of the boat howitzers with a 12-pdr heavy designation?`:
```sql
|
SELECT "attendance" FROM "second_round" WHERE "tie_no"=9; |
## Task
Generate a SQL query to answer the following question:
`Which attendance has 9 as the tie no.?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"tie_no" real,
"home_team" text,
"score" text,
"away_team" text,
"report" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which attendance has 9 as the tie no.?`:
```sql
|
SELECT COUNT("pick_num") FROM "jacksonville_jaguars_draft_history" WHERE "position"='defensive end' AND "overall"<33; |
## Task
Generate a SQL query to answer the following question:
`How many Picks have a Position of defensive end, and an Overall smaller than 33?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jacksonville_jaguars_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 `How many Picks have a Position of defensive end, and an Overall smaller than 33?`:
```sql
|
SELECT MAX("overall") FROM "jacksonville_jaguars_draft_history" WHERE "name"='gregory spann' AND "pick_num">19; |
## Task
Generate a SQL query to answer the following question:
`Which Overall is the highest one that has a Name of gregory spann, and a Pick # larger than 19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jacksonville_jaguars_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 `Which Overall is the highest one that has a Name of gregory spann, and a Pick # larger than 19?`:
```sql
|
SELECT AVG("pick_num") FROM "jacksonville_jaguars_draft_history" WHERE "round">5 AND "position"='wide receiver' AND "name"='gregory spann' AND "overall">228; |
## Task
Generate a SQL query to answer the following question:
`Which Pick # has a Round larger than 5, and a Position of wide receiver, and a Name of gregory spann, and an Overall larger than 228?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jacksonville_jaguars_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 `Which Pick # has a Round larger than 5, and a Position of wide receiver, and a Name of gregory spann, and an Overall larger than 228?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "record"='21-27'; |
## Task
Generate a SQL query to answer the following question:
`What is the score from the 21-27 Record?`
### 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" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score from the 21-27 Record?`:
```sql
|
SELECT "attendance" FROM "game_log" WHERE "date"='may 28'; |
## Task
Generate a SQL query to answer the following question:
`How many people attended the May 28 game?`
### 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" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people attended the May 28 game?`:
```sql
|
SELECT AVG("drawn") FROM "campeonato_brasileiro_s_rie_a" WHERE "points"<70 AND "played"<46; |
## Task
Generate a SQL query to answer the following question:
`What is the average drawn number of the team with less than 70 points and less than 46 played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campeonato_brasileiro_s_rie_a" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average drawn number of the team with less than 70 points and less than 46 played?`:
```sql
|
SELECT MAX("position") FROM "campeonato_brasileiro_s_rie_a" WHERE "lost"=24 AND "drawn">9; |
## Task
Generate a SQL query to answer the following question:
`What is the highest position of the team with 24 lost and a drawn greater than 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campeonato_brasileiro_s_rie_a" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest position of the team with 24 lost and a drawn greater than 9?`:
```sql
|
SELECT AVG("points") FROM "regular_season" WHERE "game"=82 AND "april">10; |
## Task
Generate a SQL query to answer the following question:
`How many Points has a Game of 82 and a April larger than 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"april" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Points has a Game of 82 and a April larger than 10?`:
```sql
|
SELECT COUNT("game") FROM "regular_season" WHERE "score"='3–3 ot'; |
## Task
Generate a SQL query to answer the following question:
`How many Games have a Score of 3–3 ot?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"april" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Games have a Score of 3–3 ot?`:
```sql
|
SELECT MAX("april") FROM "regular_season" WHERE "game"=84; |
## Task
Generate a SQL query to answer the following question:
`Which April has a Game of 84`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"april" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which April has a Game of 84`:
```sql
|
SELECT "played" FROM "2006_2007_table" WHERE "club"='banwen rfc'; |
## Task
Generate a SQL query to answer the following question:
`what's the played status when the club was banwen rfc?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_2007_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the played status when the club was banwen rfc?`:
```sql
|
SELECT "points_for" FROM "2006_2007_table" WHERE "points_against"='points against'; |
## Task
Generate a SQL query to answer the following question:
`what's the points total when points against was points against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_2007_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the points total when points against was points against?`:
```sql
|
SELECT "lost" FROM "2006_2007_table" WHERE "points"='36' AND "points_against"='489'; |
## Task
Generate a SQL query to answer the following question:
`when points were 36 and points against 489 what is the lost?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_2007_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `when points were 36 and points against 489 what is the lost?`:
```sql
|
SELECT "lost" FROM "2006_2007_table" WHERE "points_against"='387'; |
## Task
Generate a SQL query to answer the following question:
`when points against was 387 what was the lost?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_2007_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `when points against was 387 what was the lost?`:
```sql
|
SELECT "points" FROM "2006_2007_table" WHERE "points_for"='points for'; |
## Task
Generate a SQL query to answer the following question:
`when points for was points for what was the points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_2007_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `when points for was points for what was the points?`:
```sql
|
SELECT "pick" FROM "player_selection" WHERE "year"=1948; |
## Task
Generate a SQL query to answer the following question:
`What was 1948's pick?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "player_selection" (
"year" real,
"pick" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was 1948's pick?`:
```sql
|
SELECT "pick" FROM "player_selection" WHERE "year"=2004; |
## Task
Generate a SQL query to answer the following question:
`What was the pick in 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "player_selection" (
"year" real,
"pick" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the pick in 2004?`:
```sql
|
SELECT COUNT("year") FROM "player_selection" WHERE "pick"='12' AND "position"='dt' AND "college"='penn state'; |
## Task
Generate a SQL query to answer the following question:
`How many years have a Pick of 12, and a Position of dt, and a College of penn state?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "player_selection" (
"year" real,
"pick" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years have a Pick of 12, and a Position of dt, and a College of penn state?`:
```sql
|
SELECT COUNT("scoring_average") FROM "lpga_tour_record" WHERE "wins"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the scoring average where the wins are 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_record" (
"year" real,
"wins" real,
"earnings" text,
"rank" real,
"scoring_average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the scoring average where the wins are 0?`:
```sql
|
SELECT MAX("year") FROM "lpga_tour_record" WHERE "earnings"='557,158'; |
## Task
Generate a SQL query to answer the following question:
`What year has earnings of $557,158?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_record" (
"year" real,
"wins" real,
"earnings" text,
"rank" real,
"scoring_average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What year has earnings of $557,158?`:
```sql
|
SELECT MIN("points") FROM "regular_season" WHERE "opponent"='@ florida panthers' AND "game">58; |
## Task
Generate a SQL query to answer the following question:
`Which Points have an Opponent of @ florida panthers, and a Game larger than 58?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"february" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Points have an Opponent of @ florida panthers, and a Game larger than 58?`:
```sql
|
SELECT "catholic" FROM "roman_catholicism_in_asia" WHERE "pct_catholic"='1.39%'; |
## Task
Generate a SQL query to answer the following question:
`what is the catholic when the % catholic is 1.39%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "roman_catholicism_in_asia" (
"region" text,
"total_population" real,
"catholic" real,
"pct_catholic" text,
"pct_of_global_catholic_pop" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the catholic when the % catholic is 1.39%?`:
```sql
|
SELECT "pct_of_global_catholic_pop" FROM "roman_catholicism_in_asia" WHERE "total_population">'1,528,384,440' AND "pct_catholic"='3.33%'; |
## Task
Generate a SQL query to answer the following question:
`with catholic of 3.33% and total population more than 1,528,384,440, what is the % global catholic pop.?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "roman_catholicism_in_asia" (
"region" text,
"total_population" real,
"catholic" real,
"pct_catholic" text,
"pct_of_global_catholic_pop" text
);
### SQL
Given the database schema, here is the SQL query that answers `with catholic of 3.33% and total population more than 1,528,384,440, what is the % global catholic pop.?`:
```sql
|
SELECT AVG("february") FROM "regular_season" WHERE "game"=64; |
## Task
Generate a SQL query to answer the following question:
`Which February has a Game of 64?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"february" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which February has a Game of 64?`:
```sql
|
SELECT AVG("points") FROM "regular_season" WHERE "game"<60 AND "score"='2–0' AND "february">1; |
## Task
Generate a SQL query to answer the following question:
`Which Points have a Game smaller than 60, and a Score of 2–0, and a February larger than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"february" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Points have a Game smaller than 60, and a Score of 2–0, and a February larger than 1?`:
```sql
|
SELECT MAX("game") FROM "regular_season" WHERE "february"=25; |
## Task
Generate a SQL query to answer the following question:
`Which Game is the highest one that has a February of 25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"february" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Game is the highest one that has a February of 25?`:
```sql
|
SELECT MAX("game") FROM "regular_season" WHERE "score"='3–4 ot' AND "points">75; |
## Task
Generate a SQL query to answer the following question:
`Which Game is the highest one that has a Score of 3–4 ot, and Points larger than 75?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"february" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Game is the highest one that has a Score of 3–4 ot, and Points larger than 75?`:
```sql
|
SELECT COUNT("february") FROM "regular_season" WHERE "score"='5–2' AND "points"=70; |
## Task
Generate a SQL query to answer the following question:
`How much February has a Score of 5–2, and Points of 70?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"february" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much February has a Score of 5–2, and Points of 70?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "week">2 AND "date"='november 30, 1958'; |
## Task
Generate a SQL query to answer the following question:
`Which result happened more recently than week 2, and had a date of November 30, 1958?`
### 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,
"record" text,
"game_site" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which result happened more recently than week 2, and had a date of November 30, 1958?`:
```sql
|
SELECT "album" FROM "official_versions" WHERE "length"='4:30'; |
## Task
Generate a SQL query to answer the following question:
`what album is 4:30 long`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "official_versions" (
"version" text,
"length" text,
"album" text,
"remixed_by" text,
"year" real
);
### SQL
Given the database schema, here is the SQL query that answers `what album is 4:30 long`:
```sql
|
SELECT "head_coach" FROM "teams" WHERE "town"='novy urengoy'; |
## Task
Generate a SQL query to answer the following question:
`What is the Head Coach of Novy Urengoy?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams" (
"previous_season" text,
"team" text,
"town" text,
"arena_capacity" text,
"website" text,
"head_coach" text,
"foreign_players_max_2" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Head Coach of Novy Urengoy?`:
```sql
|
SELECT "arena_capacity" FROM "teams" WHERE "town"='kazan'; |
## Task
Generate a SQL query to answer the following question:
`What is the Arena o Kazan?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams" (
"previous_season" text,
"team" text,
"town" text,
"arena_capacity" text,
"website" text,
"head_coach" text,
"foreign_players_max_2" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Arena o Kazan?`:
```sql
|
SELECT "website" FROM "teams" WHERE "head_coach"='yuriy korotkevich'; |
## Task
Generate a SQL query to answer the following question:
`What is the Website of Head Coach Yuriy Korotkevich?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams" (
"previous_season" text,
"team" text,
"town" text,
"arena_capacity" text,
"website" text,
"head_coach" text,
"foreign_players_max_2" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Website of Head Coach Yuriy Korotkevich?`:
```sql
|
SELECT "surface" FROM "doubles_5" WHERE "opponents"='sebastián decoud santiago giraldo'; |
## Task
Generate a SQL query to answer the following question:
`Opponents of sebastián decoud santiago giraldo had what surface?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_5" (
"date" text,
"tournament" text,
"surface" text,
"partnering" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Opponents of sebastián decoud santiago giraldo had what surface?`:
```sql
|
SELECT "tournament" FROM "doubles_5" WHERE "partnering"='franco ferreiro'; |
## Task
Generate a SQL query to answer the following question:
`Partnering of franco ferreiro had what tournament?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_5" (
"date" text,
"tournament" text,
"surface" text,
"partnering" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Partnering of franco ferreiro had what tournament?`:
```sql
|
SELECT "surface" FROM "doubles_5" WHERE "date"='april 10, 2006'; |
## Task
Generate a SQL query to answer the following question:
`Date of april 10, 2006 had what surface?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_5" (
"date" text,
"tournament" text,
"surface" text,
"partnering" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Date of april 10, 2006 had what surface?`:
```sql
|
SELECT "score" FROM "doubles_5" WHERE "surface"='clay' AND "partnering"='júlio silva'; |
## Task
Generate a SQL query to answer the following question:
`Surface of clay, and a Partnering of júlio silva had what score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_5" (
"date" text,
"tournament" text,
"surface" text,
"partnering" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Surface of clay, and a Partnering of júlio silva had what score?`:
```sql
|
SELECT "score" FROM "doubles_5" WHERE "date"='november 3, 2008'; |
## Task
Generate a SQL query to answer the following question:
`Date of november 3, 2008 had what score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_5" (
"date" text,
"tournament" text,
"surface" text,
"partnering" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Date of november 3, 2008 had what score?`:
```sql
|
SELECT AVG("points") FROM "sapporo" WHERE "name"='denis kornilov'; |
## Task
Generate a SQL query to answer the following question:
`Which Points have a Name of denis kornilov?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sapporo" (
"rank" real,
"name" text,
"nationality" text,
"1st_m" real,
"2nd_m" real,
"points" real,
"overall_wc_points_rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Points have a Name of denis kornilov?`:
```sql
|
SELECT MAX("rank") FROM "sapporo" WHERE "1st_m">130 AND "name"='thomas morgenstern' AND "2nd_m">139; |
## Task
Generate a SQL query to answer the following question:
`Which Rank is the highest one that has a 1st (m) larger than 130, and a Name of thomas morgenstern, and a 2nd (m) larger than 139?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sapporo" (
"rank" real,
"name" text,
"nationality" text,
"1st_m" real,
"2nd_m" real,
"points" real,
"overall_wc_points_rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank is the highest one that has a 1st (m) larger than 130, and a Name of thomas morgenstern, and a 2nd (m) larger than 139?`:
```sql
|
SELECT SUM("rank") FROM "sapporo" WHERE "name"='thomas morgenstern' AND "points">288.7; |
## Task
Generate a SQL query to answer the following question:
`Which Rank that a Name of thomas morgenstern, and Points larger than 288.7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sapporo" (
"rank" real,
"name" text,
"nationality" text,
"1st_m" real,
"2nd_m" real,
"points" real,
"overall_wc_points_rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank that a Name of thomas morgenstern, and Points larger than 288.7?`:
```sql
|
SELECT COUNT("points") FROM "sapporo" WHERE "nationality"='nor' AND "overall_wc_points_rank"='374 (13)' AND "rank"<4; |
## Task
Generate a SQL query to answer the following question:
`How many Points have a Nationality of nor, and an Overall WC points (Rank) of 374 (13), and a Rank smaller than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sapporo" (
"rank" real,
"name" text,
"nationality" text,
"1st_m" real,
"2nd_m" real,
"points" real,
"overall_wc_points_rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Points have a Nationality of nor, and an Overall WC points (Rank) of 374 (13), and a Rank smaller than 4?`:
```sql
|
SELECT SUM("overall") FROM "jacksonville_jaguars_draft_history" WHERE "college"='louisiana tech' AND "pick_num">10; |
## Task
Generate a SQL query to answer the following question:
`What is the overall number for Louisiana Tech college, and a pick more than 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jacksonville_jaguars_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 number for Louisiana Tech college, and a pick more than 10?`:
```sql
|
SELECT AVG("pick_num") FROM "jacksonville_jaguars_draft_history" WHERE "name"='deji karim' AND "round"<6; |
## Task
Generate a SQL query to answer the following question:
`What was the pick number for Deji Karim, in a round lower than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jacksonville_jaguars_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 was the pick number for Deji Karim, in a round lower than 6?`:
```sql
|
SELECT "college" FROM "jacksonville_jaguars_draft_history" WHERE "overall">180; |
## Task
Generate a SQL query to answer the following question:
`Which college had an overall number more than 180?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jacksonville_jaguars_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 `Which college had an overall number more than 180?`:
```sql
|
SELECT SUM("overall") FROM "jacksonville_jaguars_draft_history" WHERE "pick_num"=10 AND "college"='louisiana tech' AND "round">3; |
## Task
Generate a SQL query to answer the following question:
`What is the overall number for a pick of #10, from Louisiana Tech, and a round bigger than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jacksonville_jaguars_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 number for a pick of #10, from Louisiana Tech, and a round bigger than 3?`:
```sql
|
SELECT AVG("pick") FROM "nfl_draft" WHERE "school_club_team"='alabama' AND "round"<9; |
## Task
Generate a SQL query to answer the following question:
`What's the Pick average that has a School/Club Team of Alabama, with a Round that's smaller than 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the Pick average that has a School/Club Team of Alabama, with a Round that's smaller than 9?`:
```sql
|
SELECT COUNT("pick") FROM "nfl_draft" WHERE "player"='robert ingalls'; |
## Task
Generate a SQL query to answer the following question:
`What's the sum of the Pick that has the Player of Robert Ingalls?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the sum of the Pick that has the Player of Robert Ingalls?`:
```sql
|
SELECT COUNT("pick") FROM "nfl_draft" WHERE "position"='tackle' AND "player"='woody adams' AND "round">22; |
## Task
Generate a SQL query to answer the following question:
`What's the sum of the Pick that has the Position of Tackle, the Player Woody Adams, and a Round that's larger than 22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the sum of the Pick that has the Position of Tackle, the Player Woody Adams, and a Round that's larger than 22?`:
```sql
|
SELECT "position" FROM "nfl_draft" WHERE "round">21; |
## Task
Generate a SQL query to answer the following question:
`What Position has a Round that's larger than 21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Position has a Round that's larger than 21?`:
```sql
|
SELECT SUM("europe") FROM "most_official_appearances" WHERE "others"=0 AND "league"<328 AND "position"='mf'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the Europe totals for players with other appearances of 0, league appearances under 328, and a position of MF?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_official_appearances" (
"ranking" real,
"nationality" text,
"name" text,
"position" text,
"years" text,
"league" real,
"europe" real,
"others" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the Europe totals for players with other appearances of 0, league appearances under 328, and a position of MF?`:
```sql
|
SELECT "investment_income" FROM "sources_of_income" WHERE "occupational_pensions"='7%' AND "working_tax_credit"='2%' AND "other_social_security_benefits"='6%'; |
## Task
Generate a SQL query to answer the following question:
`Occupational pensions of 7%, and a Working tax credit of 2%, and a Other social security benefits of 6% has what investment income?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sources_of_income" (
"region" text,
"employment_salaries_wages" text,
"self_employed" text,
"investment_income" text,
"working_tax_credit" text,
"state_pensions" text,
"occupational_pensions" text,
"disability_benefits" text,
"other_social_security_benefits" text,
"other_income_sources" text
);
### SQL
Given the database schema, here is the SQL query that answers `Occupational pensions of 7%, and a Working tax credit of 2%, and a Other social security benefits of 6% has what investment income?`:
```sql
|
SELECT "investment_income" FROM "sources_of_income" WHERE "region"='eastern england'; |
## Task
Generate a SQL query to answer the following question:
`Region of eastern england has what investment income?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sources_of_income" (
"region" text,
"employment_salaries_wages" text,
"self_employed" text,
"investment_income" text,
"working_tax_credit" text,
"state_pensions" text,
"occupational_pensions" text,
"disability_benefits" text,
"other_social_security_benefits" text,
"other_income_sources" text
);
### SQL
Given the database schema, here is the SQL query that answers `Region of eastern england has what investment income?`:
```sql
|
SELECT "investment_income" FROM "sources_of_income" WHERE "state_pensions"='7%' AND "self_employed"='7%' AND "other_income_sources"='2%'; |
## Task
Generate a SQL query to answer the following question:
`State pensions of 7%, and a Self employed of 7%, and a Other income sources of 2% has what investment income?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sources_of_income" (
"region" text,
"employment_salaries_wages" text,
"self_employed" text,
"investment_income" text,
"working_tax_credit" text,
"state_pensions" text,
"occupational_pensions" text,
"disability_benefits" text,
"other_social_security_benefits" text,
"other_income_sources" text
);
### SQL
Given the database schema, here is the SQL query that answers `State pensions of 7%, and a Self employed of 7%, and a Other income sources of 2% has what investment income?`:
```sql
|
SELECT "occupational_pensions" FROM "sources_of_income" WHERE "other_income_sources"='2%' AND "state_pensions"='7%' AND "working_tax_credit"='2%' AND "employment_salaries_wages"='66%'; |
## Task
Generate a SQL query to answer the following question:
`Other income sources of 2%, and a State pensions of 7%, and a Working tax credit of 2%, and a Employment ( salaries & wages) of 66% has what occupational pensions?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sources_of_income" (
"region" text,
"employment_salaries_wages" text,
"self_employed" text,
"investment_income" text,
"working_tax_credit" text,
"state_pensions" text,
"occupational_pensions" text,
"disability_benefits" text,
"other_social_security_benefits" text,
"other_income_sources" text
);
### SQL
Given the database schema, here is the SQL query that answers `Other income sources of 2%, and a State pensions of 7%, and a Working tax credit of 2%, and a Employment ( salaries & wages) of 66% has what occupational pensions?`:
```sql
|
SELECT "self_employed" FROM "sources_of_income" WHERE "investment_income"='2%' AND "other_income_sources"='3%' AND "employment_salaries_wages"='71%'; |
## Task
Generate a SQL query to answer the following question:
`Investment income of 2%, and an other income sources of 3%, and an employment (salaries & wages) of 71% involves which self employed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sources_of_income" (
"region" text,
"employment_salaries_wages" text,
"self_employed" text,
"investment_income" text,
"working_tax_credit" text,
"state_pensions" text,
"occupational_pensions" text,
"disability_benefits" text,
"other_social_security_benefits" text,
"other_income_sources" text
);
### SQL
Given the database schema, here is the SQL query that answers `Investment income of 2%, and an other income sources of 3%, and an employment (salaries & wages) of 71% involves which self employed?`:
```sql
|
SELECT "working_tax_credit" FROM "sources_of_income" WHERE "employment_salaries_wages"='64%' AND "occupational_pensions"='6%'; |
## Task
Generate a SQL query to answer the following question:
`Employment ( salaries & wages) of 64%, and a Occupational pensions of 6% has what working tax credit?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sources_of_income" (
"region" text,
"employment_salaries_wages" text,
"self_employed" text,
"investment_income" text,
"working_tax_credit" text,
"state_pensions" text,
"occupational_pensions" text,
"disability_benefits" text,
"other_social_security_benefits" text,
"other_income_sources" text
);
### SQL
Given the database schema, here is the SQL query that answers `Employment ( salaries & wages) of 64%, and a Occupational pensions of 6% has what working tax credit?`:
```sql
|
SELECT SUM("drawn") FROM "world_championship_group_c_denmark" WHERE "games"<6; |
## Task
Generate a SQL query to answer the following question:
`How many Drawn is which has a Games smaller than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_group_c_denmark" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Drawn is which has a Games smaller than 6?`:
```sql
|
SELECT AVG("points") FROM "world_championship_group_c_denmark" WHERE "points_difference"='61 - 15' AND "drawn">1; |
## Task
Generate a SQL query to answer the following question:
`What is the Points that has 61 - 15 Point difference and a Drawn larger than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_group_c_denmark" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Points that has 61 - 15 Point difference and a Drawn larger than 1?`:
```sql
|
SELECT SUM("drawn") FROM "world_championship_group_c_denmark" WHERE "games">6; |
## Task
Generate a SQL query to answer the following question:
`How many Drawn has a Games larger than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_group_c_denmark" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Drawn has a Games larger than 6?`:
```sql
|
SELECT SUM("jewish") FROM "births_by_mother" WHERE "muslim"<'36,041' AND "total"<'161,042' AND "year">2006 AND "druze">'2,534'; |
## Task
Generate a SQL query to answer the following question:
`How many jewish have a muslim less than 36,041, a total less than 161,042, a year after 2006, with a druze greater than 2,534?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "births_by_mother" (
"year" real,
"jewish" real,
"muslim" real,
"christian" real,
"druze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many jewish have a muslim less than 36,041, a total less than 161,042, a year after 2006, with a druze greater than 2,534?`:
```sql
|
SELECT MIN("year") FROM "births_by_mother" WHERE "druze">'2,534' AND "total"<'121,333'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest year that has a druze greater than 2,534, with a total less than 121,333?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "births_by_mother" (
"year" real,
"jewish" real,
"muslim" real,
"christian" real,
"druze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest year that has a druze greater than 2,534, with a total less than 121,333?`:
```sql
|
SELECT MIN("jewish") FROM "births_by_mother" WHERE "druze"<'2,517' AND "year"<2007; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest jewish that has a druze less than 2,517, and a year prior to 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "births_by_mother" (
"year" real,
"jewish" real,
"muslim" real,
"christian" real,
"druze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest jewish that has a druze less than 2,517, and a year prior to 2007?`:
```sql
|
SELECT AVG("muslim") FROM "births_by_mother" WHERE "druze"<'2,534' AND "year"=2005 AND "jewish">'100,657'; |
## Task
Generate a SQL query to answer the following question:
`What is the average muslim that has a druze less than 2,534, a year prior to 2005, and a jewish greater than 100,657?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "births_by_mother" (
"year" real,
"jewish" real,
"muslim" real,
"christian" real,
"druze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average muslim that has a druze less than 2,534, a year prior to 2005, and a jewish greater than 100,657?`:
```sql
|
SELECT SUM("muslim") FROM "births_by_mother" WHERE "jewish"='112,803' AND "year">2008; |
## Task
Generate a SQL query to answer the following question:
`How many muslims have a jewish of 112,803, and a year after 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "births_by_mother" (
"year" real,
"jewish" real,
"muslim" real,
"christian" real,
"druze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many muslims have a jewish of 112,803, and a year after 2008?`:
```sql
|
SELECT MIN("electorate") FROM "voting_details" WHERE "quota"='78,076' AND "candidates"<13; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest electorate with 78,076 quota and less than 13 candidates?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "voting_details" (
"constituency" text,
"electorate" real,
"turnout" text,
"spoilt" text,
"valid_poll" real,
"quota" text,
"seats" real,
"candidates" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest electorate with 78,076 quota and less than 13 candidates?`:
```sql
|
SELECT "turnout" FROM "voting_details" WHERE "candidates"=15 AND "valid_poll">'377,591'; |
## Task
Generate a SQL query to answer the following question:
`What is the turnout with 15 candidates and more than 377,591 valid poll?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "voting_details" (
"constituency" text,
"electorate" real,
"turnout" text,
"spoilt" text,
"valid_poll" real,
"quota" text,
"seats" real,
"candidates" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the turnout with 15 candidates and more than 377,591 valid poll?`:
```sql
|
SELECT "country" FROM "accolades" WHERE "rank"=79; |
## Task
Generate a SQL query to answer the following question:
`What country is ranked 79?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "accolades" (
"publication" text,
"country" text,
"accolade" text,
"year" real,
"rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `What country is ranked 79?`:
```sql
|
SELECT MIN("rank") FROM "accolades" WHERE "year">1999 AND "accolade"='the 100 greatest indie rock albums of all time'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest rank for an album after 1999 and an Accolade of the 100 greatest indie rock albums of all time?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "accolades" (
"publication" text,
"country" text,
"accolade" text,
"year" real,
"rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest rank for an album after 1999 and an Accolade of the 100 greatest indie rock albums of all time?`:
```sql
|
SELECT MIN("week") FROM "schedule" WHERE "date"='sunday november 28'; |
## Task
Generate a SQL query to answer the following question:
`Which Week is on sunday november 28?`
### 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,
"time_et" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Week is on sunday november 28?`:
```sql
|
SELECT COUNT("week") FROM "schedule" WHERE "opponent"='at new york giants'; |
## Task
Generate a SQL query to answer the following question:
`How many weeks have an Opponent of at new york giants?`
### 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,
"time_et" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many weeks have an Opponent of at new york giants?`:
```sql
|
SELECT "time_et" FROM "schedule" WHERE "opponent"='new england patriots'; |
## Task
Generate a SQL query to answer the following question:
`When is the Opponent of new england patriots?`
### 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,
"time_et" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `When is the Opponent of new england patriots?`:
```sql
|
SELECT "week" FROM "schedule" WHERE "result"='w 23–6'; |
## Task
Generate a SQL query to answer the following question:
`Which week has a Result of w 23–6?`
### 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,
"time_et" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which week has a Result of w 23–6?`:
```sql
|
SELECT AVG("innhabitants") FROM "municipalities_of_midhordland" WHERE "mayor"='olav martin vik'; |
## Task
Generate a SQL query to answer the following question:
`How many people did Mayor Olav Martin Vik preside over?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "municipalities_of_midhordland" (
"name" text,
"innhabitants" real,
"area" real,
"mayor" text,
"party" text,
"municipal_code" real,
"language_form" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people did Mayor Olav Martin Vik preside over?`:
```sql
|
SELECT SUM("area") FROM "municipalities_of_midhordland" WHERE "name"='askøy' AND "municipal_code"<1247; |
## Task
Generate a SQL query to answer the following question:
`What's the area of askøy, with a Municipal code less than 1247?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "municipalities_of_midhordland" (
"name" text,
"innhabitants" real,
"area" real,
"mayor" text,
"party" text,
"municipal_code" real,
"language_form" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the area of askøy, with a Municipal code less than 1247?`:
```sql
|
SELECT "mayor" FROM "municipalities_of_midhordland" WHERE "party"='krf'; |
## Task
Generate a SQL query to answer the following question:
`What Mayor is from the KRF Party?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "municipalities_of_midhordland" (
"name" text,
"innhabitants" real,
"area" real,
"mayor" text,
"party" text,
"municipal_code" real,
"language_form" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Mayor is from the KRF Party?`:
```sql
|
SELECT SUM("municipal_code") FROM "municipalities_of_midhordland" WHERE "party"='frp' AND "area"=100; |
## Task
Generate a SQL query to answer the following question:
`What's the Municipal code of the FRP Party with an area of 100?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "municipalities_of_midhordland" (
"name" text,
"innhabitants" real,
"area" real,
"mayor" text,
"party" text,
"municipal_code" real,
"language_form" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the Municipal code of the FRP Party with an area of 100?`:
```sql
|
SELECT AVG("innhabitants") FROM "municipalities_of_midhordland" WHERE "party"='krf'; |
## Task
Generate a SQL query to answer the following question:
`How many people does the KRF Party preside over?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "municipalities_of_midhordland" (
"name" text,
"innhabitants" real,
"area" real,
"mayor" text,
"party" text,
"municipal_code" real,
"language_form" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people does the KRF Party preside over?`:
```sql
|
SELECT COUNT("overall") FROM "1980_packers_draft_selections" WHERE "position"='c' AND "round">9; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of overall draft picks for player whose position is C and was picked after round 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980_packers_draft_selections" (
"round" real,
"overall" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of overall draft picks for player whose position is C and was picked after round 9?`:
```sql
|
SELECT "position" FROM "1980_packers_draft_selections" WHERE "round">1 AND "player"='jafus white'; |
## Task
Generate a SQL query to answer the following question:
`What position was Jafus White who was picked after round 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980_packers_draft_selections" (
"round" real,
"overall" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What position was Jafus White who was picked after round 1?`:
```sql
|
SELECT COUNT("overall") FROM "1980_packers_draft_selections" WHERE "player"='fred nixon'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of overall draft picks for Fred Nixon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980_packers_draft_selections" (
"round" real,
"overall" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of overall draft picks for Fred Nixon?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.