output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "time" FROM "men" WHERE "event"='800m freestyle'; |
## Task
Generate a SQL query to answer the following question:
`What was the record setting time in the 800m freestyle?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "men" (
"event" text,
"time" text,
"nationality" text,
"date" text,
"meet" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the record setting time in the 800m freestyle?`:
```sql
|
SELECT MIN("rank") FROM "historical_premiers" WHERE "total_time_in_office"='7 years, 335 days' AND "assumed_office"='17 may 1919'; |
## Task
Generate a SQL query to answer the following question:
`What is the least rank for the premier that assumed office on 17 may 1919 and was in office for 7 years, 335 days?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "historical_premiers" (
"rank" real,
"state" text,
"premier" text,
"party" text,
"assumed_office" text,
"left_office" text,
"total_time_in_office" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least rank for the premier that assumed office on 17 may 1919 and was in office for 7 years, 335 days?`:
```sql
|
SELECT "assumed_office" FROM "historical_premiers" WHERE "premier"='sir charles cowper (1807-1875) kcmg' AND "left_office"='2 october 1856'; |
## Task
Generate a SQL query to answer the following question:
`Premier Sir Charles Cowper (1807-1875) KCMG left office 2 October 1856, when did he assume office?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "historical_premiers" (
"rank" real,
"state" text,
"premier" text,
"party" text,
"assumed_office" text,
"left_office" text,
"total_time_in_office" text
);
### SQL
Given the database schema, here is the SQL query that answers `Premier Sir Charles Cowper (1807-1875) KCMG left office 2 October 1856, when did he assume office?`:
```sql
|
SELECT AVG("rank") FROM "historical_premiers" WHERE "state"='nsw' AND "party"='liberalism' AND "assumed_office"='22 march 1877'; |
## Task
Generate a SQL query to answer the following question:
`What average rank of the premier has NSW as the state, Liberalism as the party, and 22 March 1877 was the assumed office?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "historical_premiers" (
"rank" real,
"state" text,
"premier" text,
"party" text,
"assumed_office" text,
"left_office" text,
"total_time_in_office" text
);
### SQL
Given the database schema, here is the SQL query that answers `What average rank of the premier has NSW as the state, Liberalism as the party, and 22 March 1877 was the assumed office?`:
```sql
|
SELECT "power" FROM "s_rebroadcaster_of_cbon_fm" WHERE "class"='a' AND "frequency"='93.7'; |
## Task
Generate a SQL query to answer the following question:
`What power has A as the class, and 93.7 as the frequency?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cbon_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `What power has A as the class, and 93.7 as the frequency?`:
```sql
|
SELECT "city_of_license" FROM "s_rebroadcaster_of_cbon_fm" WHERE "identifier"='cbon-fm-11'; |
## Task
Generate a SQL query to answer the following question:
`What city of license has cbon-fm-11 as the identifier?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cbon_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `What city of license has cbon-fm-11 as the identifier?`:
```sql
|
SELECT "power" FROM "s_rebroadcaster_of_cbon_fm" WHERE "city_of_license"='thunder bay'; |
## Task
Generate a SQL query to answer the following question:
`What power has thunder bay as the city of license?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cbon_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `What power has thunder bay as the city of license?`:
```sql
|
SELECT "identifier" FROM "s_rebroadcaster_of_cbon_fm" WHERE "power"='100000 watts'; |
## Task
Generate a SQL query to answer the following question:
`What identifier has 100000 watts as the power?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cbon_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `What identifier has 100000 watts as the power?`:
```sql
|
SELECT "identifier" FROM "s_rebroadcaster_of_cbon_fm" WHERE "frequency"='90.3'; |
## Task
Generate a SQL query to answer the following question:
`What identifier has 90.3 as the frequency?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cbon_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `What identifier has 90.3 as the frequency?`:
```sql
|
SELECT "class" FROM "s_rebroadcaster_of_cbon_fm" WHERE "identifier"='cbon-fm-23'; |
## Task
Generate a SQL query to answer the following question:
`What class has cbon-fm-23 as the identifier?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cbon_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `What class has cbon-fm-23 as the identifier?`:
```sql
|
SELECT COUNT("total") FROM "medals_table" WHERE "bronze">1 AND "nation"='west germany' AND "gold">2; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of medals for West Germany with more than 1 bronze medal and more than 2 gold medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of medals for West Germany with more than 1 bronze medal and more than 2 gold medals?`:
```sql
|
SELECT "rank" FROM "medals_table" WHERE "nation"='denmark'; |
## Task
Generate a SQL query to answer the following question:
`What is Denmark's rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Denmark's rank?`:
```sql
|
SELECT "country" FROM "semifinal_a_b_2" WHERE "notes"='fa' AND "athlete"='ekaterina karsten'; |
## Task
Generate a SQL query to answer the following question:
`What country did ekaterina karsten row for with fa listed under notes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_a_b_2" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country did ekaterina karsten row for with fa listed under notes?`:
```sql
|
SELECT "time" FROM "semifinal_a_b_2" WHERE "country"='france'; |
## Task
Generate a SQL query to answer the following question:
`What time was the race for the country of france?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_a_b_2" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What time was the race for the country of france?`:
```sql
|
SELECT "time" FROM "semifinal_a_b_2" WHERE "notes"='fb' AND "country"='france'; |
## Task
Generate a SQL query to answer the following question:
`What time was the race for the country of france with fb listed under notes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_a_b_2" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What time was the race for the country of france with fb listed under notes?`:
```sql
|
SELECT SUM("rank") FROM "semifinal_a_b_2" WHERE "country"='bulgaria'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the ranks for bulgaria?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_a_b_2" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the ranks for bulgaria?`:
```sql
|
SELECT "rank" FROM "semifinal_a_b_2" WHERE "notes"='fb' AND "country"='new zealand'; |
## Task
Generate a SQL query to answer the following question:
`What is the rank of the new zealand team that had fb listed under notes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_a_b_2" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank of the new zealand team that had fb listed under notes?`:
```sql
|
SELECT "position" FROM "tenth_round" WHERE "pick"=74; |
## Task
Generate a SQL query to answer the following question:
`Which Position has a Pick of 74?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tenth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Position has a Pick of 74?`:
```sql
|
SELECT "team" FROM "tenth_round" WHERE "position"='linebacker'; |
## Task
Generate a SQL query to answer the following question:
`Which Team has a Position of linebacker?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tenth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Team has a Position of linebacker?`:
```sql
|
SELECT "team" FROM "tenth_round" WHERE "college"='stanford'; |
## Task
Generate a SQL query to answer the following question:
`What is the Team for Stanford College?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tenth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Team for Stanford College?`:
```sql
|
SELECT "pick" FROM "tenth_round" WHERE "college"='southeastern louisiana'; |
## Task
Generate a SQL query to answer the following question:
`What Pick does the College Southeastern Louisiana have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tenth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Pick does the College Southeastern Louisiana have?`:
```sql
|
SELECT "gold" FROM "paracanoe" WHERE "total">2 AND "bronze"<1; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Gold that has the Total larger than 2, and the Bronze smaller than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "paracanoe" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Gold that has the Total larger than 2, and the Bronze smaller than 1?`:
```sql
|
SELECT "nation" FROM "paracanoe" WHERE "bronze"=1 AND "gold"=0; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Nation that has the Bronze of 1, and the Gold of 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "paracanoe" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Nation that has the Bronze of 1, and the Gold of 0?`:
```sql
|
SELECT AVG("total") FROM "paracanoe" WHERE "silver">1 AND "bronze"<8; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the average Total that has the Silver larger than 1, and the Bronze smaller than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "paracanoe" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the average Total that has the Silver larger than 1, and the Bronze smaller than 8?`:
```sql
|
SELECT MAX("bronze") FROM "medal_table" WHERE "total"=4 AND "silver"=1 AND "gold"<2; |
## Task
Generate a SQL query to answer the following question:
`What was the highest number of bronze medals when there were a total of 4 medals, 1 silver medals, and less than 2 medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the highest number of bronze medals when there were a total of 4 medals, 1 silver medals, and less than 2 medals?`:
```sql
|
SELECT SUM("pommel_horse") FROM "top_8_teams_qualified_for_team_finals" WHERE "rings"<59.85 AND "team_total">361.2; |
## Task
Generate a SQL query to answer the following question:
`Count the Pommel Horse that has Rings smaller than 59.85 and a Team Total larger than 361.2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_8_teams_qualified_for_team_finals" (
"position" text,
"country" text,
"floor" real,
"pommel_horse" real,
"rings" real,
"vault" real,
"parallel_bars" real,
"horizontal_bar" real,
"team_total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Count the Pommel Horse that has Rings smaller than 59.85 and a Team Total larger than 361.2?`:
```sql
|
SELECT MAX("parallel_bars") FROM "top_8_teams_qualified_for_team_finals" WHERE "country"='united states' AND "vault"<63.85; |
## Task
Generate a SQL query to answer the following question:
`Name the highest Parallel Bars of the united states with a Vault smaller than 63.85?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_8_teams_qualified_for_team_finals" (
"position" text,
"country" text,
"floor" real,
"pommel_horse" real,
"rings" real,
"vault" real,
"parallel_bars" real,
"horizontal_bar" real,
"team_total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the highest Parallel Bars of the united states with a Vault smaller than 63.85?`:
```sql
|
SELECT MAX("horizontal_bar") FROM "top_8_teams_qualified_for_team_finals" WHERE "country"='france' AND "rings"<58.975; |
## Task
Generate a SQL query to answer the following question:
`Name the highest Horizontal Bar which is in france and Rings smaller than 58.975?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_8_teams_qualified_for_team_finals" (
"position" text,
"country" text,
"floor" real,
"pommel_horse" real,
"rings" real,
"vault" real,
"parallel_bars" real,
"horizontal_bar" real,
"team_total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the highest Horizontal Bar which is in france and Rings smaller than 58.975?`:
```sql
|
SELECT "artist" FROM "final_february_21_2009" WHERE "televote_sms"='3.20%'; |
## Task
Generate a SQL query to answer the following question:
`who is the artist when the televote/sms is 3.20%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_february_21_2009" (
"draw" real,
"artist" text,
"song" text,
"televote_sms" text,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `who is the artist when the televote/sms is 3.20%?`:
```sql
|
SELECT SUM("place") FROM "final_february_21_2009" WHERE "televote_sms"='2.39%'; |
## Task
Generate a SQL query to answer the following question:
`what is the place when the televote/sms is 2.39%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_february_21_2009" (
"draw" real,
"artist" text,
"song" text,
"televote_sms" text,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the place when the televote/sms is 2.39%?`:
```sql
|
SELECT COUNT("draw") FROM "final_february_21_2009" WHERE "televote_sms"='2.39%' AND "place">9; |
## Task
Generate a SQL query to answer the following question:
`how many times was the televote/sms 2.39% and the place more than 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_february_21_2009" (
"draw" real,
"artist" text,
"song" text,
"televote_sms" text,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `how many times was the televote/sms 2.39% and the place more than 9?`:
```sql
|
SELECT "release_date" FROM "1933" WHERE "production_num">5888 AND "director"='hugh harman and friz freleng'; |
## Task
Generate a SQL query to answer the following question:
`Which Release date has a Production Num larger than 5888, and a Director of hugh harman and friz freleng?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1933" (
"title" text,
"series" text,
"director" text,
"production_num" real,
"release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Release date has a Production Num larger than 5888, and a Director of hugh harman and friz freleng?`:
```sql
|
SELECT SUM("production_num") FROM "1933" WHERE "title"='bosko in dutch'; |
## Task
Generate a SQL query to answer the following question:
`How many production numbers have a Title of bosko in dutch?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1933" (
"title" text,
"series" text,
"director" text,
"production_num" real,
"release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many production numbers have a Title of bosko in dutch?`:
```sql
|
SELECT "release_date" FROM "1933" WHERE "director"='tom palmer' AND "production_num">5956; |
## Task
Generate a SQL query to answer the following question:
`Which Release date has a Director of tom palmer, and a Production Num larger than 5956?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1933" (
"title" text,
"series" text,
"director" text,
"production_num" real,
"release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Release date has a Director of tom palmer, and a Production Num larger than 5956?`:
```sql
|
SELECT COUNT("goals") FROM "1960s" WHERE "years_at_club"='1961–1966' AND "debut_year">1961; |
## Task
Generate a SQL query to answer the following question:
`How many Goals have Years at club of 1961–1966, and a Debut year larger than 1961?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1960s" (
"debut_year" real,
"player" text,
"games" real,
"goals" real,
"years_at_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Goals have Years at club of 1961–1966, and a Debut year larger than 1961?`:
```sql
|
SELECT AVG("debut_year") FROM "1960s" WHERE "goals"=0 AND "years_at_club"='1963' AND "games">5; |
## Task
Generate a SQL query to answer the following question:
`Which Debut year has Goals of 0, and Years at club of 1963, and Games larger than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1960s" (
"debut_year" real,
"player" text,
"games" real,
"goals" real,
"years_at_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Debut year has Goals of 0, and Years at club of 1963, and Games larger than 5?`:
```sql
|
SELECT AVG("debut_year") FROM "1960s" WHERE "player"='bob hayton' AND "games"<2; |
## Task
Generate a SQL query to answer the following question:
`Which Debut year has a Player of bob hayton, and Games smaller than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1960s" (
"debut_year" real,
"player" text,
"games" real,
"goals" real,
"years_at_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Debut year has a Player of bob hayton, and Games smaller than 2?`:
```sql
|
SELECT "name" FROM "medallists" WHERE "sport"='table tennis' AND "event"='women''s individual class 3'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the player who competed in the Women's Individual Class 3 in Table Tennis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medallists" (
"medal" text,
"name" text,
"sport" text,
"event" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the player who competed in the Women's Individual Class 3 in Table Tennis?`:
```sql
|
SELECT "date" FROM "medallists" WHERE "event"='women''s individual class 3'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the Women's Individual Class 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medallists" (
"medal" text,
"name" text,
"sport" text,
"event" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the Women's Individual Class 3?`:
```sql
|
SELECT "event" FROM "medallists" WHERE "name"='rastislav turecek'; |
## Task
Generate a SQL query to answer the following question:
`What event did Rastislav Turecek participate in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medallists" (
"medal" text,
"name" text,
"sport" text,
"event" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What event did Rastislav Turecek participate in?`:
```sql
|
SELECT "sport" FROM "medallists" WHERE "name"='miroslav jambor richard csejtey'; |
## Task
Generate a SQL query to answer the following question:
`What sport did Miroslav Jambor Richard Csejtey participate in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medallists" (
"medal" text,
"name" text,
"sport" text,
"event" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What sport did Miroslav Jambor Richard Csejtey participate in?`:
```sql
|
SELECT "artist" FROM "results" WHERE "draw"=6; |
## Task
Generate a SQL query to answer the following question:
`Which Artist has a Draw of 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"draw" real,
"language" text,
"artist" text,
"song" text,
"english_translation" text,
"place" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Artist has a Draw of 6?`:
```sql
|
SELECT "song" FROM "results" WHERE "draw"<7 AND "points">41 AND "language"='german'; |
## Task
Generate a SQL query to answer the following question:
`Which Song has a Draw smaller than 7, and Points larger than 41, and a Language of german?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"draw" real,
"language" text,
"artist" text,
"song" text,
"english_translation" text,
"place" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Song has a Draw smaller than 7, and Points larger than 41, and a Language of german?`:
```sql
|
SELECT "result" FROM "bmi_awards" WHERE "year">2001; |
## Task
Generate a SQL query to answer the following question:
`What was the result for the years after 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bmi_awards" (
"year" real,
"category" text,
"nominee_s" text,
"episode" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result for the years after 2001?`:
```sql
|
SELECT "nominee_s" FROM "bmi_awards" WHERE "year"=2005; |
## Task
Generate a SQL query to answer the following question:
`Who was the nominee for 2005?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bmi_awards" (
"year" real,
"category" text,
"nominee_s" text,
"episode" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the nominee for 2005?`:
```sql
|
SELECT "gp_gs" FROM "receiving" WHERE "receptions">4 AND "long"=55 AND "avg_g"=151; |
## Task
Generate a SQL query to answer the following question:
`what is the gp-gs when the receptions is more than 4, long is 55 and avg/g is 151?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "receiving" (
"name" text,
"gp_gs" text,
"receptions" real,
"long" real,
"avg_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the gp-gs when the receptions is more than 4, long is 55 and avg/g is 151?`:
```sql
|
SELECT "name" FROM "receiving" WHERE "avg_g"=13.7; |
## Task
Generate a SQL query to answer the following question:
`what is the name when avg/g is 13.7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "receiving" (
"name" text,
"gp_gs" text,
"receptions" real,
"long" real,
"avg_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the name when avg/g is 13.7?`:
```sql
|
SELECT COUNT("receptions") FROM "receiving" WHERE "avg_g"=2; |
## Task
Generate a SQL query to answer the following question:
`How many times is avg/g 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "receiving" (
"name" text,
"gp_gs" text,
"receptions" real,
"long" real,
"avg_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many times is avg/g 2?`:
```sql
|
SELECT SUM("avg_g") FROM "receiving" WHERE "name"='john conner' AND "long"<25; |
## Task
Generate a SQL query to answer the following question:
`what is the avg/g for john conner when long is less than 25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "receiving" (
"name" text,
"gp_gs" text,
"receptions" real,
"long" real,
"avg_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the avg/g for john conner when long is less than 25?`:
```sql
|
SELECT "conf" FROM "notable_undrafted_players" WHERE "original_nfl_team"='denver broncos'; |
## Task
Generate a SQL query to answer the following question:
`What conference did the player originally from the denver broncos play in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notable_undrafted_players" (
"original_nfl_team" text,
"player" text,
"pos" text,
"college" text,
"conf" text
);
### SQL
Given the database schema, here is the SQL query that answers `What conference did the player originally from the denver broncos play in?`:
```sql
|
SELECT "player" FROM "notable_undrafted_players" WHERE "college"='texas southern'; |
## Task
Generate a SQL query to answer the following question:
`Who was the player from texas southern?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notable_undrafted_players" (
"original_nfl_team" text,
"player" text,
"pos" text,
"college" text,
"conf" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the player from texas southern?`:
```sql
|
SELECT "conf" FROM "notable_undrafted_players" WHERE "pos"='rb'; |
## Task
Generate a SQL query to answer the following question:
`What conference did the player with the position of rb play in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notable_undrafted_players" (
"original_nfl_team" text,
"player" text,
"pos" text,
"college" text,
"conf" text
);
### SQL
Given the database schema, here is the SQL query that answers `What conference did the player with the position of rb play in?`:
```sql
|
SELECT "original_nfl_team" FROM "notable_undrafted_players" WHERE "conf"='midwestern'; |
## Task
Generate a SQL query to answer the following question:
`What was the original nfl team that the player was in from the midwestern conference?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notable_undrafted_players" (
"original_nfl_team" text,
"player" text,
"pos" text,
"college" text,
"conf" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the original nfl team that the player was in from the midwestern conference?`:
```sql
|
SELECT "pos" FROM "notable_undrafted_players" WHERE "college"='tennessee state'; |
## Task
Generate a SQL query to answer the following question:
`What position did athlete play from Tennessee state?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notable_undrafted_players" (
"original_nfl_team" text,
"player" text,
"pos" text,
"college" text,
"conf" text
);
### SQL
Given the database schema, here is the SQL query that answers `What position did athlete play from Tennessee state?`:
```sql
|
SELECT "affected_area_codes" FROM "see_also" WHERE "effective_date"='august 30, 2014'; |
## Task
Generate a SQL query to answer the following question:
`Which Affected area codes have an Effective date of august 30, 2014?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"new_area_code" real,
"where" text,
"affected_area_codes" text,
"format" text,
"effective_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Affected area codes have an Effective date of august 30, 2014?`:
```sql
|
SELECT "effective_date" FROM "see_also" WHERE "where"='illinois' AND "affected_area_codes"='217'; |
## Task
Generate a SQL query to answer the following question:
`Which Effective date has a Where of illinois, and Affected area codes of 217?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"new_area_code" real,
"where" text,
"affected_area_codes" text,
"format" text,
"effective_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Effective date has a Where of illinois, and Affected area codes of 217?`:
```sql
|
SELECT "new_area_code" FROM "see_also" WHERE "where"='nevada'; |
## Task
Generate a SQL query to answer the following question:
`Which New area code is in nevada?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"new_area_code" real,
"where" text,
"affected_area_codes" text,
"format" text,
"effective_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which New area code is in nevada?`:
```sql
|
SELECT "airing_date" FROM "first_line_series" WHERE "number_of_episodes">20 AND "genre"='modern drama'; |
## Task
Generate a SQL query to answer the following question:
`Which Airing date has a Number of episodes larger than 20, and a Genre of modern drama?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_line_series" (
"airing_date" text,
"english_title_chinese_title" text,
"number_of_episodes" real,
"theme_song_t_sub_theme_song_st" text,
"genre" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Airing date has a Number of episodes larger than 20, and a Genre of modern drama?`:
```sql
|
SELECT "genre" FROM "first_line_series" WHERE "english_title_chinese_title"='the romance of the white hair maiden 白髮魔女傳'; |
## Task
Generate a SQL query to answer the following question:
`Which Genre has an English title (Chinese title) of the romance of the white hair maiden 白髮魔女傳?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_line_series" (
"airing_date" text,
"english_title_chinese_title" text,
"number_of_episodes" real,
"theme_song_t_sub_theme_song_st" text,
"genre" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Genre has an English title (Chinese title) of the romance of the white hair maiden 白髮魔女傳?`:
```sql
|
SELECT "grand_finalist" FROM "past_champions_and_grand_finalists" WHERE "grand_finalists"='jonathan loh, peterson poon, nathan santos'; |
## Task
Generate a SQL query to answer the following question:
`who is the grand finalist when the grand finalists are jonathan loh, peterson poon, nathan santos?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_champions_and_grand_finalists" (
"year" real,
"champion" text,
"grand_finalist" text,
"champion_team_members" text,
"grand_finalists" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the grand finalist when the grand finalists are jonathan loh, peterson poon, nathan santos?`:
```sql
|
SELECT MIN("year") FROM "past_champions_and_grand_finalists" WHERE "champion_team_members"='charisse borromeo, jennifer ong, larissa co'; |
## Task
Generate a SQL query to answer the following question:
`what is the earliest year when the champion team members are charisse borromeo, jennifer ong, larissa co?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_champions_and_grand_finalists" (
"year" real,
"champion" text,
"grand_finalist" text,
"champion_team_members" text,
"grand_finalists" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the earliest year when the champion team members are charisse borromeo, jennifer ong, larissa co?`:
```sql
|
SELECT "year" FROM "past_champions_and_grand_finalists" WHERE "champion_team_members"='mikee de vega, jari monteagudo, crissy aquino'; |
## Task
Generate a SQL query to answer the following question:
`what is the year when the champion team members are mikee de vega, jari monteagudo, crissy aquino?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_champions_and_grand_finalists" (
"year" real,
"champion" text,
"grand_finalist" text,
"champion_team_members" text,
"grand_finalists" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the year when the champion team members are mikee de vega, jari monteagudo, crissy aquino?`:
```sql
|
SELECT "grand_finalists" FROM "past_champions_and_grand_finalists" WHERE "champion_team_members"='miko biscocho, claude gomez, mikee victoriano'; |
## Task
Generate a SQL query to answer the following question:
`who are the grand finalists when the champion team members are miko biscocho, claude gomez, mikee victoriano?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_champions_and_grand_finalists" (
"year" real,
"champion" text,
"grand_finalist" text,
"champion_team_members" text,
"grand_finalists" text
);
### SQL
Given the database schema, here is the SQL query that answers `who are the grand finalists when the champion team members are miko biscocho, claude gomez, mikee victoriano?`:
```sql
|
SELECT MAX("total") FROM "medal_table" WHERE "gold"=20 AND "rank"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the highest total number of medals for a team ranked smaller than 1 and had 20 gold medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest total number of medals for a team ranked smaller than 1 and had 20 gold medals?`:
```sql
|
SELECT "nation" FROM "medal_table" WHERE "gold">1 AND "total"=62; |
## Task
Generate a SQL query to answer the following question:
`What is the nation that had more than 1 gold medal and a total of 62 medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the nation that had more than 1 gold medal and a total of 62 medals?`:
```sql
|
SELECT MAX("total") FROM "medal_table" WHERE "silver"=1 AND "gold"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the highest total medals when there were 0 gold medals and 1 silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest total medals when there were 0 gold medals and 1 silver?`:
```sql
|
SELECT "123kg" FROM "records" WHERE "world_record"='total'; |
## Task
Generate a SQL query to answer the following question:
`What's the 123kg of the Total world record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"oksana_slivenko_rus" text,
"123kg" text,
"santo_domingo_dominican" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the 123kg of the Total world record?`:
```sql
|
SELECT "world_record" FROM "records" WHERE "123kg"='275kg'; |
## Task
Generate a SQL query to answer the following question:
`What's the world record when the 123kg was 275kg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"oksana_slivenko_rus" text,
"123kg" text,
"santo_domingo_dominican" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the world record when the 123kg was 275kg?`:
```sql
|
SELECT "name" FROM "assembly_segments" WHERE "constituency_number"='214'; |
## Task
Generate a SQL query to answer the following question:
`What is the name for the assembly segment with a constituency number of 214?`
### 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 name for the assembly segment with a constituency number of 214?`:
```sql
|
SELECT "district" FROM "assembly_segments" WHERE "name"='mahidpur'; |
## Task
Generate a SQL query to answer the following question:
`What district has an assembly segment named mahidpur?`
### 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 district has an assembly segment named mahidpur?`:
```sql
|
SELECT "team" FROM "results" WHERE "wrestler"='doug basham'; |
## Task
Generate a SQL query to answer the following question:
`Who is Doug Basham's team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"elimination" text,
"wrestler" text,
"team" text,
"eliminated_by" text,
"elimination_move" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is Doug Basham's team?`:
```sql
|
SELECT "elimination" FROM "results" WHERE "wrestler"='jorge santana'; |
## Task
Generate a SQL query to answer the following question:
`What's Jorge Santana's elimination?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"elimination" text,
"wrestler" text,
"team" text,
"eliminated_by" text,
"elimination_move" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's Jorge Santana's elimination?`:
```sql
|
SELECT "wrestler" FROM "results" WHERE "elimination"='1'; |
## Task
Generate a SQL query to answer the following question:
`Who's the wrestler with an elimination of 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"elimination" text,
"wrestler" text,
"team" text,
"eliminated_by" text,
"elimination_move" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who's the wrestler with an elimination of 1?`:
```sql
|
SELECT "eliminated_by" FROM "results" WHERE "elimination"='1'; |
## Task
Generate a SQL query to answer the following question:
`Who's the eliminated by when the elimination was 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"elimination" text,
"wrestler" text,
"team" text,
"eliminated_by" text,
"elimination_move" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who's the eliminated by when the elimination was 1?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "week"<9 AND "result"='l 27-10'; |
## Task
Generate a SQL query to answer the following question:
`What is the date where the result was L 27-10 in a week before week 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date where the result was L 27-10 in a week before week 9?`:
```sql
|
SELECT SUM("draw") FROM "nationaal_songfestival_2009_1_february_2" WHERE "jury">22 AND "televote"=130; |
## Task
Generate a SQL query to answer the following question:
`What sum of draw had more than 22 in Jury and a Televote of 130?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nationaal_songfestival_2009_1_february_2" (
"draw" real,
"song" text,
"jury" real,
"televote" real,
"total" real,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What sum of draw had more than 22 in Jury and a Televote of 130?`:
```sql
|
SELECT SUM("jury") FROM "nationaal_songfestival_2009_1_february_2" WHERE "place"='2nd' AND "total">190; |
## Task
Generate a SQL query to answer the following question:
`What is the total of the jury that is 2nd place and the total is larger than 190?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nationaal_songfestival_2009_1_february_2" (
"draw" real,
"song" text,
"jury" real,
"televote" real,
"total" real,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total of the jury that is 2nd place and the total is larger than 190?`:
```sql
|
SELECT AVG("l_100km_combined") FROM "see_also" WHERE "l_100km_urban_cold"=13.9 AND "mpg_uk_combined">28.5 AND "mpg_uk_extra_urban"<38.7; |
## Task
Generate a SQL query to answer the following question:
`What's the average L/km combines when the L/100km Urban is 13.9, the mpg-UK combined is more than 28.5 and the mpg-UK extra urban is less than 38.7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"manufacturer" text,
"transmission" text,
"engine_capacity" real,
"fuel_type" text,
"l_100km_urban_cold" real,
"l_100km_extra_urban" real,
"l_100km_combined" real,
"mpg_uk_urban_cold" real,
"mpg_uk_extra_urban" real,
"mpg_uk_combined" real,
"mpg_us_urban" real,
"mpg_us_extra_urban" real,
"mpg_us_combined" real,
"co_2_g_km" real,
"green_rating" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the average L/km combines when the L/100km Urban is 13.9, the mpg-UK combined is more than 28.5 and the mpg-UK extra urban is less than 38.7?`:
```sql
|
SELECT MIN("mpg_uk_combined") FROM "see_also" WHERE "mpg_uk_urban_cold"=25.4 AND "l_100km_extra_urban"<6.9 AND "l_100km_urban_cold">11.1; |
## Task
Generate a SQL query to answer the following question:
`What's the least mpg-UK combined when the mpg-UK urban is 25.4, the L/100km extra urban is less than 6.9 and the L/100km urban is more than 11.1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"manufacturer" text,
"transmission" text,
"engine_capacity" real,
"fuel_type" text,
"l_100km_urban_cold" real,
"l_100km_extra_urban" real,
"l_100km_combined" real,
"mpg_uk_urban_cold" real,
"mpg_uk_extra_urban" real,
"mpg_uk_combined" real,
"mpg_us_urban" real,
"mpg_us_extra_urban" real,
"mpg_us_combined" real,
"co_2_g_km" real,
"green_rating" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the least mpg-UK combined when the mpg-UK urban is 25.4, the L/100km extra urban is less than 6.9 and the L/100km urban is more than 11.1?`:
```sql
|
SELECT COUNT("co_2_g_km") FROM "see_also" WHERE "fuel_type"='diesel' AND "manufacturer"='fiat' AND "l_100km_urban_cold">6.3 AND "mpg_uk_combined"=43.5; |
## Task
Generate a SQL query to answer the following question:
`What's the CO2 g/km of a Fiat running on diesel with the L/100km urban more than 6.3 and an mpg-UK combined of 43.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"manufacturer" text,
"transmission" text,
"engine_capacity" real,
"fuel_type" text,
"l_100km_urban_cold" real,
"l_100km_extra_urban" real,
"l_100km_combined" real,
"mpg_uk_urban_cold" real,
"mpg_uk_extra_urban" real,
"mpg_uk_combined" real,
"mpg_us_urban" real,
"mpg_us_extra_urban" real,
"mpg_us_combined" real,
"co_2_g_km" real,
"green_rating" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the CO2 g/km of a Fiat running on diesel with the L/100km urban more than 6.3 and an mpg-UK combined of 43.5?`:
```sql
|
SELECT COUNT("l_100km_extra_urban") FROM "see_also" WHERE "mpg_uk_combined">19.2 AND "l_100km_combined"<5.7 AND "fuel_type"='diesel' AND "mpg_us_combined"<50; |
## Task
Generate a SQL query to answer the following question:
`What's the total L/100km extra urban fueled by diesel, when the mpg-UK combines is more than 19.2, mpg-US is less than 50 and the L/100m combined is less than 5.7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"manufacturer" text,
"transmission" text,
"engine_capacity" real,
"fuel_type" text,
"l_100km_urban_cold" real,
"l_100km_extra_urban" real,
"l_100km_combined" real,
"mpg_uk_urban_cold" real,
"mpg_uk_extra_urban" real,
"mpg_uk_combined" real,
"mpg_us_urban" real,
"mpg_us_extra_urban" real,
"mpg_us_combined" real,
"co_2_g_km" real,
"green_rating" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the total L/100km extra urban fueled by diesel, when the mpg-UK combines is more than 19.2, mpg-US is less than 50 and the L/100m combined is less than 5.7?`:
```sql
|
SELECT SUM("engine_capacity") FROM "see_also" WHERE "mpg_uk_urban_cold"<12.2 AND "mpg_uk_extra_urban"<18.8 AND "mpg_us_urban"<7.2; |
## Task
Generate a SQL query to answer the following question:
`What's the engine capacity when the mpg-UK urban is less than 12.2, the mpg-UK extra urban is less than 18.8 and the mpg-US turban is less than 7.2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"manufacturer" text,
"transmission" text,
"engine_capacity" real,
"fuel_type" text,
"l_100km_urban_cold" real,
"l_100km_extra_urban" real,
"l_100km_combined" real,
"mpg_uk_urban_cold" real,
"mpg_uk_extra_urban" real,
"mpg_uk_combined" real,
"mpg_us_urban" real,
"mpg_us_extra_urban" real,
"mpg_us_combined" real,
"co_2_g_km" real,
"green_rating" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the engine capacity when the mpg-UK urban is less than 12.2, the mpg-UK extra urban is less than 18.8 and the mpg-US turban is less than 7.2?`:
```sql
|
SELECT SUM("mpg_us_urban") FROM "see_also" WHERE "mpg_uk_urban_cold"=20 AND "mpg_uk_extra_urban"<37.2; |
## Task
Generate a SQL query to answer the following question:
`What's the mpg-US urban when the mpg-UK urban is 20 and the mpg-UK extra urban is less than 37.2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"manufacturer" text,
"transmission" text,
"engine_capacity" real,
"fuel_type" text,
"l_100km_urban_cold" real,
"l_100km_extra_urban" real,
"l_100km_combined" real,
"mpg_uk_urban_cold" real,
"mpg_uk_extra_urban" real,
"mpg_uk_combined" real,
"mpg_us_urban" real,
"mpg_us_extra_urban" real,
"mpg_us_combined" real,
"co_2_g_km" real,
"green_rating" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the mpg-US urban when the mpg-UK urban is 20 and the mpg-UK extra urban is less than 37.2?`:
```sql
|
SELECT "score" FROM "international_goals" WHERE "assist_pass"='abby wambach' AND "date"='2010-07-13'; |
## Task
Generate a SQL query to answer the following question:
`What was the score on 2010-07-13 when Abby wambach had the assist/pass?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"location" text,
"lineup" text,
"assist_pass" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score on 2010-07-13 when Abby wambach had the assist/pass?`:
```sql
|
SELECT "location" FROM "international_goals" WHERE "lineup"='start' AND "date"='2008-06-17'; |
## Task
Generate a SQL query to answer the following question:
`What is the location on 2008-06-17 when the lineup was start?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"location" text,
"lineup" text,
"assist_pass" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the location on 2008-06-17 when the lineup was start?`:
```sql
|
SELECT "assist_pass" FROM "international_goals" WHERE "date"='2008-01-16' AND "score"='2-0'; |
## Task
Generate a SQL query to answer the following question:
`What is the assist/pass on 2008-01-16 when the score was 2-0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"location" text,
"lineup" text,
"assist_pass" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the assist/pass on 2008-01-16 when the score was 2-0?`:
```sql
|
SELECT "result" FROM "international_goals" WHERE "location"='match reports'; |
## Task
Generate a SQL query to answer the following question:
`What is the result at match reports?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"location" text,
"lineup" text,
"assist_pass" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result at match reports?`:
```sql
|
SELECT "points" FROM "regular_season" WHERE "goals_against"='222'; |
## Task
Generate a SQL query to answer the following question:
`What's the points if the goals against were 222?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"season" text,
"games" text,
"lost" text,
"tied" text,
"points" text,
"goals_for" text,
"goals_against" text,
"standing" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the points if the goals against were 222?`:
```sql
|
SELECT "points" FROM "regular_season" WHERE "goals_against"='260'; |
## Task
Generate a SQL query to answer the following question:
`What are the points if the goals against were 260?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"season" text,
"games" text,
"lost" text,
"tied" text,
"points" text,
"goals_for" text,
"goals_against" text,
"standing" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the points if the goals against were 260?`:
```sql
|
SELECT "games" FROM "regular_season" WHERE "standing"='involuntary suspension of season (hurricane rita)'; |
## Task
Generate a SQL query to answer the following question:
`What are the games with an Involuntary suspension of Season (hurricane Rita)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"season" text,
"games" text,
"lost" text,
"tied" text,
"points" text,
"goals_for" text,
"goals_against" text,
"standing" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the games with an Involuntary suspension of Season (hurricane Rita)?`:
```sql
|
SELECT "goals_for" FROM "regular_season" WHERE "lost"='involuntary suspension of season (hurricane rita)'; |
## Task
Generate a SQL query to answer the following question:
`What are the goals for a lost of Involuntary suspension of Season (hurricane Rita)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"season" text,
"games" text,
"lost" text,
"tied" text,
"points" text,
"goals_for" text,
"goals_against" text,
"standing" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the goals for a lost of Involuntary suspension of Season (hurricane Rita)?`:
```sql
|
SELECT "season" FROM "regular_season" WHERE "games"='72' AND "lost"='9'; |
## Task
Generate a SQL query to answer the following question:
`What's the season that had a lost of 9 with 72 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"season" text,
"games" text,
"lost" text,
"tied" text,
"points" text,
"goals_for" text,
"goals_against" text,
"standing" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the season that had a lost of 9 with 72 games?`:
```sql
|
SELECT "format" FROM "top_8_appearances" WHERE "location"='taipei'; |
## Task
Generate a SQL query to answer the following question:
`What event did he compete in at Taipei?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_8_appearances" (
"season" text,
"event_type" text,
"location" text,
"format" text,
"date" text,
"rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `What event did he compete in at Taipei?`:
```sql
|
SELECT "season" FROM "top_8_appearances" WHERE "event_type"='grand prix' AND "location"='kuala lumpur'; |
## Task
Generate a SQL query to answer the following question:
`In what season did he compete in the Grand Prix in Kuala Lumpur?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_8_appearances" (
"season" text,
"event_type" text,
"location" text,
"format" text,
"date" text,
"rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `In what season did he compete in the Grand Prix in Kuala Lumpur?`:
```sql
|
SELECT "position" FROM "first_round" WHERE "pick"<3 AND "team"='san diego'; |
## Task
Generate a SQL query to answer the following question:
`What is the position of the player with a pick less than 3 from team san diego?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the position of the player with a pick less than 3 from team san diego?`:
```sql
|
SELECT "location" FROM "elite_men" WHERE "silver"='david mccann' AND "gold"='morgan fox'; |
## Task
Generate a SQL query to answer the following question:
`What location did david mccann receive a siver and morgan fox win the gold?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "elite_men" (
"year" text,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `What location did david mccann receive a siver and morgan fox win the gold?`:
```sql
|
SELECT "bronze" FROM "elite_men" WHERE "year"='2011'; |
## Task
Generate a SQL query to answer the following question:
`Who received the bronze in 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "elite_men" (
"year" text,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who received the bronze in 2011?`:
```sql
|
SELECT "silver" FROM "elite_men" WHERE "year"='2006'; |
## Task
Generate a SQL query to answer the following question:
`Who received the silver in 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "elite_men" (
"year" text,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who received the silver in 2006?`:
```sql
|
SELECT "name" FROM "volleyball_at_the_2008_summer_olympics_m" WHERE "2008_club"='liaoning'; |
## Task
Generate a SQL query to answer the following question:
`What is the name for the club Liaoning in 2008?`
### 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 name for the club Liaoning in 2008?`:
```sql
|
SELECT "spike" FROM "volleyball_at_the_2008_summer_olympics_m" WHERE "2008_club"='army'; |
## Task
Generate a SQL query to answer the following question:
`What was the spike for the Army Club in 2008?`
### 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 was the spike for the Army Club in 2008?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.