output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT SUM("drawn") FROM "first_division_final_table" WHERE "position"<12 AND "team"='clitheroe' AND "lost">4; |
## Task
Generate a SQL query to answer the following question:
`How many draws did clitheroe have when their position was less than 12 and they lost less than 4 times?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_division_final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many draws did clitheroe have when their position was less than 12 and they lost less than 4 times?`:
```sql
|
SELECT "reserved_for_sc_st_none" FROM "assembly_segments" WHERE "name"='uklana'; |
## Task
Generate a SQL query to answer the following question:
`What is the reserved for (ST/ST/None) when it was Uklana?`
### 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 reserved for (ST/ST/None) when it was Uklana?`:
```sql
|
SELECT "constituency_number" FROM "assembly_segments" WHERE "district"='bhiwani'; |
## Task
Generate a SQL query to answer the following question:
`Bhiwani district have what constituency number?`
### 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 `Bhiwani district have what constituency number?`:
```sql
|
SELECT "reserved_for_sc_st_none" FROM "assembly_segments" WHERE "number_of_electorates_2009">'101,595' AND "constituency_number"='49'; |
## Task
Generate a SQL query to answer the following question:
`What is the reserved for (SC/ST/None) when number of electorates (2009) is larger than 101,595, and constituency is 49?`
### 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 reserved for (SC/ST/None) when number of electorates (2009) is larger than 101,595, and constituency is 49?`:
```sql
|
SELECT "constituency_number" FROM "assembly_segments" WHERE "number_of_electorates_2009">'152,958'; |
## Task
Generate a SQL query to answer the following question:
`What is the constituency number with electorates (2009) number larger than 152,958?`
### 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 constituency number with electorates (2009) number larger than 152,958?`:
```sql
|
SELECT "date_performed" FROM "week_4_july_30_and_31_2008" WHERE "main_contestant"='jatin shah' AND "co_contestant_yaar_vs_pyaar"='shalini chandran'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the performance by Jatin Shah and co-contestant is Shalini Chandran?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "week_4_july_30_and_31_2008" (
"main_contestant" text,
"co_contestant_yaar_vs_pyaar" text,
"date_performed" text,
"scores_by_each_individual_judge" text,
"total_score_week" text,
"position" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the performance by Jatin Shah and co-contestant is Shalini Chandran?`:
```sql
|
SELECT "scores_by_each_individual_judge" FROM "week_4_july_30_and_31_2008" WHERE "total_score_week"='41/60' AND "co_contestant_yaar_vs_pyaar"='shalini chandran'; |
## Task
Generate a SQL query to answer the following question:
`What are the scores when total score/week is 41/60 and co-contestant is Shalini Chandran?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "week_4_july_30_and_31_2008" (
"main_contestant" text,
"co_contestant_yaar_vs_pyaar" text,
"date_performed" text,
"scores_by_each_individual_judge" text,
"total_score_week" text,
"position" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the scores when total score/week is 41/60 and co-contestant is Shalini Chandran?`:
```sql
|
SELECT "position" FROM "week_4_july_30_and_31_2008" WHERE "main_contestant"='vishal singh' AND "scores_by_each_individual_judge"='1 + 7 + 5 = 13'; |
## Task
Generate a SQL query to answer the following question:
`What position is there when the main contestant is Vishal Singh and the scores are 1 + 7 + 5 = 13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "week_4_july_30_and_31_2008" (
"main_contestant" text,
"co_contestant_yaar_vs_pyaar" text,
"date_performed" text,
"scores_by_each_individual_judge" text,
"total_score_week" text,
"position" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What position is there when the main contestant is Vishal Singh and the scores are 1 + 7 + 5 = 13?`:
```sql
|
SELECT "main_contestant" FROM "week_4_july_30_and_31_2008" WHERE "co_contestant_yaar_vs_pyaar"='shalini chandran'; |
## Task
Generate a SQL query to answer the following question:
`Who is the main contestant when the co-contestant (yaar vs. pyaar) is Shalini Chandran?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "week_4_july_30_and_31_2008" (
"main_contestant" text,
"co_contestant_yaar_vs_pyaar" text,
"date_performed" text,
"scores_by_each_individual_judge" text,
"total_score_week" text,
"position" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the main contestant when the co-contestant (yaar vs. pyaar) is Shalini Chandran?`:
```sql
|
SELECT "main_contestant" FROM "week_4_july_30_and_31_2008" WHERE "status"='eliminated' AND "scores_by_each_individual_judge"='1 + 7 + 5 = 13'; |
## Task
Generate a SQL query to answer the following question:
`Who is the main contestant eliminated with a score of 1 + 7 + 5 = 13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "week_4_july_30_and_31_2008" (
"main_contestant" text,
"co_contestant_yaar_vs_pyaar" text,
"date_performed" text,
"scores_by_each_individual_judge" text,
"total_score_week" text,
"position" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the main contestant eliminated with a score of 1 + 7 + 5 = 13?`:
```sql
|
SELECT "series_4" FROM "czech_republic" WHERE "seat"=1; |
## Task
Generate a SQL query to answer the following question:
`What shows for series 4 when the seat shows 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "czech_republic" (
"seat" real,
"series_1" text,
"series_2" text,
"series_3" text,
"series_4" text
);
### SQL
Given the database schema, here is the SQL query that answers `What shows for series 4 when the seat shows 1?`:
```sql
|
SELECT AVG("seat") FROM "czech_republic" WHERE "series_3"='dana bérová'; |
## Task
Generate a SQL query to answer the following question:
`What is the seat number when Series 3 shows Dana Bérová?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "czech_republic" (
"seat" real,
"series_1" text,
"series_2" text,
"series_3" text,
"series_4" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the seat number when Series 3 shows Dana Bérová?`:
```sql
|
SELECT "partner" FROM "double_titles_5" WHERE "tournament"='algiers 2, algeria'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Partner in the Algiers 2, Algeria Tournament?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "double_titles_5" (
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Partner in the Algiers 2, Algeria Tournament?`:
```sql
|
SELECT "opponents" FROM "double_titles_5" WHERE "partner"='rushmi chakravarthi'; |
## Task
Generate a SQL query to answer the following question:
`Who were the Opponents in the Match with Partner Rushmi Chakravarthi?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "double_titles_5" (
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the Opponents in the Match with Partner Rushmi Chakravarthi?`:
```sql
|
SELECT "date" FROM "double_titles_5" WHERE "score"='6–4, 7–5'; |
## Task
Generate a SQL query to answer the following question:
`What is the Date of the Match with a Score of 6–4, 7–5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "double_titles_5" (
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Date of the Match with a Score of 6–4, 7–5?`:
```sql
|
SELECT MIN("loses") FROM "1_lyga" WHERE "position"<8 AND "games_played"<30; |
## Task
Generate a SQL query to answer the following question:
`What is the fewest loses for the club that is below 8 in position, and had played less than 30 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1_lyga" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the fewest loses for the club that is below 8 in position, and had played less than 30 games?`:
```sql
|
SELECT SUM("loses") FROM "1_lyga" WHERE "draws"<4 AND "goals_conceded"<105 AND "position">2 AND "goals_scored"<38; |
## Task
Generate a SQL query to answer the following question:
`What is the loses total when there is less than 4 draws, less than 105 conceded goals, less than 38 goals scored, and the club is positioned greater than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1_lyga" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the loses total when there is less than 4 draws, less than 105 conceded goals, less than 38 goals scored, and the club is positioned greater than 2?`:
```sql
|
SELECT SUM("goals_conceded") FROM "1_lyga" WHERE "points">58 AND "wins"<27 AND "draws"<1; |
## Task
Generate a SQL query to answer the following question:
`How many total goals conceded are there when the points are greater than 58, less than 27 wins, and less than 1 draws?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1_lyga" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many total goals conceded are there when the points are greater than 58, less than 27 wins, and less than 1 draws?`:
```sql
|
SELECT COUNT("goals_scored") FROM "1_lyga" WHERE "games_played"<30; |
## Task
Generate a SQL query to answer the following question:
`How many total goals scored when less than 30 games have been played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1_lyga" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many total goals scored when less than 30 games have been played?`:
```sql
|
SELECT AVG("goals_scored") FROM "1_lyga" WHERE "games_played"<30; |
## Task
Generate a SQL query to answer the following question:
`When less than 30 games have been played what is the average goals scored?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1_lyga" (
"position" real,
"club" text,
"games_played" real,
"wins" real,
"draws" real,
"loses" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `When less than 30 games have been played what is the average goals scored?`:
```sql
|
SELECT "league_cup_apps" FROM "appearances_and_goals" WHERE "league_cup_goals">0; |
## Task
Generate a SQL query to answer the following question:
`What is the league cup app with league cup goals more than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"flt_apps" text,
"flt_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the league cup app with league cup goals more than 0?`:
```sql
|
SELECT "fa_cup_apps" FROM "appearances_and_goals" WHERE "league_cup_goals"=0 AND "total_apps"='43'; |
## Task
Generate a SQL query to answer the following question:
`What is the fa cup apps with 0 league cup goals, and a total of 43 apps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"flt_apps" text,
"flt_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the fa cup apps with 0 league cup goals, and a total of 43 apps?`:
```sql
|
SELECT MAX("flt_goals") FROM "appearances_and_goals" WHERE "league_cup_goals"=0 AND "position"='gk' AND "league_cup_apps"='2'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest FLT goals with 0 league cup goals, a GK position, and 2 league cup apps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"flt_apps" text,
"flt_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest FLT goals with 0 league cup goals, a GK position, and 2 league cup apps?`:
```sql
|
SELECT "date" FROM "international_goals" WHERE "venue"='sam nujoma stadium, windhoek, namibia'; |
## Task
Generate a SQL query to answer the following question:
`On what date is the venue Sam Nujoma Stadium, Windhoek, Namibia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date is the venue Sam Nujoma Stadium, Windhoek, Namibia?`:
```sql
|
SELECT "third_place" FROM "professional_seasons_1994_2003" WHERE "number_of_clubs"=14 AND "winners"='dalian shide' AND "fourth_placed"='chongqing longxin'; |
## Task
Generate a SQL query to answer the following question:
`Who was in third place when the Winner was Dalian Shide, Chongqing Longxin was 4th and 14 clubs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "professional_seasons_1994_2003" (
"season" real,
"winners" text,
"runners_up" text,
"third_place" text,
"fourth_placed" text,
"number_of_clubs" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who was in third place when the Winner was Dalian Shide, Chongqing Longxin was 4th and 14 clubs?`:
```sql
|
SELECT SUM("season") FROM "professional_seasons_1994_2003" WHERE "winners"='dalian wanda' AND "fourth_placed"='yanbian aodong'; |
## Task
Generate a SQL query to answer the following question:
`What season had Dalian Wanda as the winner with Yanbian Aodong winning 4th?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "professional_seasons_1994_2003" (
"season" real,
"winners" text,
"runners_up" text,
"third_place" text,
"fourth_placed" text,
"number_of_clubs" real
);
### SQL
Given the database schema, here is the SQL query that answers `What season had Dalian Wanda as the winner with Yanbian Aodong winning 4th?`:
```sql
|
SELECT AVG("number_of_clubs") FROM "professional_seasons_1994_2003" WHERE "fourth_placed"='shenzhen jianlibao' AND "season"<2003; |
## Task
Generate a SQL query to answer the following question:
`What is the number of clubs before 2003 with a 4th place winner of Shenzhen Jianlibao?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "professional_seasons_1994_2003" (
"season" real,
"winners" text,
"runners_up" text,
"third_place" text,
"fourth_placed" text,
"number_of_clubs" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of clubs before 2003 with a 4th place winner of Shenzhen Jianlibao?`:
```sql
|
SELECT AVG("number_of_clubs") FROM "professional_seasons_1994_2003" WHERE "winners"='dalian shide' AND "fourth_placed"='sichuan quanxing'; |
## Task
Generate a SQL query to answer the following question:
`What is the number of clubs when Dalian Shide won and Sichuan Quanxing won 4th?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "professional_seasons_1994_2003" (
"season" real,
"winners" text,
"runners_up" text,
"third_place" text,
"fourth_placed" text,
"number_of_clubs" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of clubs when Dalian Shide won and Sichuan Quanxing won 4th?`:
```sql
|
SELECT "winners" FROM "professional_seasons_1994_2003" WHERE "runners_up"='guangzhou apollo'; |
## Task
Generate a SQL query to answer the following question:
`Who was the winner when the runner-up was Guangzhou Apollo?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "professional_seasons_1994_2003" (
"season" real,
"winners" text,
"runners_up" text,
"third_place" text,
"fourth_placed" text,
"number_of_clubs" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the winner when the runner-up was Guangzhou Apollo?`:
```sql
|
SELECT SUM("byes") FROM "2010_ladder" WHERE "against"=972 AND "wins">11; |
## Task
Generate a SQL query to answer the following question:
`How many Byes have an Against of 972, and more than 11 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2010_ladder" (
"lexton_plains" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Byes have an Against of 972, and more than 11 wins?`:
```sql
|
SELECT MAX("byes") FROM "2010_ladder" WHERE "lexton_plains"='skipton'; |
## Task
Generate a SQL query to answer the following question:
`Which Byes have a Lexton Plains of skipton?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2010_ladder" (
"lexton_plains" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Byes have a Lexton Plains of skipton?`:
```sql
|
SELECT "lost" FROM "league_table" WHERE "drawn"='0' AND "tries_against"='41'; |
## Task
Generate a SQL query to answer the following question:
`What is the value for Lost when Drawn is 0, and Tries against is 41?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the value for Lost when Drawn is 0, and Tries against is 41?`:
```sql
|
SELECT "drawn" FROM "league_table" WHERE "club"='furnace united rfc'; |
## Task
Generate a SQL query to answer the following question:
`What is the drawn value for furnace united rfc?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the drawn value for furnace united rfc?`:
```sql
|
SELECT "tries_against" FROM "league_table" WHERE "club"='burry port rfc'; |
## Task
Generate a SQL query to answer the following question:
`What tries against value does burry port rfc have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What tries against value does burry port rfc have?`:
```sql
|
SELECT MIN("staterooms") FROM "ships_cruising_in_europe" WHERE "comments"='diesel-electric hybrid engines' AND "length"='443 feet' AND "guests">190; |
## Task
Generate a SQL query to answer the following question:
`Of the ships with diesel-electric hybrid engines, length of 443 feet, and over 190 guests, what is the lowest number of staterooms?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships_cruising_in_europe" (
"ship_name" text,
"year_built_refurbished" text,
"length" text,
"crew" real,
"guests" real,
"staterooms" real,
"comments" text
);
### SQL
Given the database schema, here is the SQL query that answers `Of the ships with diesel-electric hybrid engines, length of 443 feet, and over 190 guests, what is the lowest number of staterooms?`:
```sql
|
SELECT "wins" FROM "grand_prix_career_statistics" WHERE "year">1987 AND "points"<188; |
## Task
Generate a SQL query to answer the following question:
`How many wins for the year that is later than 1987 and has points less than 188?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_career_statistics" (
"year" real,
"class" text,
"team" text,
"machine" text,
"points" real,
"rank" text,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins for the year that is later than 1987 and has points less than 188?`:
```sql
|
SELECT "machine" FROM "grand_prix_career_statistics" WHERE "rank"='4th' AND "wins"=2; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the machine that ranked 4th and has 2 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_career_statistics" (
"year" real,
"class" text,
"team" text,
"machine" text,
"points" real,
"rank" text,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the machine that ranked 4th and has 2 wins?`:
```sql
|
SELECT SUM("wins") FROM "grand_prix_career_statistics" WHERE "year"=1994; |
## Task
Generate a SQL query to answer the following question:
`How many wins were there in 1994?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_career_statistics" (
"year" real,
"class" text,
"team" text,
"machine" text,
"points" real,
"rank" text,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins were there in 1994?`:
```sql
|
SELECT "rank" FROM "grand_prix_career_statistics" WHERE "wins">2 AND "points">204; |
## Task
Generate a SQL query to answer the following question:
`What is the rank associated with the team that has more than 2 wins and has greater than 204 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_career_statistics" (
"year" real,
"class" text,
"team" text,
"machine" text,
"points" real,
"rank" text,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank associated with the team that has more than 2 wins and has greater than 204 points?`:
```sql
|
SELECT SUM("pick") FROM "round_2" WHERE "player"='pong escobal'; |
## Task
Generate a SQL query to answer the following question:
`How many picks have a Player of pong escobal?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many picks have a Player of pong escobal?`:
```sql
|
SELECT "pba_team" FROM "round_2" WHERE "college"='nu'; |
## Task
Generate a SQL query to answer the following question:
`Which PBA team has a College of nu?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which PBA team has a College of nu?`:
```sql
|
SELECT "place_of_birth" FROM "list_of_participants" WHERE "elevator"='lucius iii' AND "cardinalatial_title"='deacon of s. giorgio in velabro'; |
## Task
Generate a SQL query to answer the following question:
`What is the birth place for someone elevated by Lucius III, and has the Cardinalatial title of Deacon of S. Giorgio in Velabro?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_participants" (
"elector" text,
"place_of_birth" text,
"cardinalatial_title" text,
"elevated" text,
"elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the birth place for someone elevated by Lucius III, and has the Cardinalatial title of Deacon of S. Giorgio in Velabro?`:
```sql
|
SELECT "place_of_birth" FROM "list_of_participants" WHERE "elector"='laborante de panormo'; |
## Task
Generate a SQL query to answer the following question:
`What is the place of birth for the elector Laborante de Panormo?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_participants" (
"elector" text,
"place_of_birth" text,
"cardinalatial_title" text,
"elevated" text,
"elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the place of birth for the elector Laborante de Panormo?`:
```sql
|
SELECT "elector" FROM "list_of_participants" WHERE "cardinalatial_title"='deacon of ss. cosma e damiano'; |
## Task
Generate a SQL query to answer the following question:
`Who is the elector that has the cardinalatial title of Deacon of SS. Cosma e Damiano?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_participants" (
"elector" text,
"place_of_birth" text,
"cardinalatial_title" text,
"elevated" text,
"elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the elector that has the cardinalatial title of Deacon of SS. Cosma e Damiano?`:
```sql
|
SELECT "elevator" FROM "list_of_participants" WHERE "cardinalatial_title"='deacon of ss. sergio e bacco'; |
## Task
Generate a SQL query to answer the following question:
`Who is the elevator with the cardinalatial title of Deacon of SS. Sergio e Bacco?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_participants" (
"elector" text,
"place_of_birth" text,
"cardinalatial_title" text,
"elevated" text,
"elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the elevator with the cardinalatial title of Deacon of SS. Sergio e Bacco?`:
```sql
|
SELECT SUM("premier_league") FROM "goalscorers" WHERE "fa_cup"=0 AND "total"=1 AND "uefa_cup">1; |
## Task
Generate a SQL query to answer the following question:
`How much Premier League has an FA Cup of 0, and a Total of 1, and a UEFA Cup larger than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goalscorers" (
"name" text,
"premier_league" real,
"league_cup" real,
"fa_cup" real,
"uefa_cup" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much Premier League has an FA Cup of 0, and a Total of 1, and a UEFA Cup larger than 1?`:
```sql
|
SELECT SUM("total") FROM "goalscorers" WHERE "premier_league"<6 AND "league_cup">0; |
## Task
Generate a SQL query to answer the following question:
`How many totals have a Premier League smaller than 6, and a League Cup larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goalscorers" (
"name" text,
"premier_league" real,
"league_cup" real,
"fa_cup" real,
"uefa_cup" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many totals have a Premier League smaller than 6, and a League Cup larger than 0?`:
```sql
|
SELECT AVG("fa_cup") FROM "goalscorers" WHERE "total"<1; |
## Task
Generate a SQL query to answer the following question:
`Which FA Cup has a Total smaller than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goalscorers" (
"name" text,
"premier_league" real,
"league_cup" real,
"fa_cup" real,
"uefa_cup" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which FA Cup has a Total smaller than 1?`:
```sql
|
SELECT COUNT("week") FROM "schedule" WHERE "attendance"='68,932' AND "opponent"='indianapolis colts'; |
## Task
Generate a SQL query to answer the following question:
`What week is the opponent the Indianapolis Colts with an attendance of 68,932?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What week is the opponent the Indianapolis Colts with an attendance of 68,932?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "week"<10 AND "result"='l 12-15'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance for the week before 10 with a result of L 12-15`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance for the week before 10 with a result of L 12-15`:
```sql
|
SELECT MAX("week") FROM "schedule" WHERE "result"='l 17-31'; |
## Task
Generate a SQL query to answer the following question:
`What week has a result of L 17-31 first?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What week has a result of L 17-31 first?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "attendance"='70,721'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the game that attendance was 70,721?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score for the game that attendance was 70,721?`:
```sql
|
SELECT SUM("week") FROM "performances" WHERE "result"='safe' AND "dance"='salsa'; |
## Task
Generate a SQL query to answer the following question:
`What week was she safe for a salsa dance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performances" (
"week" real,
"partner" text,
"dance" text,
"song" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What week was she safe for a salsa dance?`:
```sql
|
SELECT "opponent" FROM "professional_boxing_record" WHERE "result"='loss' AND "location"='westbury, ny'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent with the loss in Westbury, NY?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "professional_boxing_record" (
"result" text,
"opponent" text,
"type" text,
"rd_time" text,
"date" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent with the loss in Westbury, NY?`:
```sql
|
SELECT "date" FROM "professional_boxing_record" WHERE "type"='type'; |
## Task
Generate a SQL query to answer the following question:
`What is the date where the type is type?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "professional_boxing_record" (
"result" text,
"opponent" text,
"type" text,
"rd_time" text,
"date" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date where the type is type?`:
```sql
|
SELECT COUNT("rank") FROM "performances_by_nation" WHERE "silver"<2 AND "gold"=4 AND "bronze">2; |
## Task
Generate a SQL query to answer the following question:
`What is the total rank for the player with less than 2 silvers, 4 golds, and more than 2 bronze?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performances_by_nation" (
"rank" real,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total rank for the player with less than 2 silvers, 4 golds, and more than 2 bronze?`:
```sql
|
SELECT SUM("rank") FROM "performances_by_nation" WHERE "silver">1 AND "gold"=1 AND "total"<6; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of rank with more than 1 silver medal, 1 gold medal, and less than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performances_by_nation" (
"rank" real,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of rank with more than 1 silver medal, 1 gold medal, and less than 6?`:
```sql
|
SELECT "height" FROM "volleyball_at_the_2008_summer_olympics_m" WHERE "2008_club"='arona'; |
## Task
Generate a SQL query to answer the following question:
`What is the height for the 2008 club Arona?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "volleyball_at_the_2008_summer_olympics_m" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2008_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the height for the 2008 club Arona?`:
```sql
|
SELECT "name" FROM "volleyball_at_the_2008_summer_olympics_m" WHERE "2008_club"='apure'; |
## Task
Generate a SQL query to answer the following question:
`Who was the 2008 club Apure?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "volleyball_at_the_2008_summer_olympics_m" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2008_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the 2008 club Apure?`:
```sql
|
SELECT "spike" FROM "volleyball_at_the_2008_summer_olympics_m" WHERE "2008_club"='karava'; |
## Task
Generate a SQL query to answer the following question:
`Which spike has a 2008 club Karava?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "volleyball_at_the_2008_summer_olympics_m" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2008_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which spike has a 2008 club Karava?`:
```sql
|
SELECT "date" FROM "race_calendar" WHERE "circuit"='winton motor raceway'; |
## Task
Generate a SQL query to answer the following question:
`What's the date of the circuit Winton Motor 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,
"city_state" text,
"date" text,
"winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the date of the circuit Winton Motor Raceway?`:
```sql
|
SELECT "city_state" FROM "race_calendar" WHERE "circuit"='hidden valley raceway'; |
## Task
Generate a SQL query to answer the following question:
`What's the city/state of Hidden Valley 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,
"city_state" text,
"date" text,
"winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the city/state of Hidden Valley Raceway?`:
```sql
|
SELECT "date" FROM "race_calendar" WHERE "circuit"='bahrain international circuit'; |
## Task
Generate a SQL query to answer the following question:
`What's the date of Bahrain International 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,
"city_state" text,
"date" text,
"winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the date of Bahrain International Circuit?`:
```sql
|
SELECT "circuit" FROM "race_calendar" WHERE "winner"='event cancelled'; |
## Task
Generate a SQL query to answer the following question:
`What's the circuit that had an event cancelled?`
### 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,
"city_state" text,
"date" text,
"winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the circuit that had an event cancelled?`:
```sql
|
SELECT "distance" FROM "nearby_terrain_features" WHERE "feature"='ridge'; |
## Task
Generate a SQL query to answer the following question:
`what is the distance for ridge?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nearby_terrain_features" (
"name" text,
"feature" text,
"latitude" text,
"longitude" text,
"distance" text,
"bearing" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the distance for ridge?`:
```sql
|
SELECT "latitude" FROM "nearby_terrain_features" WHERE "distance"='42.5km'; |
## Task
Generate a SQL query to answer the following question:
`what is the latitude when the distance is 42.5km?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nearby_terrain_features" (
"name" text,
"feature" text,
"latitude" text,
"longitude" text,
"distance" text,
"bearing" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the latitude when the distance is 42.5km?`:
```sql
|
SELECT "feature" FROM "nearby_terrain_features" WHERE "name"='bird ridge'; |
## Task
Generate a SQL query to answer the following question:
`what is the feature named bird ridge?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nearby_terrain_features" (
"name" text,
"feature" text,
"latitude" text,
"longitude" text,
"distance" text,
"bearing" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the feature named bird ridge?`:
```sql
|
SELECT "distance" FROM "nearby_terrain_features" WHERE "name"='mjåkollen'; |
## Task
Generate a SQL query to answer the following question:
`what is the distance for mjåkollen?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nearby_terrain_features" (
"name" text,
"feature" text,
"latitude" text,
"longitude" text,
"distance" text,
"bearing" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the distance for mjåkollen?`:
```sql
|
SELECT "distance" FROM "nearby_terrain_features" WHERE "bearing"='297°'; |
## Task
Generate a SQL query to answer the following question:
`what is the distance for bearing 297°?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nearby_terrain_features" (
"name" text,
"feature" text,
"latitude" text,
"longitude" text,
"distance" text,
"bearing" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the distance for bearing 297°?`:
```sql
|
SELECT "platform_s" FROM "gamasutra" WHERE "year"=2007; |
## Task
Generate a SQL query to answer the following question:
`What platform has a year of 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "gamasutra" (
"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 platform has a year of 2007?`:
```sql
|
SELECT "game" FROM "gamasutra" WHERE "year"=2011; |
## Task
Generate a SQL query to answer the following question:
`Which game was released in 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "gamasutra" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which game was released in 2011?`:
```sql
|
SELECT "platform_s" FROM "gamasutra" WHERE "year"<2009 AND "game"='wii sports'; |
## Task
Generate a SQL query to answer the following question:
`What platform came out before 2009 with the game wii sports?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "gamasutra" (
"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 platform came out before 2009 with the game wii sports?`:
```sql
|
SELECT "nationality" FROM "semifinal_2" WHERE "lane"<6 AND "rank"=1; |
## Task
Generate a SQL query to answer the following question:
`What nationality has a lane less than 6, with 1 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 a lane less than 6, with 1 as the rank?`:
```sql
|
SELECT "time" FROM "semifinal_2" WHERE "lane"<5 AND "nationality"='poland'; |
## Task
Generate a SQL query to answer the following question:
`What time has a lane less than 5, with Poland as the nationality?`
### 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 time has a lane less than 5, with Poland as the nationality?`:
```sql
|
SELECT COUNT("lane") FROM "semifinal_2" WHERE "time"='1:53.70'; |
## Task
Generate a SQL query to answer the following question:
`How many lanes have 1:53.70 as the time?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many lanes have 1:53.70 as the time?`:
```sql
|
SELECT SUM("rank") FROM "semifinal_2" WHERE "name"='chen yin' AND "lane">8; |
## Task
Generate a SQL query to answer the following question:
`How many ranks have chen yin as the name, with a lane greater 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,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many ranks have chen yin as the name, with a lane greater than 8?`:
```sql
|
SELECT "nationality" FROM "semifinal_2" WHERE "time"='1:55.35'; |
## Task
Generate a SQL query to answer the following question:
`What nationality has 1:55.35 as the time?`
### 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 1:55.35 as the time?`:
```sql
|
SELECT SUM("lane") FROM "semifinal_2" WHERE "rank">8; |
## Task
Generate a SQL query to answer the following question:
`How many lanes have a rank greater 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,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many lanes have a rank greater than 8?`:
```sql
|
SELECT "home" FROM "teams" WHERE "country"='sweden'; |
## Task
Generate a SQL query to answer the following question:
`Where in Sweden is the home of the Swedish team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams" (
"team" text,
"country" text,
"home" text,
"skip" text,
"third" text,
"second" text,
"lead" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where in Sweden is the home of the Swedish team?`:
```sql
|
SELECT "third" FROM "teams" WHERE "second"='xu xiaoming'; |
## Task
Generate a SQL query to answer the following question:
`Who is third to Xu Xiaoming at second?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams" (
"team" text,
"country" text,
"home" text,
"skip" text,
"third" text,
"second" text,
"lead" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is third to Xu Xiaoming at second?`:
```sql
|
SELECT "lead" FROM "teams" WHERE "home"='saskatoon, saskatchewan'; |
## Task
Generate a SQL query to answer the following question:
`Who is the lead for the team from Saskatoon, Saskatchewan?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams" (
"team" text,
"country" text,
"home" text,
"skip" text,
"third" text,
"second" text,
"lead" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the lead for the team from Saskatoon, Saskatchewan?`:
```sql
|
SELECT "second" FROM "teams" WHERE "lead"='euan byers'; |
## Task
Generate a SQL query to answer the following question:
`Who is second on the team with Euan Byers at lead?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams" (
"team" text,
"country" text,
"home" text,
"skip" text,
"third" text,
"second" text,
"lead" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is second on the team with Euan Byers at lead?`:
```sql
|
SELECT "third" FROM "teams" WHERE "home"='madison, wisconsin' AND "skip"='craig brown'; |
## Task
Generate a SQL query to answer the following question:
`Who is the third on the team from Madison, Wisconsin that has Craig Brown as skip?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams" (
"team" text,
"country" text,
"home" text,
"skip" text,
"third" text,
"second" text,
"lead" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the third on the team from Madison, Wisconsin that has Craig Brown as skip?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "opponent"='chicago bears'; |
## Task
Generate a SQL query to answer the following question:
`On which date was the opponent the Chicago Bears?`
### 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 `On which date was the opponent the Chicago Bears?`:
```sql
|
SELECT SUM("week") FROM "schedule" WHERE "date"='october 30, 1983'; |
## Task
Generate a SQL query to answer the following question:
`Which week was on october 30, 1983?`
### 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 `Which week was on october 30, 1983?`:
```sql
|
SELECT "mascot" FROM "current_members" WHERE "previous_conference"='independent' AND "location"='leo'; |
## Task
Generate a SQL query to answer the following question:
`What is the Mascot for the team from leo that had a Previous Conference value of independent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_members" (
"school" text,
"location" text,
"mascot" text,
"enrollment_08_09" real,
"ihsaa_class_football_class" text,
"county" text,
"year_joined" real,
"previous_conference" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Mascot for the team from leo that had a Previous Conference value of independent?`:
```sql
|
SELECT "school" FROM "current_members" WHERE "ihsaa_class_football_class"='3a/2a'; |
## Task
Generate a SQL query to answer the following question:
`What School had 3a/2a as the value for IHSAA Class/ Football Class?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_members" (
"school" text,
"location" text,
"mascot" text,
"enrollment_08_09" real,
"ihsaa_class_football_class" text,
"county" text,
"year_joined" real,
"previous_conference" text
);
### SQL
Given the database schema, here is the SQL query that answers `What School had 3a/2a as the value for IHSAA Class/ Football Class?`:
```sql
|
SELECT COUNT("july_1_2013_projection") FROM "table" WHERE "rank"='27'; |
## Task
Generate a SQL query to answer the following question:
`How many July 1, 2013 projections have a Rank of 27?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table" (
"rank" text,
"country_or_dependent_territory" text,
"july_1_2013_projection" real,
"pct_of_pop" real,
"average_relative_annual_growth_pct" real,
"average_absolute_annual_growth" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many July 1, 2013 projections have a Rank of 27?`:
```sql
|
SELECT "format" FROM "radio" WHERE "call_sign"='cite-fm-1'; |
## Task
Generate a SQL query to answer the following question:
`What is the format for the one which has a call sign of cite-fm-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "radio" (
"frequency" text,
"call_sign" text,
"format" text,
"owner" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the format for the one which has a call sign of cite-fm-1?`:
```sql
|
SELECT COUNT("dolphins_points") FROM "schedule" WHERE "attendance"='52,860'; |
## Task
Generate a SQL query to answer the following question:
`What'd the total Dolphin points when there was an attendance of 52,860?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"game" real,
"date" text,
"opponent" text,
"result" text,
"dolphins_points" real,
"opponents" real,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What'd the total Dolphin points when there was an attendance of 52,860?`:
```sql
|
SELECT MAX("attendance") FROM "schedule" WHERE "dolphins_points"<24 AND "opponent"='new england patriots'; |
## Task
Generate a SQL query to answer the following question:
`What's the most in attendance when the Dolphins points were less than 24 and, they played the New England Patriots?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"game" real,
"date" text,
"opponent" text,
"result" text,
"dolphins_points" real,
"opponents" real,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the most in attendance when the Dolphins points were less than 24 and, they played the New England Patriots?`:
```sql
|
SELECT "district" FROM "assembly_segments" WHERE "reserved_for_sc_st_none"='sc' AND "constituency_number"='169'; |
## Task
Generate a SQL query to answer the following question:
`Which district had SC reserved and 169 Constituents?`
### 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_2003" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which district had SC reserved and 169 Constituents?`:
```sql
|
SELECT "reserved_for_sc_st_none" FROM "assembly_segments" WHERE "constituency_number"='169'; |
## Task
Generate a SQL query to answer the following question:
`What was reserved in the district that has 169 constituents?`
### 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_2003" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was reserved in the district that has 169 constituents?`:
```sql
|
SELECT "1995" FROM "singles_performance_timeline" WHERE "1997"='lq' AND "1989"='1r'; |
## Task
Generate a SQL query to answer the following question:
`What is 1995 Grand Slam Tournament if 1997 is LQ and 1989 is 1R?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 1995 Grand Slam Tournament if 1997 is LQ and 1989 is 1R?`:
```sql
|
SELECT "1996" FROM "singles_performance_timeline" WHERE "1994"='lq' AND "1992"='3r'; |
## Task
Generate a SQL query to answer the following question:
`What is 1996 Grand Slam Tournament if 1994 is LQ and 1992 is 3R?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 1996 Grand Slam Tournament if 1994 is LQ and 1992 is 3R?`:
```sql
|
SELECT "1994" FROM "singles_performance_timeline" WHERE "1993"='grand slam tournaments'; |
## Task
Generate a SQL query to answer the following question:
`What is 1994 Grand Slam Tournament if 1993 is also grand slam tournaments?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 1994 Grand Slam Tournament if 1993 is also grand slam tournaments?`:
```sql
|
SELECT "1995" FROM "singles_performance_timeline" WHERE "1990"='lq'; |
## Task
Generate a SQL query to answer the following question:
`What is 1995 Grand Slam Tournament if 1990 is LQ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 1995 Grand Slam Tournament if 1990 is LQ?`:
```sql
|
SELECT "1990" FROM "singles_performance_timeline" WHERE "1996"='grand slam tournaments'; |
## Task
Generate a SQL query to answer the following question:
`What is 1995 Grand Slam Tournament if 1996 is also grand slam tournaments?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 1995 Grand Slam Tournament if 1996 is also grand slam tournaments?`:
```sql
|
SELECT "1987" FROM "singles_performance_timeline" WHERE "1989"='grand slam tournaments'; |
## Task
Generate a SQL query to answer the following question:
`What is 1987 Grand Slam Tournament if 1989 is also grand slam tournaments?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 1987 Grand Slam Tournament if 1989 is also grand slam tournaments?`:
```sql
|
SELECT SUM("attendance") FROM "season_schedule" WHERE "opponent"='new york jets'; |
## Task
Generate a SQL query to answer the following question:
`How many people attended the home game against the New York Jets?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many people attended the home game against the New York Jets?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.