output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT COUNT("position") FROM "promotion_round" WHERE "drawn"<2 AND "lost"<9 AND "points">24; |
## Task
Generate a SQL query to answer the following question:
`What is the total number for the position that has less than 2 draws, less than 9 losses and more than 24?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "promotion_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number for the position that has less than 2 draws, less than 9 losses and more than 24?`:
```sql
|
SELECT MAX("played") FROM "promotion_round" WHERE "drawn">0 AND "lost"<3 AND "points"<27; |
## Task
Generate a SQL query to answer the following question:
`What is the highest played with more than 0 draws, less than 3 losses, and less than 27 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "promotion_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest played with more than 0 draws, less than 3 losses, and less than 27 points?`:
```sql
|
SELECT COUNT("played") FROM "promotion_round" WHERE "points"=8 AND "position">6; |
## Task
Generate a SQL query to answer the following question:
`What is the total number played with 8 points and a position more than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "promotion_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number played with 8 points and a position more than 6?`:
```sql
|
SELECT COUNT("played") FROM "promotion_round" WHERE "drawn"=1 AND "points"<7; |
## Task
Generate a SQL query to answer the following question:
`What is the total number played with 1 drawn, and less than 7 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "promotion_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number played with 1 drawn, and less than 7 points?`:
```sql
|
SELECT MAX("silver") FROM "medals_table" WHERE "bronze">1 AND "total">48; |
## Task
Generate a SQL query to answer the following question:
`What is the most silver when bronze is more than 1 and total is more than 48?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_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 most silver when bronze is more than 1 and total is more than 48?`:
```sql
|
SELECT MAX("bronze") FROM "medals_table" WHERE "total"=9; |
## Task
Generate a SQL query to answer the following question:
`what is the most bronze when the total is 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_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 most bronze when the total is 9?`:
```sql
|
SELECT MIN("bronze") FROM "medals_table" WHERE "nation"='soviet union' AND "total"<11; |
## Task
Generate a SQL query to answer the following question:
`what is the least bronze when the nation is soviet union and the total is less than 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_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 least bronze when the nation is soviet union and the total is less than 11?`:
```sql
|
SELECT "category" FROM "list_of_awards_and_nominations_received_" WHERE "nominee_s"='hy conrad' AND "year"=2003; |
## Task
Generate a SQL query to answer the following question:
`What is the category when Hy Conrad nominated in 2003?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_awards_and_nominations_received_" (
"year" real,
"category" text,
"nominee_s" text,
"episode" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the category when Hy Conrad nominated in 2003?`:
```sql
|
SELECT AVG("long") FROM "rushing" WHERE "gain"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the long figure when gain is less than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rushing" (
"name" text,
"gp_gs" text,
"gain" real,
"loss" real,
"long" real,
"avg_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the long figure when gain is less than 0?`:
```sql
|
SELECT AVG("loss") FROM "rushing" WHERE "avg_g"<16.7 AND "long">4 AND "gain"=104; |
## Task
Generate a SQL query to answer the following question:
`What is the loss when the average/gain is less than 16.7, gain is 104 and long is larger than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rushing" (
"name" text,
"gp_gs" text,
"gain" real,
"loss" real,
"long" real,
"avg_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the loss when the average/gain is less than 16.7, gain is 104 and long is larger than 4?`:
```sql
|
SELECT "time" FROM "quarterfinal_3" WHERE "notes"='sc/d' AND "country"='estonia'; |
## Task
Generate a SQL query to answer the following question:
`What is the time for Estonia with sc/d notes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "quarterfinal_3" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time for Estonia with sc/d notes?`:
```sql
|
SELECT "time" FROM "quarterfinal_3" WHERE "notes"='sc/d' AND "rank">5; |
## Task
Generate a SQL query to answer the following question:
`What is the time for the rank after 5 with sc/d notes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "quarterfinal_3" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time for the rank after 5 with sc/d notes?`:
```sql
|
SELECT "time" FROM "quarterfinal_3" WHERE "athlete"='law hiu fung'; |
## Task
Generate a SQL query to answer the following question:
`What was Law Hiu Fung's time?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "quarterfinal_3" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Law Hiu Fung's time?`:
```sql
|
SELECT "time" FROM "quarterfinal_3" WHERE "notes"='sc/d' AND "rank">5; |
## Task
Generate a SQL query to answer the following question:
`What is the time for the rank after 5 with sc/d notes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "quarterfinal_3" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time for the rank after 5 with sc/d notes?`:
```sql
|
SELECT MAX("rank") FROM "quarterfinal_3" WHERE "notes"='sa/b' AND "time"='6:52.70'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest rank for a 6:52.70 time and notes of sa/b?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "quarterfinal_3" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest rank for a 6:52.70 time and notes of sa/b?`:
```sql
|
SELECT MIN("rank") FROM "semifinal_2" WHERE "name"='paul biedermann'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest rank that has paul biedermann as the name?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest rank that has paul biedermann as the name?`:
```sql
|
SELECT "nationality" FROM "semifinal_2" WHERE "rank"=2; |
## Task
Generate a SQL query to answer the following question:
`What nationality has 2 as the rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What nationality has 2 as the rank?`:
```sql
|
SELECT MAX("lane") FROM "semifinal_2" WHERE "name"='nimrod shapira bar-or'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest lane that has nimrod shapira bar-or as the name?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest lane that has nimrod shapira bar-or as the name?`:
```sql
|
SELECT MAX("year") FROM "awards" WHERE "result"='nominated'; |
## Task
Generate a SQL query to answer the following question:
`What is the latest year they were nominated?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards" (
"year" real,
"award" text,
"work" text,
"category" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the latest year they were nominated?`:
```sql
|
SELECT "result" FROM "awards" WHERE "category"='choice tv actor: drama'; |
## Task
Generate a SQL query to answer the following question:
`What is the result of the choice tv actor: drama category?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards" (
"year" real,
"award" text,
"work" text,
"category" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result of the choice tv actor: drama category?`:
```sql
|
SELECT MAX("drawn") FROM "relegation_round" WHERE "position"<8 AND "played"<14; |
## Task
Generate a SQL query to answer the following question:
`Which Drawn has a Position smaller than 8, and a Played smaller than 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Drawn has a Position smaller than 8, and a Played smaller than 14?`:
```sql
|
SELECT MAX("points") FROM "relegation_round" WHERE "drawn"<2 AND "lost"=12 AND "name"='ev bad wörishofen'; |
## Task
Generate a SQL query to answer the following question:
`Which Points have a Drawn smaller than 2, and a Lost of 12, and a Name of ev bad wörishofen?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Points have a Drawn smaller than 2, and a Lost of 12, and a Name of ev bad wörishofen?`:
```sql
|
SELECT "place" FROM "second_round" WHERE "player"='lee westwood'; |
## Task
Generate a SQL query to answer the following question:
`What place did Lee Westwood finish in?`
### 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 `What place did Lee Westwood finish in?`:
```sql
|
SELECT "to_par" FROM "second_round" WHERE "score"='67-68=135'; |
## Task
Generate a SQL query to answer the following question:
`What is the to par score of the player that had a score of 67-68=135?`
### 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 `What is the to par score of the player that had a score of 67-68=135?`:
```sql
|
SELECT "televote_points" FROM "results_of_the_individual_jury_and_telev" WHERE "final_points"='2'; |
## Task
Generate a SQL query to answer the following question:
`What Televote Points had a Final Points score of 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results_of_the_individual_jury_and_telev" (
"draw" real,
"televote_points" text,
"jury_points" text,
"total" text,
"final_points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Televote Points had a Final Points score of 2?`:
```sql
|
SELECT COUNT("draw") FROM "results_of_the_individual_jury_and_telev" WHERE "televote_points"='8'; |
## Task
Generate a SQL query to answer the following question:
`Which Draw had 8 Televote Points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results_of_the_individual_jury_and_telev" (
"draw" real,
"televote_points" text,
"jury_points" text,
"total" text,
"final_points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Draw had 8 Televote Points?`:
```sql
|
SELECT "jury_points" FROM "results_of_the_individual_jury_and_telev" WHERE "televote_points"='3'; |
## Task
Generate a SQL query to answer the following question:
`What was the Jury Points value when there were 3 Televote Points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results_of_the_individual_jury_and_telev" (
"draw" real,
"televote_points" text,
"jury_points" text,
"total" text,
"final_points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Jury Points value when there were 3 Televote Points?`:
```sql
|
SELECT "player" FROM "made_the_cut" WHERE "to_par"='+4' AND "year_s_won"='1995'; |
## Task
Generate a SQL query to answer the following question:
`Which player was +4 to par and won the Open in 1995?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player was +4 to par and won the Open in 1995?`:
```sql
|
SELECT "player" FROM "made_the_cut" WHERE "to_par"='+8'; |
## Task
Generate a SQL query to answer the following question:
`Which player has a to par of +8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player has a to par of +8?`:
```sql
|
SELECT "country" FROM "repechage_2" WHERE "rank"<2; |
## Task
Generate a SQL query to answer the following question:
`What country is ranked smaller than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "repechage_2" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country is ranked smaller than 2?`:
```sql
|
SELECT "rank" FROM "repechage_2" WHERE "time"='6:50.48'; |
## Task
Generate a SQL query to answer the following question:
`What is the rank when the time is 6:50.48?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "repechage_2" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank when the time is 6:50.48?`:
```sql
|
SELECT MAX("rank") FROM "repechage_2" WHERE "notes"='sa/b' AND "time"='6:39.07'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest rank with the notes of sa/b, and a time of 6:39.07?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "repechage_2" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest rank with the notes of sa/b, and a time of 6:39.07?`:
```sql
|
SELECT "notes" FROM "repechage_2" WHERE "rank">4 AND "country"='south korea'; |
## Task
Generate a SQL query to answer the following question:
`What shows for notes when rank is more than 4, and country is South Korea?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "repechage_2" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What shows for notes when rank is more than 4, and country is South Korea?`:
```sql
|
SELECT "first_issue" FROM "serialized_titles" WHERE "title"='bamboo blade'; |
## Task
Generate a SQL query to answer the following question:
`What is the First Issue date of Bamboo Blade?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "serialized_titles" (
"title" text,
"author" text,
"first_issue" text,
"last_issue" text,
"completed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the First Issue date of Bamboo Blade?`:
```sql
|
SELECT "first_issue" FROM "serialized_titles" WHERE "last_issue"='july 2010'; |
## Task
Generate a SQL query to answer the following question:
`What is the First issue date of the title with a Last Issue of July 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "serialized_titles" (
"title" text,
"author" text,
"first_issue" text,
"last_issue" text,
"completed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the First issue date of the title with a Last Issue of July 2010?`:
```sql
|
SELECT "first_issue" FROM "serialized_titles" WHERE "title"='soul eater'; |
## Task
Generate a SQL query to answer the following question:
`What is the First Issue date of Soul Eater?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "serialized_titles" (
"title" text,
"author" text,
"first_issue" text,
"last_issue" text,
"completed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the First Issue date of Soul Eater?`:
```sql
|
SELECT "completed" FROM "serialized_titles" WHERE "last_issue"='july 2010'; |
## Task
Generate a SQL query to answer the following question:
`Was the Title with a Last Issue of July 2010 completed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "serialized_titles" (
"title" text,
"author" text,
"first_issue" text,
"last_issue" text,
"completed" text
);
### SQL
Given the database schema, here is the SQL query that answers `Was the Title with a Last Issue of July 2010 completed?`:
```sql
|
SELECT "author" FROM "serialized_titles" WHERE "first_issue"='september 2010'; |
## Task
Generate a SQL query to answer the following question:
`What is the Author of the Title with a First Issue of September 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "serialized_titles" (
"title" text,
"author" text,
"first_issue" text,
"last_issue" text,
"completed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Author of the Title with a First Issue of September 2010?`:
```sql
|
SELECT "author" FROM "serialized_titles" WHERE "last_issue"='ongoing'; |
## Task
Generate a SQL query to answer the following question:
`What is the Author of the Title with an Ongoing Last Issue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "serialized_titles" (
"title" text,
"author" text,
"first_issue" text,
"last_issue" text,
"completed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Author of the Title with an Ongoing Last Issue?`:
```sql
|
SELECT MAX("losses") FROM "torneo_apertura" WHERE "team"='presidente hayes' AND "draws">4; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number of losses for Presidente Hayes, when the draws were more than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneo_apertura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of losses for Presidente Hayes, when the draws were more than 4?`:
```sql
|
SELECT COUNT("wins") FROM "torneo_apertura" WHERE "position">6 AND "conceded"<19; |
## Task
Generate a SQL query to answer the following question:
`What is the number of wins when position was larger than 6, and conceded was smaller than 19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneo_apertura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of wins when position was larger than 6, and conceded was smaller than 19?`:
```sql
|
SELECT "losses" FROM "torneo_apertura" WHERE "draws"<4 AND "points"=9; |
## Task
Generate a SQL query to answer the following question:
`What is the number of losses when there were less than 4 draws, and points were 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneo_apertura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of losses when there were less than 4 draws, and points were 9?`:
```sql
|
SELECT SUM("wins") FROM "torneo_apertura" WHERE "scored"<26 AND "conceded">23; |
## Task
Generate a SQL query to answer the following question:
`What is the number of wins when scored was less than 26, and conceded was larger than 23?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneo_apertura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of wins when scored was less than 26, and conceded was larger than 23?`:
```sql
|
SELECT "series" FROM "career_summary" WHERE "season"=2009; |
## Task
Generate a SQL query to answer the following question:
`What was the series in season 2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team" text,
"races" real,
"wins" real,
"podiums" real,
"points" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the series in season 2009?`:
```sql
|
SELECT MIN("wins") FROM "career_summary" WHERE "points"=97 AND "season"<2009; |
## Task
Generate a SQL query to answer the following question:
`What was the lowest amount of wins before season 2009 for 97 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team" text,
"races" real,
"wins" real,
"podiums" real,
"points" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the lowest amount of wins before season 2009 for 97 points?`:
```sql
|
SELECT COUNT("wins") FROM "career_summary" WHERE "season">2008 AND "podiums">6; |
## Task
Generate a SQL query to answer the following question:
`How many wins had a podium larger than 6 after season 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team" text,
"races" real,
"wins" real,
"podiums" real,
"points" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins had a podium larger than 6 after season 2008?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "week">1 AND "opponent"='detroit lions'; |
## Task
Generate a SQL query to answer the following question:
`what is the date for the week larger than 1 and the opponent detroit lions?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the date for the week larger than 1 and the opponent detroit lions?`:
```sql
|
SELECT MIN("week") FROM "schedule" WHERE "attendance"='54,714'; |
## Task
Generate a SQL query to answer the following question:
`what is the lowest week when the attendance is 54,714?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the lowest week when the attendance is 54,714?`:
```sql
|
SELECT "athlete" FROM "heat_6" WHERE "react"=0.248; |
## Task
Generate a SQL query to answer the following question:
`Which Athlete has a Reaction of 0.248?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_6" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Athlete has a Reaction of 0.248?`:
```sql
|
SELECT MAX("rank") FROM "heat_6" WHERE "react"=0.198 AND "time"<46.3; |
## Task
Generate a SQL query to answer the following question:
`Which Rank has a Reaction of 0.198, and a Time smaller than 46.3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_6" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank has a Reaction of 0.198, and a Time smaller than 46.3?`:
```sql
|
SELECT AVG("lane") FROM "heat_6" WHERE "time">47.83; |
## Task
Generate a SQL query to answer the following question:
`Which Lane has a Time larger than 47.83?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_6" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Lane has a Time larger than 47.83?`:
```sql
|
SELECT AVG("react") FROM "heat_6" WHERE "rank"<4 AND "nationality"='trinidad and tobago' AND "time">45.13; |
## Task
Generate a SQL query to answer the following question:
`Which Reaction has a Rank smaller than 4, and a Nationality of trinidad and tobago, and a Time larger than 45.13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_6" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Reaction has a Rank smaller than 4, and a Nationality of trinidad and tobago, and a Time larger than 45.13?`:
```sql
|
SELECT COUNT("rank_final") FROM "competitive_history" WHERE "year">2008 AND "apparatus"='balance beam' AND "rank_qualifying">4; |
## Task
Generate a SQL query to answer the following question:
`Count the Rank-Final which has a Year larger than 2008, and an Apparatus of balance beam, and a Rank-Qualifying larger than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "competitive_history" (
"year" real,
"competition_description" text,
"location" text,
"apparatus" text,
"rank_final" real,
"score_final" real,
"rank_qualifying" real,
"score_qualifying" real
);
### SQL
Given the database schema, here is the SQL query that answers `Count the Rank-Final which has a Year larger than 2008, and an Apparatus of balance beam, and a Rank-Qualifying larger than 4?`:
```sql
|
SELECT MIN("score_final") FROM "competitive_history" WHERE "rank_final"=7 AND "year">2009; |
## Task
Generate a SQL query to answer the following question:
`Which the lowest Score-Fina has a Rank-Final of 7 and a Year larger than 2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "competitive_history" (
"year" real,
"competition_description" text,
"location" text,
"apparatus" text,
"rank_final" real,
"score_final" real,
"rank_qualifying" real,
"score_qualifying" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which the lowest Score-Fina has a Rank-Final of 7 and a Year larger than 2009?`:
```sql
|
SELECT AVG("year") FROM "competitive_history" WHERE "rank_final"<2 AND "apparatus"='team' AND "score_qualifying"<248.275; |
## Task
Generate a SQL query to answer the following question:
`Name the Year with a Rank-Final smaller than 2, an Apparatus of team, and a Score-Qualifying smaller than 248.275?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "competitive_history" (
"year" real,
"competition_description" text,
"location" text,
"apparatus" text,
"rank_final" real,
"score_final" real,
"rank_qualifying" real,
"score_qualifying" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Year with a Rank-Final smaller than 2, an Apparatus of team, and a Score-Qualifying smaller than 248.275?`:
```sql
|
SELECT "pick" FROM "fifth_round" WHERE "position"='defensive end' AND "team"='new york jets'; |
## Task
Generate a SQL query to answer the following question:
`What's the pick for the New York jets with a defensive end?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fifth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the pick for the New York jets with a defensive end?`:
```sql
|
SELECT "pick" FROM "fifth_round" WHERE "college"='georgia tech'; |
## Task
Generate a SQL query to answer the following question:
`What's the pick for Georgia tech?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fifth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the pick for Georgia tech?`:
```sql
|
SELECT "player" FROM "fifth_round" WHERE "position"='halfback'; |
## Task
Generate a SQL query to answer the following question:
`Who plays halfback?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fifth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who plays halfback?`:
```sql
|
SELECT "team" FROM "fifth_round" WHERE "college"='washington'; |
## Task
Generate a SQL query to answer the following question:
`Who is the team for Washington College?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fifth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the team for Washington College?`:
```sql
|
SELECT COUNT("rank") FROM "top_10_largest_crowds" WHERE "attendance"='93,039'; |
## Task
Generate a SQL query to answer the following question:
`What is the Rank of the game with an Attendance of 93,039?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_10_largest_crowds" (
"rank" real,
"attendance" real,
"visiting_team" text,
"date" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Rank of the game with an Attendance of 93,039?`:
```sql
|
SELECT "fuel_system" FROM "engines" WHERE "model"='diesel engines'; |
## Task
Generate a SQL query to answer the following question:
`What fuel system does the diesel engines model have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engines" (
"model" text,
"engine" text,
"displacement" text,
"valvetrain" text,
"fuel_system" text,
"max_power_at_rpm" text,
"max_torque_at_rpm" text,
"years" text
);
### SQL
Given the database schema, here is the SQL query that answers `What fuel system does the diesel engines model have?`:
```sql
|
SELECT "displacement" FROM "engines" WHERE "model"='petrol engines'; |
## Task
Generate a SQL query to answer the following question:
`What is the displacement for the petrol engines model?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engines" (
"model" text,
"engine" text,
"displacement" text,
"valvetrain" text,
"fuel_system" text,
"max_power_at_rpm" text,
"max_torque_at_rpm" text,
"years" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the displacement for the petrol engines model?`:
```sql
|
SELECT "number_of_electorates_2009" FROM "assembly_segments" WHERE "name"='gwalior rural'; |
## Task
Generate a SQL query to answer the following question:
`What is the size of the 2009 electorate for Gwalior Rural?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the size of the 2009 electorate for Gwalior Rural?`:
```sql
|
SELECT "eliminated" FROM "elimination_chamber_entrances_and_elimin" WHERE "entered">3 AND "time"='35:55'; |
## Task
Generate a SQL query to answer the following question:
`Who was eliminated that entered after number 3 and lasted 35:55?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "elimination_chamber_entrances_and_elimin" (
"eliminated" text,
"wrestler" text,
"entered" real,
"eliminated_by" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was eliminated that entered after number 3 and lasted 35:55?`:
```sql
|
SELECT AVG("year") FROM "achievements" WHERE "position"='13th'; |
## Task
Generate a SQL query to answer the following question:
`What is the average year in which the finish position was 13th?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average year in which the finish position was 13th?`:
```sql
|
SELECT AVG("year") FROM "achievements" WHERE "competition"='olympic games'; |
## Task
Generate a SQL query to answer the following question:
`What is the average year for the Olympic Games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average year for the Olympic Games?`:
```sql
|
SELECT "label" FROM "release_history" WHERE "catalog"='rtradcd491' AND "date"='september 20, 2008'; |
## Task
Generate a SQL query to answer the following question:
`What is the Label of the September 20, 2008 release with Catalog number RTRADCD491?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Label of the September 20, 2008 release with Catalog number RTRADCD491?`:
```sql
|
SELECT "format" FROM "release_history" WHERE "catalog"='rtradcd491' AND "date"='september 22, 2008'; |
## Task
Generate a SQL query to answer the following question:
`What is the Format of the September 22, 2008 release with Catalog number RTRADCD491?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Format of the September 22, 2008 release with Catalog number RTRADCD491?`:
```sql
|
SELECT "format" FROM "release_history" WHERE "catalog"='rtradlp491'; |
## Task
Generate a SQL query to answer the following question:
`What is the Format of the release with Catalog number RTRADLP491?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Format of the release with Catalog number RTRADLP491?`:
```sql
|
SELECT "label" FROM "release_history" WHERE "catalog"='2508668'; |
## Task
Generate a SQL query to answer the following question:
`What is the Label of the Release with Catalog number 2508668?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Label of the Release with Catalog number 2508668?`:
```sql
|
SELECT "format" FROM "release_history" WHERE "catalog"='2508668'; |
## Task
Generate a SQL query to answer the following question:
`What is the Format of the release with Catalog number 2508668?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Format of the release with Catalog number 2508668?`:
```sql
|
SELECT "region" FROM "release_history" WHERE "label"='warner music canada'; |
## Task
Generate a SQL query to answer the following question:
`What is the Region of the Warner Music Canada Label release?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Region of the Warner Music Canada Label release?`:
```sql
|
SELECT "developer_s" FROM "list_of_game_of_the_year_awards" WHERE "game"='portal'; |
## Task
Generate a SQL query to answer the following question:
`Who were the developers for Portal?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_game_of_the_year_awards" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the developers for Portal?`:
```sql
|
SELECT "developer_s" FROM "list_of_game_of_the_year_awards" WHERE "year">2010 AND "genre"='action rpg'; |
## Task
Generate a SQL query to answer the following question:
`Who were the developers for the Action RPG made after 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_game_of_the_year_awards" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the developers for the Action RPG made after 2010?`:
```sql
|
SELECT "callsign" FROM "airlines_based_in_changi" WHERE "iata"='tr'; |
## Task
Generate a SQL query to answer the following question:
`Which Callsign has an IATA of tr?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "airlines_based_in_changi" (
"airline" text,
"iata" text,
"icao" text,
"callsign" text,
"commenced_operations" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Callsign has an IATA of tr?`:
```sql
|
SELECT "commenced_operations" FROM "airlines_based_in_changi" WHERE "airline"='valuair'; |
## Task
Generate a SQL query to answer the following question:
`Which Commenced operations have an Airline of valuair?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "airlines_based_in_changi" (
"airline" text,
"iata" text,
"icao" text,
"callsign" text,
"commenced_operations" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Commenced operations have an Airline of valuair?`:
```sql
|
SELECT MAX("commenced_operations") FROM "airlines_based_in_changi" WHERE "airline"='valuair'; |
## Task
Generate a SQL query to answer the following question:
`Which Commenced operations have an Airline of valuair?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "airlines_based_in_changi" (
"airline" text,
"iata" text,
"icao" text,
"callsign" text,
"commenced_operations" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Commenced operations have an Airline of valuair?`:
```sql
|
SELECT "iata" FROM "airlines_based_in_changi" WHERE "icao"='slk'; |
## Task
Generate a SQL query to answer the following question:
`Which IATA has a ICAO of slk?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "airlines_based_in_changi" (
"airline" text,
"iata" text,
"icao" text,
"callsign" text,
"commenced_operations" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which IATA has a ICAO of slk?`:
```sql
|
SELECT SUM("viewers") FROM "most_watched_programmes" WHERE "rank"<2; |
## Task
Generate a SQL query to answer the following question:
`How many Viewers have a Rank smaller than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_watched_programmes" (
"rank" real,
"series" text,
"episode_title" text,
"viewers" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Viewers have a Rank smaller than 2?`:
```sql
|
SELECT COUNT("longitude") FROM "o" WHERE "ansi_code"<1036534 AND "water_sqmi"=0 AND "geo_id">3809959540; |
## Task
Generate a SQL query to answer the following question:
`What is the longitude for the Township that has a ANSI code less than 1036534, a water (sqmi) of 0, and a GEO ID greater than 3809959540?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "o" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the longitude for the Township that has a ANSI code less than 1036534, a water (sqmi) of 0, and a GEO ID greater than 3809959540?`:
```sql
|
SELECT COUNT("pop_2010") FROM "o" WHERE "longitude"=-97.578927; |
## Task
Generate a SQL query to answer the following question:
`What is the population in 2010 for the longitude of -97.578927?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "o" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the population in 2010 for the longitude of -97.578927?`:
```sql
|
SELECT SUM("pop_2010") FROM "o" WHERE "land_sqmi"<34.424 AND "county"='mountrail' AND "geo_id"<3806159940; |
## Task
Generate a SQL query to answer the following question:
`What is the total population in 2010 for the township located in Mountrail which has land less than 34.424 sq miles and a GEO ID less than 3806159940?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "o" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total population in 2010 for the township located in Mountrail which has land less than 34.424 sq miles and a GEO ID less than 3806159940?`:
```sql
|
SELECT MAX("latitude") FROM "o" WHERE "ansi_code">1759541 AND "pop_2010"=72; |
## Task
Generate a SQL query to answer the following question:
`What is the highest recorded latitude for the township that has an ANSI code greater than 1759541 and a population in 2010 of 72?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "o" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest recorded latitude for the township that has an ANSI code greater than 1759541 and a population in 2010 of 72?`:
```sql
|
SELECT "athlete" FROM "semifinal_2" WHERE "rank">1 AND "lane">7 AND "nationality"='china'; |
## Task
Generate a SQL query to answer the following question:
`Which Athlete has a Rank larger than 1, and a Lane larger than 7, and a Nationality of china?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Athlete has a Rank larger than 1, and a Lane larger than 7, and a Nationality of china?`:
```sql
|
SELECT SUM("lane") FROM "semifinal_2" WHERE "time">13.59 AND "rank">8; |
## Task
Generate a SQL query to answer the following question:
`How many Lanes have a Time larger than 13.59, and a Rank larger than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Lanes have a Time larger than 13.59, and a Rank larger than 8?`:
```sql
|
SELECT SUM("lane") FROM "semifinal_2" WHERE "nationality"='france' AND "rank">8; |
## Task
Generate a SQL query to answer the following question:
`How many lanes have a Nationality of france, and a Rank larger than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many lanes have a Nationality of france, and a Rank larger than 8?`:
```sql
|
SELECT "game" FROM "game_spot" WHERE "developer_s"='nintendo' AND "platform_s"='gamecube'; |
## Task
Generate a SQL query to answer the following question:
`What game was developed by Nintendo for the Gamecube platform?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_spot" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What game was developed by Nintendo for the Gamecube platform?`:
```sql
|
SELECT "genre" FROM "game_spot" WHERE "game"='super mario galaxy'; |
## Task
Generate a SQL query to answer the following question:
`What is the genre of Super Mario Galaxy?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_spot" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the genre of Super Mario Galaxy?`:
```sql
|
SELECT AVG("year") FROM "demography" WHERE "ten_year_pct_change"='67.3' AND "rank_among_provinces">5; |
## Task
Generate a SQL query to answer the following question:
`What is the average year having a rank among provinces over 5 and ten-year percentage change of 67.3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demography" (
"year" real,
"population" real,
"five_year_pct_change" text,
"ten_year_pct_change" text,
"rank_among_provinces" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average year having a rank among provinces over 5 and ten-year percentage change of 67.3?`:
```sql
|
SELECT MAX("population") FROM "demography" WHERE "rank_among_provinces"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the highest population for the province having a rank under 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demography" (
"year" real,
"population" real,
"five_year_pct_change" text,
"ten_year_pct_change" text,
"rank_among_provinces" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest population for the province having a rank under 5?`:
```sql
|
SELECT COUNT("population") FROM "demography" WHERE "five_year_pct_change"='3.6' AND "rank_among_provinces"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the number of population values having a rank among provinces under 5 with a five-year percentage change of 3.6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demography" (
"year" real,
"population" real,
"five_year_pct_change" text,
"ten_year_pct_change" text,
"rank_among_provinces" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of population values having a rank among provinces under 5 with a five-year percentage change of 3.6?`:
```sql
|
SELECT MAX("year") FROM "demography" WHERE "ten_year_pct_change"='7.9'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest year having a ten-year percentage change of 7.9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demography" (
"year" real,
"population" real,
"five_year_pct_change" text,
"ten_year_pct_change" text,
"rank_among_provinces" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest year having a ten-year percentage change of 7.9?`:
```sql
|
SELECT "comp" FROM "1998_in_paraguayan_football" WHERE "date"='1998-04-22'; |
## Task
Generate a SQL query to answer the following question:
`What's the comp for 1998-04-22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1998_in_paraguayan_football" (
"date" text,
"venue" text,
"score" text,
"comp" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the comp for 1998-04-22?`:
```sql
|
SELECT "score" FROM "1998_in_paraguayan_football" WHERE "venue"='olympic stadium tokyo, japan'; |
## Task
Generate a SQL query to answer the following question:
`What's the score at Olympic Stadium Tokyo, Japan?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1998_in_paraguayan_football" (
"date" text,
"venue" text,
"score" text,
"comp" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the score at Olympic Stadium Tokyo, Japan?`:
```sql
|
SELECT "comp" FROM "1998_in_paraguayan_football" WHERE "venue"='olympic stadium tokyo, japan'; |
## Task
Generate a SQL query to answer the following question:
`What's the comp in Olympic Stadium Tokyo, Japan?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1998_in_paraguayan_football" (
"date" text,
"venue" text,
"score" text,
"comp" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the comp in Olympic Stadium Tokyo, Japan?`:
```sql
|
SELECT "report" FROM "1998_in_paraguayan_football" WHERE "venue"='king baudouin stadium brussels, belgium'; |
## Task
Generate a SQL query to answer the following question:
`What's the report in King Baudouin Stadium Brussels, Belgium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1998_in_paraguayan_football" (
"date" text,
"venue" text,
"score" text,
"comp" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the report in King Baudouin Stadium Brussels, Belgium?`:
```sql
|
SELECT "percentage_lost" FROM "eliminated_contestants_weigh_in_results" WHERE "starting_weight_kg">102 AND "weight_lost_kg"=46.9; |
## Task
Generate a SQL query to answer the following question:
`What is the Percentage Lost for the contestant with a starting weight above 102 kg who lost 46.9 kg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eliminated_contestants_weigh_in_results" (
"contestant" text,
"starting_weight_kg" real,
"final_weight_kg" real,
"weight_lost_kg" real,
"percentage_lost" text,
"position_out_of_eliminated_contestants" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Percentage Lost for the contestant with a starting weight above 102 kg who lost 46.9 kg?`:
```sql
|
SELECT SUM("lane") FROM "semifinal_2" WHERE "time"='1:57.71'; |
## Task
Generate a SQL query to answer the following question:
`What lane has a time of 1:57.71?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What lane has a time of 1:57.71?`:
```sql
|
SELECT "name" FROM "semifinal_2" WHERE "rank">3 AND "lane"<6 AND "time"='1:58.15'; |
## Task
Generate a SQL query to answer the following question:
`Who had a larger rank than 3, less than 6 lanes, and a time of 1:58.15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had a larger rank than 3, less than 6 lanes, and a time of 1:58.15?`:
```sql
|
SELECT MIN("crude_death_rate_per_1000") FROM "registered_births_and_deaths" WHERE "deaths"='768' AND "crude_birth_rate_per_1000"<29.7; |
## Task
Generate a SQL query to answer the following question:
`Which Crude death rate (per 1000) has Deaths of 768, and a Crude birth rate (per 1000) smaller than 29.7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "registered_births_and_deaths" (
"average_population_x_1000" real,
"live_births" text,
"deaths" text,
"natural_change" text,
"crude_birth_rate_per_1000" real,
"crude_death_rate_per_1000" real,
"natural_change_per_1000" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Crude death rate (per 1000) has Deaths of 768, and a Crude birth rate (per 1000) smaller than 29.7?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.