output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT COUNT("floors") FROM "projects_as_of_march_2013" WHERE "location"='little italy'; |
## Task
Generate a SQL query to answer the following question:
`How many floors are in little Italy?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "projects_as_of_march_2013" (
"building" text,
"location" text,
"height" text,
"floors" real,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many floors are in little Italy?`:
```sql
|
SELECT "country" FROM "qualifying_races" WHERE "class"='15 meters' AND "qualifying_grand_prix"='soaring grand prix of united kingdom'; |
## Task
Generate a SQL query to answer the following question:
`What is Country, when Class is "15 meters", and when Qualifying Grand Prix is "Soaring Grand Prix Of United Kingdom"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_races" (
"place" text,
"country" text,
"qualifying_grand_prix" text,
"class" text,
"dates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Country, when Class is "15 meters", and when Qualifying Grand Prix is "Soaring Grand Prix Of United Kingdom"?`:
```sql
|
SELECT "class" FROM "qualifying_races" WHERE "dates"='22 april - 3 may 2009'; |
## Task
Generate a SQL query to answer the following question:
`What is Class, when Dates is "22 April - 3 May 2009"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_races" (
"place" text,
"country" text,
"qualifying_grand_prix" text,
"class" text,
"dates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Class, when Dates is "22 April - 3 May 2009"?`:
```sql
|
SELECT "country" FROM "qualifying_races" WHERE "class"='club'; |
## Task
Generate a SQL query to answer the following question:
`What is Country, when Class is "club"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_races" (
"place" text,
"country" text,
"qualifying_grand_prix" text,
"class" text,
"dates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Country, when Class is "club"?`:
```sql
|
SELECT "country" FROM "qualifying_races" WHERE "place"='torino'; |
## Task
Generate a SQL query to answer the following question:
`What is Country, when Place is "Torino"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_races" (
"place" text,
"country" text,
"qualifying_grand_prix" text,
"class" text,
"dates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Country, when Place is "Torino"?`:
```sql
|
SELECT AVG("squad_no") FROM "appearances_and_goals" WHERE "name"='martin smith' AND "league_goals"<17; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE AVERAGE SQUAD NUMBER WITH MARTIN SMITH, AND LEAGUE GOALS LESS THAN 17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"squad_no" real,
"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 AVERAGE SQUAD NUMBER WITH MARTIN SMITH, AND LEAGUE GOALS LESS THAN 17?`:
```sql
|
SELECT "no_5" FROM "male_names" WHERE "no_9"='michael' AND "region_year"='new hampshire (2010)'; |
## Task
Generate a SQL query to answer the following question:
`What is No. 5, when No. 9 is Michael, and when Region (Year) is New Hampshire (2010)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "male_names" (
"region_year" text,
"no_1" text,
"no_2" text,
"no_3" text,
"no_4" text,
"no_5" text,
"no_6" text,
"no_7" text,
"no_8" text,
"no_9" text,
"no_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is No. 5, when No. 9 is Michael, and when Region (Year) is New Hampshire (2010)?`:
```sql
|
SELECT "region_year" FROM "male_names" WHERE "no_7"='william' AND "no_2"='alexander'; |
## Task
Generate a SQL query to answer the following question:
`What is Region (Year), when No. 7 is William, and when No. 2 is Alexander?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "male_names" (
"region_year" text,
"no_1" text,
"no_2" text,
"no_3" text,
"no_4" text,
"no_5" text,
"no_6" text,
"no_7" text,
"no_8" text,
"no_9" text,
"no_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Region (Year), when No. 7 is William, and when No. 2 is Alexander?`:
```sql
|
SELECT "no_10" FROM "male_names" WHERE "no_1"='noah' AND "no_9"='carter'; |
## Task
Generate a SQL query to answer the following question:
`What is No. 10, when No. 1 is Noah, and when No. 9 is Carter?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "male_names" (
"region_year" text,
"no_1" text,
"no_2" text,
"no_3" text,
"no_4" text,
"no_5" text,
"no_6" text,
"no_7" text,
"no_8" text,
"no_9" text,
"no_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is No. 10, when No. 1 is Noah, and when No. 9 is Carter?`:
```sql
|
SELECT "no_7" FROM "male_names" WHERE "region_year"='arizona (2010)'; |
## Task
Generate a SQL query to answer the following question:
`What is No. 7, when Region (Year) is Arizona (2010)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "male_names" (
"region_year" text,
"no_1" text,
"no_2" text,
"no_3" text,
"no_4" text,
"no_5" text,
"no_6" text,
"no_7" text,
"no_8" text,
"no_9" text,
"no_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is No. 7, when Region (Year) is Arizona (2010)?`:
```sql
|
SELECT "no_1" FROM "male_names" WHERE "region_year"='mississippi (2010)'; |
## Task
Generate a SQL query to answer the following question:
`What is No. 1, when Region (Year) is Mississippi (2010)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "male_names" (
"region_year" text,
"no_1" text,
"no_2" text,
"no_3" text,
"no_4" text,
"no_5" text,
"no_6" text,
"no_7" text,
"no_8" text,
"no_9" text,
"no_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is No. 1, when Region (Year) is Mississippi (2010)?`:
```sql
|
SELECT "no_8" FROM "male_names" WHERE "no_10"='hunter'; |
## Task
Generate a SQL query to answer the following question:
`What is No. 8, when No. 10 is Hunter?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "male_names" (
"region_year" text,
"no_1" text,
"no_2" text,
"no_3" text,
"no_4" text,
"no_5" text,
"no_6" text,
"no_7" text,
"no_8" text,
"no_9" text,
"no_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is No. 8, when No. 10 is Hunter?`:
```sql
|
SELECT "money" FROM "final_leaderboard" WHERE "player"='larry nelson'; |
## Task
Generate a SQL query to answer the following question:
`How much did Larry Nelson win?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much did Larry Nelson win?`:
```sql
|
SELECT "tournament" FROM "lpga_tour_wins_27" WHERE "date"='sep 12, 1976'; |
## Task
Generate a SQL query to answer the following question:
`What is Tournament, when Date is "Sep 12, 1976"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_wins_27" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Tournament, when Date is "Sep 12, 1976"?`:
```sql
|
SELECT "tournament" FROM "lpga_tour_wins_27" WHERE "date"='sep 25, 1977'; |
## Task
Generate a SQL query to answer the following question:
`What is Tournament, when Date is "Sep 25, 1977"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_wins_27" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Tournament, when Date is "Sep 25, 1977"?`:
```sql
|
SELECT "margin_of_victory" FROM "lpga_tour_wins_27" WHERE "tournament"='women''s kemper open'; |
## Task
Generate a SQL query to answer the following question:
`What is Margin of Victory, when Tournament is "Women's Kemper Open"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_wins_27" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Margin of Victory, when Tournament is "Women's Kemper Open"?`:
```sql
|
SELECT "no_8" FROM "male_names" WHERE "no_4"='noah'; |
## Task
Generate a SQL query to answer the following question:
`What is the No. 8 of the person with a No. 4 of Noah?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "male_names" (
"region_year" text,
"no_1" text,
"no_2" text,
"no_3" text,
"no_4" text,
"no_5" text,
"no_6" text,
"no_7" text,
"no_8" text,
"no_9" text,
"no_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the No. 8 of the person with a No. 4 of Noah?`:
```sql
|
SELECT "no_8" FROM "male_names" WHERE "no_4"='matthew' AND "no_7"='anthony'; |
## Task
Generate a SQL query to answer the following question:
`What is the No. 8 of the person with a No. 4 of Matthew and a No. 7 of Anthony?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "male_names" (
"region_year" text,
"no_1" text,
"no_2" text,
"no_3" text,
"no_4" text,
"no_5" text,
"no_6" text,
"no_7" text,
"no_8" text,
"no_9" text,
"no_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the No. 8 of the person with a No. 4 of Matthew and a No. 7 of Anthony?`:
```sql
|
SELECT "no_1" FROM "male_names" WHERE "no_2"='john'; |
## Task
Generate a SQL query to answer the following question:
`What is the No. 1 of the person with a No. 2 of John?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "male_names" (
"region_year" text,
"no_1" text,
"no_2" text,
"no_3" text,
"no_4" text,
"no_5" text,
"no_6" text,
"no_7" text,
"no_8" text,
"no_9" text,
"no_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the No. 1 of the person with a No. 2 of John?`:
```sql
|
SELECT "no_6" FROM "male_names" WHERE "no_10"='joshua' AND "no_8"='andrew'; |
## Task
Generate a SQL query to answer the following question:
`What is the No. 6 of the person with a No. 10 of Joshua and a No. 8 of Andrew?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "male_names" (
"region_year" text,
"no_1" text,
"no_2" text,
"no_3" text,
"no_4" text,
"no_5" text,
"no_6" text,
"no_7" text,
"no_8" text,
"no_9" text,
"no_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the No. 6 of the person with a No. 10 of Joshua and a No. 8 of Andrew?`:
```sql
|
SELECT "no_2" FROM "male_names" WHERE "no_4"='ethan' AND "no_7"='jackson'; |
## Task
Generate a SQL query to answer the following question:
`What is the No. 2 of the person with a No. 5 of Ethan and NO. 7 of Jackson?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "male_names" (
"region_year" text,
"no_1" text,
"no_2" text,
"no_3" text,
"no_4" text,
"no_5" text,
"no_6" text,
"no_7" text,
"no_8" text,
"no_9" text,
"no_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the No. 2 of the person with a No. 5 of Ethan and NO. 7 of Jackson?`:
```sql
|
SELECT "no_1" FROM "male_names" WHERE "region_year"='maryland (2008)'; |
## Task
Generate a SQL query to answer the following question:
`What is the No 1 from the Maryland (2008) Region (year)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "male_names" (
"region_year" text,
"no_1" text,
"no_2" text,
"no_3" text,
"no_4" text,
"no_5" text,
"no_6" text,
"no_7" text,
"no_8" text,
"no_9" text,
"no_10" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the No 1 from the Maryland (2008) Region (year)?`:
```sql
|
SELECT AVG("draw") FROM "national_final" WHERE "artist"='maggie toal'; |
## Task
Generate a SQL query to answer the following question:
`What was the draw of Maggie Toal?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "national_final" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the draw of Maggie Toal?`:
```sql
|
SELECT MAX("points") FROM "national_final" WHERE "place"='3rd' AND "draw">5; |
## Task
Generate a SQL query to answer the following question:
`What is the highest point total that placed 3rd and has a draw larger than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "national_final" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest point total that placed 3rd and has a draw larger than 5?`:
```sql
|
SELECT "gold" FROM "champions" WHERE "year"='1958'; |
## Task
Generate a SQL query to answer the following question:
`Who won the gold in 1958?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions" (
"year" text,
"gold" text,
"silver" text,
"bronze" text,
"host_city_cities" text,
"host_country_countries" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won the gold in 1958?`:
```sql
|
SELECT "host_country_countries" FROM "champions" WHERE "silver"='[[|]] (2)' AND "bronze"='czechoslovakia (3)'; |
## Task
Generate a SQL query to answer the following question:
`What was the host country when the silver was [[|]] (2) and bronze is czechoslovakia (3)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions" (
"year" text,
"gold" text,
"silver" text,
"bronze" text,
"host_city_cities" text,
"host_country_countries" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the host country when the silver was [[|]] (2) and bronze is czechoslovakia (3)?`:
```sql
|
SELECT "host_country_countries" FROM "champions" WHERE "year"='2007'; |
## Task
Generate a SQL query to answer the following question:
`Who was the host country in 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions" (
"year" text,
"gold" text,
"silver" text,
"bronze" text,
"host_city_cities" text,
"host_country_countries" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the host country in 2007?`:
```sql
|
SELECT "host_country_countries" FROM "champions" WHERE "bronze"='[[|]] (1)' AND "host_city_cities"='krynica'; |
## Task
Generate a SQL query to answer the following question:
`Who was the host country when bronze is [[|]] (1) and host city is Krynica?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions" (
"year" text,
"gold" text,
"silver" text,
"bronze" text,
"host_city_cities" text,
"host_country_countries" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the host country when bronze is [[|]] (1) and host city is Krynica?`:
```sql
|
SELECT "result" FROM "nba_finals" WHERE "road_team"='boston' AND "game"='game 4'; |
## Task
Generate a SQL query to answer the following question:
`What is the result for Boston's road team in game 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nba_finals" (
"game" text,
"date" text,
"home_team" text,
"result" text,
"road_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result for Boston's road team in game 4?`:
```sql
|
SELECT "road_team" FROM "nba_finals" WHERE "result"='117-114'; |
## Task
Generate a SQL query to answer the following question:
`Which road team has a result of 117-114?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nba_finals" (
"game" text,
"date" text,
"home_team" text,
"result" text,
"road_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which road team has a result of 117-114?`:
```sql
|
SELECT "road_team" FROM "nba_finals" WHERE "home_team"='boston' AND "date"='april 16'; |
## Task
Generate a SQL query to answer the following question:
`What is the road team playing against Boston on April 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nba_finals" (
"game" text,
"date" text,
"home_team" text,
"result" text,
"road_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the road team playing against Boston on April 16?`:
```sql
|
SELECT "home_team" FROM "nba_finals" WHERE "date"='april 21'; |
## Task
Generate a SQL query to answer the following question:
`Which home team is on April 21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nba_finals" (
"game" text,
"date" text,
"home_team" text,
"result" text,
"road_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which home team is on April 21?`:
```sql
|
SELECT "game" FROM "nba_finals" WHERE "result"='113-106'; |
## Task
Generate a SQL query to answer the following question:
`Which game has a result of 113-106?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nba_finals" (
"game" text,
"date" text,
"home_team" text,
"result" text,
"road_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which game has a result of 113-106?`:
```sql
|
SELECT "home_team" FROM "nba_finals" WHERE "road_team"='los angeles' AND "game"='game 1'; |
## Task
Generate a SQL query to answer the following question:
`Which home team played against Los Angeles in game 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nba_finals" (
"game" text,
"date" text,
"home_team" text,
"result" text,
"road_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which home team played against Los Angeles in game 1?`:
```sql
|
SELECT MIN("rank") FROM "chessmetrics" WHERE "5_year_peak"='bobby fischer, 2841'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest rank of 5-year peak bobby fischer, 2841?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "chessmetrics" (
"rank" real,
"1_year_peak" text,
"5_year_peak" text,
"10_year_peak" text,
"15_year_peak" text,
"20_year_peak" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest rank of 5-year peak bobby fischer, 2841?`:
```sql
|
SELECT "1_year_peak" FROM "chessmetrics" WHERE "10_year_peak"='anatoly karpov, 2821'; |
## Task
Generate a SQL query to answer the following question:
`What is the 1-year peak with anatoly karpov, 2821 as the 10-year peak?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "chessmetrics" (
"rank" real,
"1_year_peak" text,
"5_year_peak" text,
"10_year_peak" text,
"15_year_peak" text,
"20_year_peak" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 1-year peak with anatoly karpov, 2821 as the 10-year peak?`:
```sql
|
SELECT "20_year_peak" FROM "chessmetrics" WHERE "15_year_peak"='emanuel lasker, 2816'; |
## Task
Generate a SQL query to answer the following question:
`What is the 20-year peak with emanuel lasker, 2816 as the 15-year peak?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "chessmetrics" (
"rank" real,
"1_year_peak" text,
"5_year_peak" text,
"10_year_peak" text,
"15_year_peak" text,
"20_year_peak" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 20-year peak with emanuel lasker, 2816 as the 15-year peak?`:
```sql
|
SELECT MAX("othersnum") FROM "by_county" WHERE "kerrypct"='52.1%'; |
## Task
Generate a SQL query to answer the following question:
`What percentage of other candidates did the county which voted 52.1% for Kerry vote for?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_county" (
"county" text,
"kerrypct" text,
"kerrynum" real,
"bushpct" text,
"bushnum" real,
"otherspct" text,
"othersnum" real,
"2000_result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What percentage of other candidates did the county which voted 52.1% for Kerry vote for?`:
```sql
|
SELECT AVG("kerrynum") FROM "by_county" WHERE "bushnum"='189,605'; |
## Task
Generate a SQL query to answer the following question:
`How many votes did Kerry get in the county that gave Bush 189,605 votes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_county" (
"county" text,
"kerrypct" text,
"kerrynum" real,
"bushpct" text,
"bushnum" real,
"otherspct" text,
"othersnum" real,
"2000_result" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many votes did Kerry get in the county that gave Bush 189,605 votes?`:
```sql
|
SELECT MIN("othersnum") FROM "by_county" WHERE "otherspct"='1.9%' AND "bushnum"<'160,390'; |
## Task
Generate a SQL query to answer the following question:
`How many votes went to other candidates in the county that gave 1.9% votes to them, and 160,390 total votes to Bush?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_county" (
"county" text,
"kerrypct" text,
"kerrynum" real,
"bushpct" text,
"bushnum" real,
"otherspct" text,
"othersnum" real,
"2000_result" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many votes went to other candidates in the county that gave 1.9% votes to them, and 160,390 total votes to Bush?`:
```sql
|
SELECT SUM("seats_2005") FROM "seat_allocation" WHERE "percentage_in_de_crease"='50.0%' AND "governorate"='dhi qar governorate' AND "in_de_creased_by">6; |
## Task
Generate a SQL query to answer the following question:
`How many Seats 2005 has a Percentage in/de-crease of 50.0%, and a Governorate of dhi qar governorate, and a In/de-creased by larger than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seat_allocation" (
"governorate" text,
"seats_2010" real,
"seats_2005" real,
"in_de_creased_by" real,
"percentage_in_de_crease" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Seats 2005 has a Percentage in/de-crease of 50.0%, and a Governorate of dhi qar governorate, and a In/de-creased by larger than 6?`:
```sql
|
SELECT MIN("seats_2010") FROM "seat_allocation" WHERE "seats_2005"<9 AND "governorate"='al muthanna governorate' AND "in_de_creased_by">2; |
## Task
Generate a SQL query to answer the following question:
`Name the lowest Seats 2010 which has Seats 2005 smaller than 9, and a Governorate of al muthanna governorate, and an In/de-creased by larger than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seat_allocation" (
"governorate" text,
"seats_2010" real,
"seats_2005" real,
"in_de_creased_by" real,
"percentage_in_de_crease" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the lowest Seats 2010 which has Seats 2005 smaller than 9, and a Governorate of al muthanna governorate, and an In/de-creased by larger than 2?`:
```sql
|
SELECT AVG("in_de_creased_by") FROM "seat_allocation" WHERE "governorate"='al anbar governorate' AND "seats_2005"<9; |
## Task
Generate a SQL query to answer the following question:
`Name the average In/de-creased by which has a Governorate of al anbar governorate, and Seats 2005 smaller than 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seat_allocation" (
"governorate" text,
"seats_2010" real,
"seats_2005" real,
"in_de_creased_by" real,
"percentage_in_de_crease" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average In/de-creased by which has a Governorate of al anbar governorate, and Seats 2005 smaller than 9?`:
```sql
|
SELECT MAX("in_de_creased_by") FROM "seat_allocation" WHERE "percentage_in_de_crease"='100%' AND "seats_2010">8; |
## Task
Generate a SQL query to answer the following question:
`Name the highest In/de-creased which has a Percentage in/de-crease of 100%, and Seats 2010 larger than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seat_allocation" (
"governorate" text,
"seats_2010" real,
"seats_2005" real,
"in_de_creased_by" real,
"percentage_in_de_crease" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the highest In/de-creased which has a Percentage in/de-crease of 100%, and Seats 2010 larger than 8?`:
```sql
|
SELECT "player" FROM "first_round" WHERE "score">67; |
## Task
Generate a SQL query to answer the following question:
`What player has a score larger than 67?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What player has a score larger than 67?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "game">33 AND "score"='111-108'; |
## Task
Generate a SQL query to answer the following question:
`What is the celtics record after game 33 when they score of the game was 111-108?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the celtics record after game 33 when they score of the game was 111-108?`:
```sql
|
SELECT "rider" FROM "supersport_race_classification" WHERE "grid"=7; |
## Task
Generate a SQL query to answer the following question:
`Which Rider is grid 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "supersport_race_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rider is grid 7?`:
```sql
|
SELECT COUNT("laps") FROM "supersport_race_classification" WHERE "rider"='massimo roccoli' AND "grid"<4; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of laps done by Massimo Roccoli when his grid was smaller than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "supersport_race_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of laps done by Massimo Roccoli when his grid was smaller than 4?`:
```sql
|
SELECT "time" FROM "supersport_race_classification" WHERE "bike"='yamaha yzf-r6' AND "grid">1 AND "rider"='david salom'; |
## Task
Generate a SQL query to answer the following question:
`What is the time recorded by David Salom on his Yamaha yzf-r6 when his grid was larger than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "supersport_race_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time recorded by David Salom on his Yamaha yzf-r6 when his grid was larger than 1?`:
```sql
|
SELECT "stop_no" FROM "platforms" WHERE "destination"='[2778] claisebrook station platforms'; |
## Task
Generate a SQL query to answer the following question:
`What is Stop No., when Destination is [2778] Claisebrook Station Platforms?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "platforms" (
"stop_no" text,
"platform" text,
"line" text,
"stopping_pattern" text,
"destination" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Stop No., when Destination is [2778] Claisebrook Station Platforms?`:
```sql
|
SELECT "stopping_pattern" FROM "platforms" WHERE "platform"='4'; |
## Task
Generate a SQL query to answer the following question:
`What is Stopping Pattern, when Platform is 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "platforms" (
"stop_no" text,
"platform" text,
"line" text,
"stopping_pattern" text,
"destination" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Stopping Pattern, when Platform is 4?`:
```sql
|
SELECT "stop_no" FROM "platforms" WHERE "destination"='perth' AND "line"='midland'; |
## Task
Generate a SQL query to answer the following question:
`What is Stop No., when Destination is Perth, and when Line is Midland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "platforms" (
"stop_no" text,
"platform" text,
"line" text,
"stopping_pattern" text,
"destination" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Stop No., when Destination is Perth, and when Line is Midland?`:
```sql
|
SELECT MAX("year") FROM "annual_passenger_statistics_for_turku_ai" WHERE "domestic_passengers">'116,631' AND "total_passengers"='308,782'; |
## Task
Generate a SQL query to answer the following question:
`What year did the Turku Airport have a total of 116,631 domestic passengers and a total of 308,782 passengers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "annual_passenger_statistics_for_turku_ai" (
"year" real,
"domestic_passengers" real,
"international_passengers" real,
"total_passengers" real,
"change" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year did the Turku Airport have a total of 116,631 domestic passengers and a total of 308,782 passengers?`:
```sql
|
SELECT "coach" FROM "south_australia" WHERE "founded">1963 AND "team"='western strikers'; |
## Task
Generate a SQL query to answer the following question:
`Which coach founded the Western Strikers team after 1963?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_australia" (
"team" text,
"coach" text,
"home_ground" text,
"location" text,
"founded" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which coach founded the Western Strikers team after 1963?`:
```sql
|
SELECT "coach" FROM "south_australia" WHERE "location"='oakden'; |
## Task
Generate a SQL query to answer the following question:
`Who is the coach located in Oakden?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_australia" (
"team" text,
"coach" text,
"home_ground" text,
"location" text,
"founded" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the coach located in Oakden?`:
```sql
|
SELECT "team" FROM "south_australia" WHERE "coach"='john kosmina'; |
## Task
Generate a SQL query to answer the following question:
`Which team has coach John Kosmina?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_australia" (
"team" text,
"coach" text,
"home_ground" text,
"location" text,
"founded" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which team has coach John Kosmina?`:
```sql
|
SELECT "coach" FROM "south_australia" WHERE "team"='adelaide galaxy'; |
## Task
Generate a SQL query to answer the following question:
`Who is the coach for the Adelaide Galaxy team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_australia" (
"team" text,
"coach" text,
"home_ground" text,
"location" text,
"founded" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the coach for the Adelaide Galaxy team?`:
```sql
|
SELECT AVG("wins") FROM "grand_prix_motorcycle_racing_results" WHERE "class"='250cc' AND "year"=1972; |
## Task
Generate a SQL query to answer the following question:
`Count the average Wins which has a Class of 250cc, and a Year of 1972?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_motorcycle_racing_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `Count the average Wins which has a Class of 250cc, and a Year of 1972?`:
```sql
|
SELECT MIN("wins") FROM "grand_prix_motorcycle_racing_results" WHERE "points"=28 AND "year"<1972; |
## Task
Generate a SQL query to answer the following question:
`Name the lowest Wins which has Points of 28, and a Year smaller than 1972?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_motorcycle_racing_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the lowest Wins which has Points of 28, and a Year smaller than 1972?`:
```sql
|
SELECT "team" FROM "grand_prix_motorcycle_racing_results" WHERE "points">9 AND "year">1971 AND "class"='250cc'; |
## Task
Generate a SQL query to answer the following question:
`Name the Team which has Points larger than 9, and a Year larger than 1971, and a Class of 250cc?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_motorcycle_racing_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Team which has Points larger than 9, and a Year larger than 1971, and a Class of 250cc?`:
```sql
|
SELECT SUM("wins") FROM "grand_prix_motorcycle_racing_results" WHERE "class"='350cc' AND "year"<1973; |
## Task
Generate a SQL query to answer the following question:
`Name the Wins which has a Class of 350cc, and a Year smaller than 1973?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_motorcycle_racing_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Wins which has a Class of 350cc, and a Year smaller than 1973?`:
```sql
|
SELECT COUNT("points") FROM "grand_prix_motorcycle_racing_results" WHERE "wins">0; |
## Task
Generate a SQL query to answer the following question:
`How many Points has Wins larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_motorcycle_racing_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Points has Wins larger than 0?`:
```sql
|
SELECT "name" FROM "current_roster" WHERE "2013_club"='voléro zürich'; |
## Task
Generate a SQL query to answer the following question:
`SHOW THE Name who has a 2013 club of voléro zürich?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_roster" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2013_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `SHOW THE Name who has a 2013 club of voléro zürich?`:
```sql
|
SELECT "height" FROM "current_roster" WHERE "2013_club"='wvc dynamo moscow'; |
## Task
Generate a SQL query to answer the following question:
`Name the Height which has a 2013 club of wvc dynamo moscow?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_roster" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2013_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Height which has a 2013 club of wvc dynamo moscow?`:
```sql
|
SELECT "spike" FROM "current_roster" WHERE "name"='mia jerkov category:articles with hcards'; |
## Task
Generate a SQL query to answer the following question:
`What kind of Spike has a Name of mia jerkov category:articles with hcards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_roster" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2013_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `What kind of Spike has a Name of mia jerkov category:articles with hcards?`:
```sql
|
SELECT "2013_club" FROM "current_roster" WHERE "name"='ana grbac category:articles with hcards'; |
## Task
Generate a SQL query to answer the following question:
`Name the 2013 club which has a Name of ana grbac category:articles with hcards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_roster" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2013_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 2013 club which has a Name of ana grbac category:articles with hcards?`:
```sql
|
SELECT "spike" FROM "current_roster" WHERE "name"='senna ušić-jogunica category:articles with hcards'; |
## Task
Generate a SQL query to answer the following question:
`Name the Spike which has a Name of senna ušić-jogunica category:articles with hcards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_roster" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2013_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Spike which has a Name of senna ušić-jogunica category:articles with hcards?`:
```sql
|
SELECT SUM("overall") FROM "washington_redskins_draft_history" WHERE "round">7 AND "position"='c'; |
## Task
Generate a SQL query to answer the following question:
`What was the Overall number for the player with a position of C and a round greater than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "washington_redskins_draft_history" (
"round" real,
"pick" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Overall number for the player with a position of C and a round greater than 7?`:
```sql
|
SELECT MIN("overall") FROM "washington_redskins_draft_history" WHERE "pick">9; |
## Task
Generate a SQL query to answer the following question:
`What was the Overall number that is the lowest, and has a pick greater than 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "washington_redskins_draft_history" (
"round" real,
"pick" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Overall number that is the lowest, and has a pick greater than 9?`:
```sql
|
SELECT MIN("races") FROM "career_summary" WHERE "podiums"<2 AND "f_laps">0 AND "season">2008; |
## Task
Generate a SQL query to answer the following question:
`Which team after 2008, with less than 2 podium finished and more than 0 FLAPS, had the lowest numberof races?`
### 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,
"poles" real,
"f_laps" real,
"podiums" real,
"points" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team after 2008, with less than 2 podium finished and more than 0 FLAPS, had the lowest numberof races?`:
```sql
|
SELECT "points" FROM "complete_formula_one_world_championship_" WHERE "entrant"='brabham racing organisation' AND "year"=1964 AND "chassis"='brabham bt7'; |
## Task
Generate a SQL query to answer the following question:
`what is the points when the entrant is brabham racing organisation, the year is 1964 and the chassis is brabham bt7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the points when the entrant is brabham racing organisation, the year is 1964 and the chassis is brabham bt7?`:
```sql
|
SELECT "entrant" FROM "complete_formula_one_world_championship_" WHERE "points"='42 (45)' AND "chassis"='brabham bt20'; |
## Task
Generate a SQL query to answer the following question:
`who is the entrant when the points is 42 (45) and the chassis is brabham bt20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the entrant when the points is 42 (45) and the chassis is brabham bt20?`:
```sql
|
SELECT COUNT("year") FROM "complete_formula_one_world_championship_" WHERE "chassis"='brabham bt33'; |
## Task
Generate a SQL query to answer the following question:
`how many times is the chassis brabham bt33?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `how many times is the chassis brabham bt33?`:
```sql
|
SELECT "stage_winner" FROM "tour_de_france_stages_with_summit_finish" WHERE "year"=2013; |
## Task
Generate a SQL query to answer the following question:
`Who was the winner in 2013?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tour_de_france_stages_with_summit_finish" (
"year" real,
"stage" real,
"start_of_stage" text,
"distance_km" text,
"category" text,
"stage_winner" text,
"yellow_jersey" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the winner in 2013?`:
```sql
|
SELECT "opponents" FROM "matches" WHERE "venue"='ullevi'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent at Ullevi?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "matches" (
"date" text,
"venue" text,
"opponents" text,
"score" text,
"comp" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent at Ullevi?`:
```sql
|
SELECT "date" FROM "matches" WHERE "opponents"='göteborg' AND "score"='3-1'; |
## Task
Generate a SQL query to answer the following question:
`When was Göteborg the opponent with a score of 3-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "matches" (
"date" text,
"venue" text,
"opponents" text,
"score" text,
"comp" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was Göteborg the opponent with a score of 3-1?`:
```sql
|
SELECT "finish" FROM "made_the_cut" WHERE "to_par"='+10'; |
## Task
Generate a SQL query to answer the following question:
`Which Finish had a To par of +10?`
### 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 Finish had a To par of +10?`:
```sql
|
SELECT "year_s_won" FROM "made_the_cut" WHERE "to_par"='+1'; |
## Task
Generate a SQL query to answer the following question:
`Which years was there a To par of +1?`
### 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 years was there a To par of +1?`:
```sql
|
SELECT MIN("points") FROM "race" WHERE "driver"='sébastien bourdais' AND "laps"<63; |
## Task
Generate a SQL query to answer the following question:
`What were Sébastien Bourdais' lowest points when there were less than 63 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What were Sébastien Bourdais' lowest points when there were less than 63 laps?`:
```sql
|
SELECT "position" FROM "achievements" WHERE "event"='60 m' AND "venue"='budapest , hungary'; |
## Task
Generate a SQL query to answer the following question:
`What is Position, when Event is 60 m, and when Venue is Budapest , Hungary?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Position, when Event is 60 m, and when Venue is Budapest , Hungary?`:
```sql
|
SELECT "event" FROM "achievements" WHERE "position"='6th' AND "year">2006; |
## Task
Generate a SQL query to answer the following question:
`What is Event, when Position is 6th, and when Year is after 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Event, when Position is 6th, and when Year is after 2006?`:
```sql
|
SELECT AVG("year") FROM "achievements" WHERE "position"='9th' AND "event"='100 m' AND "venue"='munich, germany'; |
## Task
Generate a SQL query to answer the following question:
`What is the average Year, when Position is 9th, when Event is 100 m, and when Venue is Munich, Germany?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Year, when Position is 9th, when Event is 100 m, and when Venue is Munich, Germany?`:
```sql
|
SELECT "event" FROM "achievements" WHERE "year"=2002 AND "competition"='european indoor championships'; |
## Task
Generate a SQL query to answer the following question:
`What is the Event, when Year is 2002, and when Competition is European Indoor Championships?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Event, when Year is 2002, and when Competition is European Indoor Championships?`:
```sql
|
SELECT "nation" FROM "medal_table" WHERE "bronze"=1 AND "gold">0 AND "rank"='2'; |
## Task
Generate a SQL query to answer the following question:
`What is Nation, when Bronze is 1, when Gold is greater than 0, and when Rank is 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Nation, when Bronze is 1, when Gold is greater than 0, and when Rank is 2?`:
```sql
|
SELECT AVG("total") FROM "medal_table" WHERE "bronze">0 AND "silver">0 AND "gold">2 AND "nation"='soviet union'; |
## Task
Generate a SQL query to answer the following question:
`What is the average Total, when Bronze is greater than 0, when Silver is greater than 0, when Gold is greater than 2, and when Nation is Soviet Union?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Total, when Bronze is greater than 0, when Silver is greater than 0, when Gold is greater than 2, and when Nation is Soviet Union?`:
```sql
|
SELECT AVG("gold") FROM "medal_table" WHERE "nation"='yugoslavia' AND "silver">0; |
## Task
Generate a SQL query to answer the following question:
`What is the average Gold, when Nation is Yugoslavia, and when Silver is greater than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Gold, when Nation is Yugoslavia, and when Silver is greater than 0?`:
```sql
|
SELECT AVG("bronze") FROM "medal_table" WHERE "total"=4 AND "silver"<2; |
## Task
Generate a SQL query to answer the following question:
`What is the average Bronze, when Total is 4, and when Silver is less than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Bronze, when Total is 4, and when Silver is less than 2?`:
```sql
|
SELECT "agg" FROM "first_qualifying_round" WHERE "team_2"='irtysh'; |
## Task
Generate a SQL query to answer the following question:
`What is the aggregate for the tie with a team 2 of Irtysh?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_qualifying_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the aggregate for the tie with a team 2 of Irtysh?`:
```sql
|
SELECT "agg" FROM "first_qualifying_round" WHERE "team_1"='dinamo minsk'; |
## Task
Generate a SQL query to answer the following question:
`What was the aggregate in the match with a team 1 of Dinamo Minsk?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_qualifying_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the aggregate in the match with a team 1 of Dinamo Minsk?`:
```sql
|
SELECT "java_ee_compatibility" FROM "java" WHERE "edition"='5.2.4'; |
## Task
Generate a SQL query to answer the following question:
`What is the Java EE compatibility of the 5.2.4 edition?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "java" (
"product" text,
"vendor" text,
"edition" text,
"release_date" text,
"java_ee_compatibility" text,
"license" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Java EE compatibility of the 5.2.4 edition?`:
```sql
|
SELECT "release_date" FROM "java" WHERE "vendor"='eclipse foundation'; |
## Task
Generate a SQL query to answer the following question:
`What is the release date for Eclipse Foundation?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "java" (
"product" text,
"vendor" text,
"edition" text,
"release_date" text,
"java_ee_compatibility" text,
"license" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the release date for Eclipse Foundation?`:
```sql
|
SELECT "product" FROM "java" WHERE "java_ee_compatibility"='1.4' AND "vendor"='oracle corporation'; |
## Task
Generate a SQL query to answer the following question:
`Which Oracle Corporation product has a Java EE compatibility of 1.4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "java" (
"product" text,
"vendor" text,
"edition" text,
"release_date" text,
"java_ee_compatibility" text,
"license" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Oracle Corporation product has a Java EE compatibility of 1.4?`:
```sql
|
SELECT "edition" FROM "java" WHERE "java_ee_compatibility"='5' AND "release_date"='2007-06-07'; |
## Task
Generate a SQL query to answer the following question:
`Which edition released on 2007-06-07 has a Java EE compatibility of 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "java" (
"product" text,
"vendor" text,
"edition" text,
"release_date" text,
"java_ee_compatibility" text,
"license" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which edition released on 2007-06-07 has a Java EE compatibility of 5?`:
```sql
|
SELECT "release_date" FROM "java" WHERE "product"='glassfish'; |
## Task
Generate a SQL query to answer the following question:
`When was Glassfish released?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "java" (
"product" text,
"vendor" text,
"edition" text,
"release_date" text,
"java_ee_compatibility" text,
"license" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was Glassfish released?`:
```sql
|
SELECT "license" FROM "java" WHERE "release_date"='2009-08'; |
## Task
Generate a SQL query to answer the following question:
`Which licence has a release date of 2009-08?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "java" (
"product" text,
"vendor" text,
"edition" text,
"release_date" text,
"java_ee_compatibility" text,
"license" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which licence has a release date of 2009-08?`:
```sql
|
SELECT "semifinalists" FROM "singles" WHERE "tournament"='paris'; |
## Task
Generate a SQL query to answer the following question:
`WHO ARE THE SEMIFINALISTS FOR TOURNAMENT OF PARIS?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"tournament" text,
"surface" text,
"week" text,
"winner" text,
"finalist" text,
"semifinalists" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHO ARE THE SEMIFINALISTS FOR TOURNAMENT OF PARIS?`:
```sql
|
SELECT "semifinalists" FROM "singles" WHERE "tournament"='hamburg'; |
## Task
Generate a SQL query to answer the following question:
`WHO WAS THE SEMIFINALISTS FOR THE HAMBURG TOURNAMENT?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"tournament" text,
"surface" text,
"week" text,
"winner" text,
"finalist" text,
"semifinalists" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHO WAS THE SEMIFINALISTS FOR THE HAMBURG TOURNAMENT?`:
```sql
|
SELECT "opponent" FROM "scottish_cup" WHERE "round"='sf'; |
## Task
Generate a SQL query to answer the following question:
`Which opponent had a round of SF?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scottish_cup" (
"date" text,
"round" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which opponent had a round of SF?`:
```sql
|
SELECT "result" FROM "scottish_cup" WHERE "opponent"='celtic'; |
## Task
Generate a SQL query to answer the following question:
`What was the result when the opponent was Celtic?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scottish_cup" (
"date" text,
"round" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result when the opponent was Celtic?`:
```sql
|
SELECT "result" FROM "scottish_cup" WHERE "round"='r3'; |
## Task
Generate a SQL query to answer the following question:
`What was the result for round r3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scottish_cup" (
"date" text,
"round" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result for round r3?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.