output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "quantity_made" FROM "sligo_leitrim_and_northern_counties_rail" WHERE "class"='waterford'; |
## Task
Generate a SQL query to answer the following question:
`What is the quantity made of the locomotive with a Waterford class?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sligo_leitrim_and_northern_counties_rail" (
"class" text,
"type" text,
"names" text,
"quantity_made" text,
"manufacturer" text,
"date_made" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the quantity made of the locomotive with a Waterford class?`:
```sql
|
SELECT "class" FROM "sligo_leitrim_and_northern_counties_rail" WHERE "quantity_made"='1' AND "type"='0-6-0t'; |
## Task
Generate a SQL query to answer the following question:
`What is the class of the locomotive with a quantity made of 1 and a 0-6-0t type?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sligo_leitrim_and_northern_counties_rail" (
"class" text,
"type" text,
"names" text,
"quantity_made" text,
"manufacturer" text,
"date_made" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the class of the locomotive with a quantity made of 1 and a 0-6-0t type?`:
```sql
|
SELECT "class" FROM "sligo_leitrim_and_northern_counties_rail" WHERE "type"='0-4-0st'; |
## Task
Generate a SQL query to answer the following question:
`What is the class of the locomotive with a 0-4-0st type?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sligo_leitrim_and_northern_counties_rail" (
"class" text,
"type" text,
"names" text,
"quantity_made" text,
"manufacturer" text,
"date_made" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the class of the locomotive with a 0-4-0st type?`:
```sql
|
SELECT "names" FROM "sligo_leitrim_and_northern_counties_rail" WHERE "class"='glencar'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the locomotive with a Glencar class?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sligo_leitrim_and_northern_counties_rail" (
"class" text,
"type" text,
"names" text,
"quantity_made" text,
"manufacturer" text,
"date_made" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the locomotive with a Glencar class?`:
```sql
|
SELECT "country" FROM "in" WHERE "type"='signed' AND "moving_from"='porto'; |
## Task
Generate a SQL query to answer the following question:
`What country has signed type moving from porto?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"ends" real,
"transfer_fee" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country has signed type moving from porto?`:
```sql
|
SELECT "transfer_window" FROM "in" WHERE "moving_from"='borussia dortmund'; |
## Task
Generate a SQL query to answer the following question:
`Which transfer window was moving from borussia dortmund?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"ends" real,
"transfer_fee" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which transfer window was moving from borussia dortmund?`:
```sql
|
SELECT "moving_from" FROM "in" WHERE "country"='esp' AND "transfer_fee"='youth system'; |
## Task
Generate a SQL query to answer the following question:
`What is moving from esp with transfer fee of youth system?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"ends" real,
"transfer_fee" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is moving from esp with transfer fee of youth system?`:
```sql
|
SELECT "transfer_window" FROM "in" WHERE "country"='esp' AND "type"='promoted' AND "ends">2010; |
## Task
Generate a SQL query to answer the following question:
`What is the transfer window in esp with promoted type and more than 2010 ends?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"ends" real,
"transfer_fee" text,
"source" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the transfer window in esp with promoted type and more than 2010 ends?`:
```sql
|
SELECT "week_12" FROM "nominations" WHERE "week_2"='magda tomek'; |
## Task
Generate a SQL query to answer the following question:
`Who is the week 12 for the week 2 with Magda Tomek?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nominations" (
"week_2" text,
"week_4" text,
"week_6" text,
"week_11" text,
"week_12" text,
"week_13" text,
"week_15" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the week 12 for the week 2 with Magda Tomek?`:
```sql
|
SELECT "week_12" FROM "nominations" WHERE "week_4"='gerard ewelina'; |
## Task
Generate a SQL query to answer the following question:
`Who is the week 12 for the week 4 of Gerard Ewelina?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nominations" (
"week_2" text,
"week_4" text,
"week_6" text,
"week_11" text,
"week_12" text,
"week_13" text,
"week_15" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the week 12 for the week 4 of Gerard Ewelina?`:
```sql
|
SELECT "points" FROM "usa" WHERE "rebounds"='al jefferson (7)'; |
## Task
Generate a SQL query to answer the following question:
`Who was the leader in Points when Al Jefferson (7) was the leader in Rebounds?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "usa" (
"year" real,
"points" text,
"rebounds" text,
"assists" text,
"steals" text,
"blocks" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the leader in Points when Al Jefferson (7) was the leader in Rebounds?`:
```sql
|
SELECT "steals" FROM "usa" WHERE "rebounds"='travis watson (9)'; |
## Task
Generate a SQL query to answer the following question:
`Who was the leader in Steals when Travis Watson (9) was the leader in Rebounds?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "usa" (
"year" real,
"points" text,
"rebounds" text,
"assists" text,
"steals" text,
"blocks" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the leader in Steals when Travis Watson (9) was the leader in Rebounds?`:
```sql
|
SELECT MIN("year") FROM "usa" WHERE "rebounds"='al harrington (9)'; |
## Task
Generate a SQL query to answer the following question:
`What was the 1st Year Al Harrington (9) the leader in Rebounds?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "usa" (
"year" real,
"points" text,
"rebounds" text,
"assists" text,
"steals" text,
"blocks" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the 1st Year Al Harrington (9) the leader in Rebounds?`:
```sql
|
SELECT "points" FROM "usa" WHERE "steals"='3 tied (2)' AND "assists"='2 tied (5)'; |
## Task
Generate a SQL query to answer the following question:
`Who was the leader in Points with Assists of 2 tied (5) and Steals of 3 tied (2)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "usa" (
"year" real,
"points" text,
"rebounds" text,
"assists" text,
"steals" text,
"blocks" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the leader in Points with Assists of 2 tied (5) and Steals of 3 tied (2)?`:
```sql
|
SELECT AVG("average") FROM "top_scorers" WHERE "tally"='0-29' AND "total">29; |
## Task
Generate a SQL query to answer the following question:
`Name the average with tally of 0-29 and total more than 29`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_scorers" (
"player" text,
"county" text,
"tally" text,
"total" real,
"matches" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average with tally of 0-29 and total more than 29`:
```sql
|
SELECT "tally" FROM "top_scorers" WHERE "total"<27 AND "average">3.41; |
## Task
Generate a SQL query to answer the following question:
`Name the tally with total less than 27 and average more than 3.41`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_scorers" (
"player" text,
"county" text,
"tally" text,
"total" real,
"matches" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the tally with total less than 27 and average more than 3.41`:
```sql
|
SELECT MAX("year") FROM "complete_formula_one_world_championship_" WHERE "engine"='maserati straight-6' AND "entrant"='h h gould'; |
## Task
Generate a SQL query to answer the following question:
`For engines of Maserati Straight-6 and entrants of H H Gould, what is the latest year?`
### 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" real
);
### SQL
Given the database schema, here is the SQL query that answers `For engines of Maserati Straight-6 and entrants of H H Gould, what is the latest year?`:
```sql
|
SELECT MIN("points") FROM "complete_formula_one_world_championship_" WHERE "entrant"='goulds'' garage (bristol)' AND "engine"='maserati straight-6' AND "year"<1956; |
## Task
Generate a SQL query to answer the following question:
`What is the fewest number of points scored by Goulds' Garage (Bristol), engines of Maserati Straight-6, in years before 1956?`
### 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" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the fewest number of points scored by Goulds' Garage (Bristol), engines of Maserati Straight-6, in years before 1956?`:
```sql
|
SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "points"<2 AND "entrant"='goulds'' garage (bristol)' AND "year"=1954; |
## Task
Generate a SQL query to answer the following question:
`Which chassis has fewer than 2 points, entrants of Goulds' Garage (Bristol), in 1954?`
### 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" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which chassis has fewer than 2 points, entrants of Goulds' Garage (Bristol), in 1954?`:
```sql
|
SELECT MAX("points") FROM "complete_formula_one_world_championship_" WHERE "chassis"='maserati 250f' AND "year">1955; |
## Task
Generate a SQL query to answer the following question:
`What is the most points that the Maserati 250F chassis scored in years after 1955?`
### 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" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the most points that the Maserati 250F chassis scored in years after 1955?`:
```sql
|
SELECT "engine" FROM "complete_formula_one_world_championship_" WHERE "year">1956; |
## Task
Generate a SQL query to answer the following question:
`Which engine has a year larger than 1956?`
### 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" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which engine has a year larger than 1956?`:
```sql
|
SELECT MIN("age_on_mission") FROM "apollo_astronauts_who_flew_to_the_moon_w" WHERE "name"='stu roosa'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest age of an astronaut named Stu Roosa?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "apollo_astronauts_who_flew_to_the_moon_w" (
"name" text,
"born" text,
"age_on_mission" real,
"mission" text,
"mission_dates" text,
"service" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest age of an astronaut named Stu Roosa?`:
```sql
|
SELECT "mission" FROM "apollo_astronauts_who_flew_to_the_moon_w" WHERE "service"='nasa' AND "age_on_mission"=38; |
## Task
Generate a SQL query to answer the following question:
`What mission did the astronaut who 38 years old on the mission and who served in NASA serve on?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "apollo_astronauts_who_flew_to_the_moon_w" (
"name" text,
"born" text,
"age_on_mission" real,
"mission" text,
"mission_dates" text,
"service" text
);
### SQL
Given the database schema, here is the SQL query that answers `What mission did the astronaut who 38 years old on the mission and who served in NASA serve on?`:
```sql
|
SELECT "lithium" FROM "properties" WHERE "rubidium"='nabr (1.9)'; |
## Task
Generate a SQL query to answer the following question:
`what is the type of lithium when rubidium is nabr (1.9)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "properties" (
"lithium" text,
"sodium" text,
"potassium" text,
"rubidium" text,
"caesium" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the type of lithium when rubidium is nabr (1.9)?`:
```sql
|
SELECT "sodium" FROM "properties" WHERE "rubidium"='nacl (2.1)'; |
## Task
Generate a SQL query to answer the following question:
`what is the properties of sodium when rubidium is nacl (2.1)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "properties" (
"lithium" text,
"sodium" text,
"potassium" text,
"rubidium" text,
"caesium" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the properties of sodium when rubidium is nacl (2.1)?`:
```sql
|
SELECT "potassium" FROM "properties" WHERE "lithium"='h a l o g e n s' AND "sodium"='bromine'; |
## Task
Generate a SQL query to answer the following question:
`what is the properties of potassium when lithium is h a l o g e n s and sodium is bromine?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "properties" (
"lithium" text,
"sodium" text,
"potassium" text,
"rubidium" text,
"caesium" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the properties of potassium when lithium is h a l o g e n s and sodium is bromine?`:
```sql
|
SELECT "lithium" FROM "properties" WHERE "caesium"='ki (1.7)'; |
## Task
Generate a SQL query to answer the following question:
`what is the properties of lithium when caesium is ki (1.7)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "properties" (
"lithium" text,
"sodium" text,
"potassium" text,
"rubidium" text,
"caesium" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the properties of lithium when caesium is ki (1.7)?`:
```sql
|
SELECT "sodium" FROM "properties" WHERE "lithium"='h a l o g e n s' AND "rubidium"='nacl (2.1)'; |
## Task
Generate a SQL query to answer the following question:
`what is the properties of sodium when lithium is h a l o g e n s and rubidium is nacl (2.1)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "properties" (
"lithium" text,
"sodium" text,
"potassium" text,
"rubidium" text,
"caesium" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the properties of sodium when lithium is h a l o g e n s and rubidium is nacl (2.1)?`:
```sql
|
SELECT "sodium" FROM "properties" WHERE "potassium"='lii (1.5)'; |
## Task
Generate a SQL query to answer the following question:
`what is the properties of sodium when potassium is lii (1.5)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "properties" (
"lithium" text,
"sodium" text,
"potassium" text,
"rubidium" text,
"caesium" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the properties of sodium when potassium is lii (1.5)?`:
```sql
|
SELECT "prime_mover" FROM "rs_series_b_b" WHERE "model"='rs-18'; |
## Task
Generate a SQL query to answer the following question:
`Which prime mover had a Model of rs-18?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rs_series_b_b" (
"model" text,
"specification" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which prime mover had a Model of rs-18?`:
```sql
|
SELECT "model" FROM "rs_series_b_b" WHERE "specification"='dl-718'; |
## Task
Generate a SQL query to answer the following question:
`Which model had a Specification of dl-718?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rs_series_b_b" (
"model" text,
"specification" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which model had a Specification of dl-718?`:
```sql
|
SELECT "power_output" FROM "rs_series_b_b" WHERE "build_date"='1951–1956'; |
## Task
Generate a SQL query to answer the following question:
`Which power output had a Build date of 1951–1956?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rs_series_b_b" (
"model" text,
"specification" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which power output had a Build date of 1951–1956?`:
```sql
|
SELECT "wheel_arrangement" FROM "rs_series_b_b" WHERE "specification"='dl-700'; |
## Task
Generate a SQL query to answer the following question:
`Which wheel arrangement had a Specification of dl-700?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rs_series_b_b" (
"model" text,
"specification" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which wheel arrangement had a Specification of dl-700?`:
```sql
|
SELECT "player" FROM "fiba_euro_basket_2007_squads" WHERE "year_born"<1985 AND "height"<2.02; |
## Task
Generate a SQL query to answer the following question:
`Who is the player born before 1985 who is less than 2.02 tall?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fiba_euro_basket_2007_squads" (
"player" text,
"height" real,
"position" text,
"year_born" real,
"current_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the player born before 1985 who is less than 2.02 tall?`:
```sql
|
SELECT "player" FROM "fiba_euro_basket_2007_squads" WHERE "year_born"<1980 AND "current_club"='toronto raptors'; |
## Task
Generate a SQL query to answer the following question:
`Who is the player who was born before 1980 who currently plays for the Toronto Raptors?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fiba_euro_basket_2007_squads" (
"player" text,
"height" real,
"position" text,
"year_born" real,
"current_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the player who was born before 1980 who currently plays for the Toronto Raptors?`:
```sql
|
SELECT "position" FROM "fiba_euro_basket_2007_squads" WHERE "height"<1.96 AND "year_born">1980 AND "player"='sergio rodríguez'; |
## Task
Generate a SQL query to answer the following question:
`What position does Sergio Rodríguez, who is less than 1.96 tall and was born after 1980, play?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fiba_euro_basket_2007_squads" (
"player" text,
"height" real,
"position" text,
"year_born" real,
"current_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `What position does Sergio Rodríguez, who is less than 1.96 tall and was born after 1980, play?`:
```sql
|
SELECT "year_born" FROM "fiba_euro_basket_2007_squads" WHERE "position"='guard' AND "current_club"='memphis grizzlies'; |
## Task
Generate a SQL query to answer the following question:
`What year was the Guard who currently plays for the Memphis Grizzlies born?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fiba_euro_basket_2007_squads" (
"player" text,
"height" real,
"position" text,
"year_born" real,
"current_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was the Guard who currently plays for the Memphis Grizzlies born?`:
```sql
|
SELECT "height" FROM "fiba_euro_basket_2007_squads" WHERE "position"='forward' AND "current_club"='toronto raptors'; |
## Task
Generate a SQL query to answer the following question:
`What is the height of the Forward who currently plays for the Toronto Raptors?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fiba_euro_basket_2007_squads" (
"player" text,
"height" real,
"position" text,
"year_born" real,
"current_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the height of the Forward who currently plays for the Toronto Raptors?`:
```sql
|
SELECT "group_position" FROM "group_stage" WHERE "date"='24 september 2002'; |
## Task
Generate a SQL query to answer the following question:
`Date of 24 september 2002 is what group position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_stage" (
"date" text,
"opponents" text,
"result_f_a" text,
"attendance" real,
"group_position" text
);
### SQL
Given the database schema, here is the SQL query that answers `Date of 24 september 2002 is what group position?`:
```sql
|
SELECT "result_f_a" FROM "group_stage" WHERE "attendance">'63,439' AND "opponents"='bayer leverkusen'; |
## Task
Generate a SQL query to answer the following question:
`Attendance larger than 63,439, and an Opponent of bayer leverkusen had what result?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_stage" (
"date" text,
"opponents" text,
"result_f_a" text,
"attendance" real,
"group_position" text
);
### SQL
Given the database schema, here is the SQL query that answers `Attendance larger than 63,439, and an Opponent of bayer leverkusen had what result?`:
```sql
|
SELECT "result_f_a" FROM "group_stage" WHERE "date"='24 september 2002'; |
## Task
Generate a SQL query to answer the following question:
`Date of 24 september 2002 had what F-A result?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_stage" (
"date" text,
"opponents" text,
"result_f_a" text,
"attendance" real,
"group_position" text
);
### SQL
Given the database schema, here is the SQL query that answers `Date of 24 september 2002 had what F-A result?`:
```sql
|
SELECT COUNT("attendance") FROM "group_stage" WHERE "result_f_a"='2–0'; |
## Task
Generate a SQL query to answer the following question:
`Result F–A of 2–0 had what total number of attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_stage" (
"date" text,
"opponents" text,
"result_f_a" text,
"attendance" real,
"group_position" text
);
### SQL
Given the database schema, here is the SQL query that answers `Result F–A of 2–0 had what total number of attendance?`:
```sql
|
SELECT "score" FROM "july" WHERE "loss"='myers (5-6)'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game with a loss of Myers (5-6)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "july" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game with a loss of Myers (5-6)?`:
```sql
|
SELECT "loss" FROM "july" WHERE "attendance"='41,212'; |
## Task
Generate a SQL query to answer the following question:
`What was the loss of the game attended by 41,212?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "july" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the loss of the game attended by 41,212?`:
```sql
|
SELECT "attendance" FROM "july" WHERE "loss"='wolf (3-4)'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance of the game that had a loss of Wolf (3-4)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "july" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance of the game that had a loss of Wolf (3-4)?`:
```sql
|
SELECT "nation" FROM "junior_under_20_women" WHERE "athlete"='bianca knight'; |
## Task
Generate a SQL query to answer the following question:
`what nation is bianca knight the answer for?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "junior_under_20_women" (
"rank" real,
"fastest_time_s" real,
"wind_m_s" real,
"athlete" text,
"nation" text,
"date" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `what nation is bianca knight the answer for?`:
```sql
|
SELECT MIN("wind_m_s") FROM "junior_under_20_women" WHERE "nation"='united states' AND "athlete"='brenda morehead'; |
## Task
Generate a SQL query to answer the following question:
`what is the wind speed when brenda morehead was in the united states?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "junior_under_20_women" (
"rank" real,
"fastest_time_s" real,
"wind_m_s" real,
"athlete" text,
"nation" text,
"date" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the wind speed when brenda morehead was in the united states?`:
```sql
|
SELECT MAX("rank") FROM "junior_under_20_women" WHERE "location"='dresden' AND "fastest_time_s"<10.88; |
## Task
Generate a SQL query to answer the following question:
`what is the highest rank in dresden with a time faster than 10.88?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "junior_under_20_women" (
"rank" real,
"fastest_time_s" real,
"wind_m_s" real,
"athlete" text,
"nation" text,
"date" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the highest rank in dresden with a time faster than 10.88?`:
```sql
|
SELECT "course" FROM "stage_results" WHERE "date"='1 june'; |
## Task
Generate a SQL query to answer the following question:
`What is the course on 1 June?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"winner" text,
"race_leader" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the course on 1 June?`:
```sql
|
SELECT "winner" FROM "stage_results" WHERE "course"='florence to genoa'; |
## Task
Generate a SQL query to answer the following question:
`Who is the winner of the Florence to Genoa course?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"winner" text,
"race_leader" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the winner of the Florence to Genoa course?`:
```sql
|
SELECT "date" FROM "stage_results" WHERE "course"='rome to florence'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the Rome to Florence course?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"winner" text,
"race_leader" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the Rome to Florence course?`:
```sql
|
SELECT "assists" FROM "world" WHERE "blocks"='2 tied (1)' AND "year">1995; |
## Task
Generate a SQL query to answer the following question:
`What is Assists that has a Blocks of 2 tied (1) with a Year larger than 1995`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world" (
"year" real,
"points" text,
"rebounds" text,
"assists" text,
"steals" text,
"blocks" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Assists that has a Blocks of 2 tied (1) with a Year larger than 1995`:
```sql
|
SELECT MAX("lane") FROM "heats" WHERE "heat"=6 AND "time"='dns'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest lane for heat 6 with a time of dns?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest lane for heat 6 with a time of dns?`:
```sql
|
SELECT MIN("lane") FROM "heats" WHERE "time"='2:05.90' AND "heat">3; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest lane with a time of 2:05.90, and a Heat larger than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest lane with a time of 2:05.90, and a Heat larger than 3?`:
```sql
|
SELECT "nationality" FROM "heats" WHERE "lane">4 AND "time"='2:00.37'; |
## Task
Generate a SQL query to answer the following question:
`What nationality has a lane larger than 4 and a Time of 2:00.37?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What nationality has a lane larger than 4 and a Time of 2:00.37?`:
```sql
|
SELECT AVG("lane") FROM "heats" WHERE "nationality"='belarus'; |
## Task
Generate a SQL query to answer the following question:
`What is the average Lane where Belarus is the nationality?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Lane where Belarus is the nationality?`:
```sql
|
SELECT MAX("lane") FROM "heats" WHERE "name"='nisha millet'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest lane for nisha millet?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest lane for nisha millet?`:
```sql
|
SELECT "date" FROM "stage_results" WHERE "course"='rome to naples'; |
## Task
Generate a SQL query to answer the following question:
`On what date was the race course from Rome to Naples?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text,
"race_leader" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was the race course from Rome to Naples?`:
```sql
|
SELECT "losing_bp" FROM "2008_2009_table" WHERE "played"='22' AND "try_bp"='9'; |
## Task
Generate a SQL query to answer the following question:
`Name the Losing BP with 22 played and 9 Try BP.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"try_bp" text,
"losing_bp" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Losing BP with 22 played and 9 Try BP.`:
```sql
|
SELECT "losing_bp" FROM "2008_2009_table" WHERE "drawn"='1' AND "try_bp"='6'; |
## Task
Generate a SQL query to answer the following question:
`Name the Losing BP with drawn of 1 and a Try BP of 6.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"try_bp" text,
"losing_bp" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Losing BP with drawn of 1 and a Try BP of 6.`:
```sql
|
SELECT "losing_bp" FROM "2008_2009_table" WHERE "lost"='19' AND "club"='newport saracens rfc'; |
## Task
Generate a SQL query to answer the following question:
`Name the Losing BP of Newport Saracens RFC and has a Lost of 19.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"try_bp" text,
"losing_bp" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Losing BP of Newport Saracens RFC and has a Lost of 19.`:
```sql
|
SELECT "drawn" FROM "2008_2009_table" WHERE "played"='22' AND "club"='ystrad rhondda rfc'; |
## Task
Generate a SQL query to answer the following question:
`Name the Drawn for Ystrad Rhondda RFC and has Played of 22.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"try_bp" text,
"losing_bp" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Drawn for Ystrad Rhondda RFC and has Played of 22.`:
```sql
|
SELECT "drawn" FROM "2008_2009_table" WHERE "lost"='1'; |
## Task
Generate a SQL query to answer the following question:
`Can you name the drawn with a Lost of 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"try_bp" text,
"losing_bp" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you name the drawn with a Lost of 1?`:
```sql
|
SELECT "drawn" FROM "2008_2009_table" WHERE "losing_bp"='8'; |
## Task
Generate a SQL query to answer the following question:
`With a Losing BP of 8, what is the drawn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"try_bp" text,
"losing_bp" text
);
### SQL
Given the database schema, here is the SQL query that answers `With a Losing BP of 8, what is the drawn?`:
```sql
|
SELECT "disposals" FROM "player_list" WHERE "marks"='134'; |
## Task
Generate a SQL query to answer the following question:
`What is the number of disposals when marks is 134?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "player_list" (
"player" text,
"afl_debut" text,
"games" text,
"goals" text,
"behinds" text,
"kicks" text,
"handballs" text,
"disposals" text,
"marks" text,
"tackles" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of disposals when marks is 134?`:
```sql
|
SELECT "score1" FROM "friendlies" WHERE "match"=42; |
## Task
Generate a SQL query to answer the following question:
`What is the Score1 of Match 42?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "friendlies" (
"match" real,
"date" text,
"competition_or_tour" text,
"ground" text,
"opponent" text,
"score1" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Score1 of Match 42?`:
```sql
|
SELECT "date" FROM "friendlies" WHERE "match">8 AND "ground"='a' AND "opponent"='guiseley'; |
## Task
Generate a SQL query to answer the following question:
`On what date was the match higher than 8 on ground A against Guiseley?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "friendlies" (
"match" real,
"date" text,
"competition_or_tour" text,
"ground" text,
"opponent" text,
"score1" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was the match higher than 8 on ground A against Guiseley?`:
```sql
|
SELECT "ground" FROM "friendlies" WHERE "date"='31 jul 2007'; |
## Task
Generate a SQL query to answer the following question:
`On what ground was the game on 31 Jul 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "friendlies" (
"match" real,
"date" text,
"competition_or_tour" text,
"ground" text,
"opponent" text,
"score1" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what ground was the game on 31 Jul 2007?`:
```sql
|
SELECT SUM("total") FROM "made_the_cut" WHERE "player"='david toms'; |
## Task
Generate a SQL query to answer the following question:
`What is the total of David Toms?`
### 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 `What is the total of David Toms?`:
```sql
|
SELECT AVG("total") FROM "made_the_cut" WHERE "finish"='t10' AND "country"='fiji'; |
## Task
Generate a SQL query to answer the following question:
`What is the average of Fiji with t10 Finish?`
### 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 `What is the average of Fiji with t10 Finish?`:
```sql
|
SELECT "player" FROM "made_the_cut" WHERE "year_s_won"='1983'; |
## Task
Generate a SQL query to answer the following question:
`Who won in 1983?`
### 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 `Who won in 1983?`:
```sql
|
SELECT "website" FROM "newspapers" WHERE "language"='english' AND "frequency"='daily'; |
## Task
Generate a SQL query to answer the following question:
`Which english website has a daily frequency ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "newspapers" (
"name" text,
"frequency" text,
"language" text,
"city" text,
"website" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which english website has a daily frequency ?`:
```sql
|
SELECT "frequency" FROM "newspapers" WHERE "city"='nuevo laredo' AND "name"='el diario de nuevo laredo'; |
## Task
Generate a SQL query to answer the following question:
`What is the frequency of the newspaper, el diario de nuevo laredo in the city of nuevo laredo ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "newspapers" (
"name" text,
"frequency" text,
"language" text,
"city" text,
"website" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the frequency of the newspaper, el diario de nuevo laredo in the city of nuevo laredo ?`:
```sql
|
SELECT "website" FROM "newspapers" WHERE "city"='laredo' AND "name"='laredo sun'; |
## Task
Generate a SQL query to answer the following question:
`What is the website of the Laredo Sun in the city of Laredo ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "newspapers" (
"name" text,
"frequency" text,
"language" text,
"city" text,
"website" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the website of the Laredo Sun in the city of Laredo ?`:
```sql
|
SELECT "name" FROM "newspapers" WHERE "website"='liderinformativo.com'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the newspaper with the website liderinformativo.com ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "newspapers" (
"name" text,
"frequency" text,
"language" text,
"city" text,
"website" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the newspaper with the website liderinformativo.com ?`:
```sql
|
SELECT "website" FROM "newspapers" WHERE "language"='english' AND "frequency"='online newspaper'; |
## Task
Generate a SQL query to answer the following question:
`Which website is in english and has the frequency of an online newspaper ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "newspapers" (
"name" text,
"frequency" text,
"language" text,
"city" text,
"website" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which website is in english and has the frequency of an online newspaper ?`:
```sql
|
SELECT "city" FROM "newspapers" WHERE "language"='spanish' AND "website"='ultimahora.com'; |
## Task
Generate a SQL query to answer the following question:
`Which city has spanish news on the website ultimahora.com ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "newspapers" (
"name" text,
"frequency" text,
"language" text,
"city" text,
"website" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which city has spanish news on the website ultimahora.com ?`:
```sql
|
SELECT MAX("points") FROM "complete_formula_one_world_championship_" WHERE "year">1959; |
## Task
Generate a SQL query to answer the following question:
`Which line after 1959 had the highest amount of points?`
### 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" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which line after 1959 had the highest amount of points?`:
```sql
|
SELECT MIN("points") FROM "complete_formula_one_world_championship_" WHERE "year"=1954; |
## Task
Generate a SQL query to answer the following question:
`Which line has the lowest amount of points and a year of 1954?`
### 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" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which line has the lowest amount of points and a year of 1954?`:
```sql
|
SELECT SUM("points") FROM "complete_formula_one_world_championship_" WHERE "entrant"='christy' AND "year"<1954; |
## Task
Generate a SQL query to answer the following question:
`What is the total amount of points that Christy has in the years before 1954?`
### 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" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total amount of points that Christy has in the years before 1954?`:
```sql
|
SELECT MAX("year") FROM "complete_formula_one_world_championship_" WHERE "engine"='offenhauser l4' AND "chassis"='kurtis kraft 500c' AND "entrant"='federal engineering'; |
## Task
Generate a SQL query to answer the following question:
`Which is the latest year that has an engine of Offenhauser l4, a chassis of Kurtis Kraft 500c, and the entrant of Federal Engineering?`
### 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" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which is the latest year that has an engine of Offenhauser l4, a chassis of Kurtis Kraft 500c, and the entrant of Federal Engineering?`:
```sql
|
SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "year"=1954; |
## Task
Generate a SQL query to answer the following question:
`Which chasis was in the year 1954?`
### 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" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which chasis was in the year 1954?`:
```sql
|
SELECT "final_score" FROM "matches" WHERE "year"=2007 AND "competition"='world league' AND "town"='novi sad' AND "opponent"='italy'; |
## Task
Generate a SQL query to answer the following question:
`What is the final score in 2007 for the world league in novi sad played against Italy?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "matches" (
"year" real,
"competition" text,
"town" text,
"opponent" text,
"final_score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the final score in 2007 for the world league in novi sad played against Italy?`:
```sql
|
SELECT "competition" FROM "matches" WHERE "town"='budva' AND "opponent"='italy'; |
## Task
Generate a SQL query to answer the following question:
`what is the competition played in budva against italy?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "matches" (
"year" real,
"competition" text,
"town" text,
"opponent" text,
"final_score" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the competition played in budva against italy?`:
```sql
|
SELECT "competition" FROM "matches" WHERE "final_score"='6:5'; |
## Task
Generate a SQL query to answer the following question:
`what is the competition that had a final score of 6:5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "matches" (
"year" real,
"competition" text,
"town" text,
"opponent" text,
"final_score" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the competition that had a final score of 6:5?`:
```sql
|
SELECT "opponent" FROM "matches" WHERE "year"<2007 AND "town"='trieste'; |
## Task
Generate a SQL query to answer the following question:
`who is the opponent when played in trieste before 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "matches" (
"year" real,
"competition" text,
"town" text,
"opponent" text,
"final_score" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the opponent when played in trieste before 2007?`:
```sql
|
SELECT MIN("bonus_pts") FROM "1965_season_finished_5th_39pts_out_of_18" WHERE "rider"='bob jameson' AND "rides"<15; |
## Task
Generate a SQL query to answer the following question:
`What was Bob Jameson's lowest bonus where he had less than 15 rides?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1965_season_finished_5th_39pts_out_of_18" (
"rider" text,
"matches" real,
"rides" real,
"bonus_pts" real,
"total_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was Bob Jameson's lowest bonus where he had less than 15 rides?`:
```sql
|
SELECT MIN("rides") FROM "1965_season_finished_5th_39pts_out_of_18" WHERE "bonus_pts"<3 AND "matches"<7; |
## Task
Generate a SQL query to answer the following question:
`How many rides did it take to get less than 3 bonus pts in no more than 7 matches?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1965_season_finished_5th_39pts_out_of_18" (
"rider" text,
"matches" real,
"rides" real,
"bonus_pts" real,
"total_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many rides did it take to get less than 3 bonus pts in no more than 7 matches?`:
```sql
|
SELECT AVG("total_points") FROM "1965_season_finished_5th_39pts_out_of_18" WHERE "matches"=34 AND "rides"=111 AND "bonus_pts">15; |
## Task
Generate a SQL query to answer the following question:
`What is the total for 34 matches with 111 rides, but no more than 15 bonus points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1965_season_finished_5th_39pts_out_of_18" (
"rider" text,
"matches" real,
"rides" real,
"bonus_pts" real,
"total_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total for 34 matches with 111 rides, but no more than 15 bonus points?`:
```sql
|
SELECT COUNT("rides") FROM "1965_season_finished_5th_39pts_out_of_18" WHERE "total_points"<274 AND "rider"='ray day' AND "bonus_pts">3; |
## Task
Generate a SQL query to answer the following question:
`How many rides did it take Ray Day to get 274 points in total with less than 3 bonus points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1965_season_finished_5th_39pts_out_of_18" (
"rider" text,
"matches" real,
"rides" real,
"bonus_pts" real,
"total_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many rides did it take Ray Day to get 274 points in total with less than 3 bonus points?`:
```sql
|
SELECT "rider" FROM "1965_season_finished_5th_39pts_out_of_18" WHERE "total_points"<342 AND "rides"<76 AND "matches"=7 AND "bonus_pts">2; |
## Task
Generate a SQL query to answer the following question:
`Which rider had less than 342 points in no more than 76 rides in 7 matches with more than 2 bonus points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1965_season_finished_5th_39pts_out_of_18" (
"rider" text,
"matches" real,
"rides" real,
"bonus_pts" real,
"total_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which rider had less than 342 points in no more than 76 rides in 7 matches with more than 2 bonus points?`:
```sql
|
SELECT "margin_of_victory" FROM "champions_tour_wins_45" WHERE "date"='aug 11, 2002'; |
## Task
Generate a SQL query to answer the following question:
`What is the Margin of victory on aug 11, 2002?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions_tour_wins_45" (
"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 the Margin of victory on aug 11, 2002?`:
```sql
|
SELECT "date" FROM "champions_tour_wins_45" WHERE "winning_score"='–16 (70-65-65=200)'; |
## Task
Generate a SQL query to answer the following question:
`When has a Winning score of –16 (70-65-65=200)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions_tour_wins_45" (
"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 `When has a Winning score of –16 (70-65-65=200)?`:
```sql
|
SELECT "margin_of_victory" FROM "champions_tour_wins_45" WHERE "date"='oct 5, 1997'; |
## Task
Generate a SQL query to answer the following question:
`What is the Margin of victory on oct 5, 1997?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions_tour_wins_45" (
"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 the Margin of victory on oct 5, 1997?`:
```sql
|
SELECT "winning_score" FROM "champions_tour_wins_45" WHERE "date"='oct 22, 2000'; |
## Task
Generate a SQL query to answer the following question:
`What is the Winning score on oct 22, 2000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions_tour_wins_45" (
"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 the Winning score on oct 22, 2000?`:
```sql
|
SELECT COUNT("total_viewers") FROM "series_2" WHERE "share"='16.2%' AND "episode_no"<1; |
## Task
Generate a SQL query to answer the following question:
`How many episodes have a share of 16.2% and an episode number of less than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_2" (
"episode_no" real,
"airdate" text,
"total_viewers" real,
"share" text,
"bbc_one_weekly_ranking" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many episodes have a share of 16.2% and an episode number of less than 1?`:
```sql
|
SELECT "2010" FROM "singles_performance_timeline" WHERE "2012"='2r' AND "tournament"='french open'; |
## Task
Generate a SQL query to answer the following question:
`If the French Open tournament had 2r in 2012, what was it in 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the French Open tournament had 2r in 2012, what was it in 2010?`:
```sql
|
SELECT "2012" FROM "singles_performance_timeline" WHERE "2010"='2r'; |
## Task
Generate a SQL query to answer the following question:
`Which 2012 tournament had 2r in 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which 2012 tournament had 2r in 2010?`:
```sql
|
SELECT "tournament" FROM "singles_performance_timeline" WHERE "2010"='2r'; |
## Task
Generate a SQL query to answer the following question:
`Which tournament had 2r in 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which tournament had 2r in 2010?`:
```sql
|
SELECT "2009" FROM "singles_performance_timeline" WHERE "2012"='2r' AND "tournament"='french open'; |
## Task
Generate a SQL query to answer the following question:
`If the French Open tournament had 2r in 2012, what was it in 2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the French Open tournament had 2r in 2012, what was it in 2009?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.