output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT SUM("poles") FROM "by_season" WHERE "class"='125cc' AND "team"='matteoni racing team' AND "points">3; |
## Task
Generate a SQL query to answer the following question:
`How many Poles have a Class of 125cc, and a Team of matteoni racing team, and Points larger than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_season" (
"year" text,
"class" text,
"team" text,
"bike" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"f_laps" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Poles have a Class of 125cc, and a Team of matteoni racing team, and Points larger than 3?`:
```sql
|
SELECT SUM("podiums") FROM "by_season" WHERE "class"='250cc' AND "f_laps"=0; |
## Task
Generate a SQL query to answer the following question:
`How many Podiums have a Class of 250cc, and an F laps of 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_season" (
"year" text,
"class" text,
"team" text,
"bike" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"f_laps" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Podiums have a Class of 250cc, and an F laps of 0?`:
```sql
|
SELECT COUNT("average") FROM "stadia_and_attendances" WHERE "team"='elgin city' AND "highest"<537; |
## Task
Generate a SQL query to answer the following question:
`Team of elgin city, and a Highest smaller than 537 had what total number of average?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stadia_and_attendances" (
"team" text,
"stadium" text,
"capacity" real,
"highest" real,
"lowest" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `Team of elgin city, and a Highest smaller than 537 had what total number of average?`:
```sql
|
SELECT SUM("highest") FROM "stadia_and_attendances" WHERE "average">450 AND "capacity"<'5,177' AND "stadium"='ochilview park'; |
## Task
Generate a SQL query to answer the following question:
`Average larger than 450, and a Capacity smaller than 5,177, and a Stadium of ochilview park is what sum of the highest?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stadia_and_attendances" (
"team" text,
"stadium" text,
"capacity" real,
"highest" real,
"lowest" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `Average larger than 450, and a Capacity smaller than 5,177, and a Stadium of ochilview park is what sum of the highest?`:
```sql
|
SELECT SUM("average") FROM "stadia_and_attendances" WHERE "capacity"<'3,292' AND "highest">812 AND "stadium"='strathclyde homes stadium'; |
## Task
Generate a SQL query to answer the following question:
`Capacity smaller than 3,292, and a Highest larger than 812, and a Stadium of strathclyde homes stadium has what sum of the average?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stadia_and_attendances" (
"team" text,
"stadium" text,
"capacity" real,
"highest" real,
"lowest" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `Capacity smaller than 3,292, and a Highest larger than 812, and a Stadium of strathclyde homes stadium has what sum of the average?`:
```sql
|
SELECT MIN("average") FROM "stadia_and_attendances" WHERE "lowest">288 AND "team"='east stirlingshire'; |
## Task
Generate a SQL query to answer the following question:
`Lowest larger than 288, and a Team of east stirlingshire has what lowest average?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stadia_and_attendances" (
"team" text,
"stadium" text,
"capacity" real,
"highest" real,
"lowest" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `Lowest larger than 288, and a Team of east stirlingshire has what lowest average?`:
```sql
|
SELECT "owner" FROM "locomotives" WHERE "locomotive"='c501'; |
## Task
Generate a SQL query to answer the following question:
`what is the owner of the c501`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "locomotives" (
"locomotive" text,
"entered_service" text,
"owner" text,
"operator" text,
"livery" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the owner of the c501`:
```sql
|
SELECT "record" FROM "regular_season" WHERE "game">32 AND "december"<21; |
## Task
Generate a SQL query to answer the following question:
`Which Record has a Game larger than 32, and a December smaller than 21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"december" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Record has a Game larger than 32, and a December smaller than 21?`:
```sql
|
SELECT "score" FROM "regular_season" WHERE "points">46 AND "game"<35 AND "december"=21; |
## Task
Generate a SQL query to answer the following question:
`Which Score has Points larger than 46, and a Game smaller than 35, and a December of 21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"december" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Score has Points larger than 46, and a Game smaller than 35, and a December of 21?`:
```sql
|
SELECT MIN("december") FROM "regular_season" WHERE "points"=52; |
## Task
Generate a SQL query to answer the following question:
`Which December is the lowest one that has Points of 52?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"december" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which December is the lowest one that has Points of 52?`:
```sql
|
SELECT SUM("december") FROM "regular_season" WHERE "points"=48 AND "game">33; |
## Task
Generate a SQL query to answer the following question:
`Which December has Points of 48, and a Game larger than 33?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"december" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which December has Points of 48, and a Game larger than 33?`:
```sql
|
SELECT "regular_season_champion_s" FROM "champions_by_year" WHERE "year"='1943–44'; |
## Task
Generate a SQL query to answer the following question:
`WHich Regular Season Champions has a Year of 1943–44?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions_by_year" (
"year" text,
"regular_season_champion_s" text,
"record" text,
"tournament_champion" text,
"tournament_venue" text,
"tournament_city" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHich Regular Season Champions has a Year of 1943–44?`:
```sql
|
SELECT "tournament_venue" FROM "champions_by_year" WHERE "tournament_champion"='duke' AND "record"='15–1'; |
## Task
Generate a SQL query to answer the following question:
`WHich Tournament venue has a Tournament Champion of duke and a Record of 15–1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions_by_year" (
"year" text,
"regular_season_champion_s" text,
"record" text,
"tournament_champion" text,
"tournament_venue" text,
"tournament_city" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHich Tournament venue has a Tournament Champion of duke and a Record of 15–1?`:
```sql
|
SELECT "year" FROM "champions_by_year" WHERE "tournament_venue"='richmond arena' AND "record"='12–1' AND "regular_season_champion_s"='virginia tech'; |
## Task
Generate a SQL query to answer the following question:
`When has a Tournament venue of richmond arena, and a Record of 12–1, and a Regular Season Champion(s) of virginia tech?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions_by_year" (
"year" text,
"regular_season_champion_s" text,
"record" text,
"tournament_champion" text,
"tournament_venue" text,
"tournament_city" text
);
### SQL
Given the database schema, here is the SQL query that answers `When has a Tournament venue of richmond arena, and a Record of 12–1, and a Regular Season Champion(s) of virginia tech?`:
```sql
|
SELECT "year" FROM "champions_by_year" WHERE "record"='9–1' AND "tournament_champion"='duke'; |
## Task
Generate a SQL query to answer the following question:
`When has a Record of 9–1, and a Tournament Champion of duke?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions_by_year" (
"year" text,
"regular_season_champion_s" text,
"record" text,
"tournament_champion" text,
"tournament_venue" text,
"tournament_city" text
);
### SQL
Given the database schema, here is the SQL query that answers `When has a Record of 9–1, and a Tournament Champion of duke?`:
```sql
|
SELECT "regular_season_champion_s" FROM "champions_by_year" WHERE "tournament_champion"='west virginia' AND "year"='1955–56'; |
## Task
Generate a SQL query to answer the following question:
`Which Regular Season Champion(s) has a Tournament Champion of west virginia in 1955–56?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions_by_year" (
"year" text,
"regular_season_champion_s" text,
"record" text,
"tournament_champion" text,
"tournament_venue" text,
"tournament_city" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Regular Season Champion(s) has a Tournament Champion of west virginia in 1955–56?`:
```sql
|
SELECT "regular_season_champion_s" FROM "champions_by_year" WHERE "record"='9–0' AND "tournament_champion"='north carolina'; |
## Task
Generate a SQL query to answer the following question:
`Which Regular Season Champion(s) has a Record of 9–0, and a Tournament Champion of north carolina?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions_by_year" (
"year" text,
"regular_season_champion_s" text,
"record" text,
"tournament_champion" text,
"tournament_venue" text,
"tournament_city" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Regular Season Champion(s) has a Record of 9–0, and a Tournament Champion of north carolina?`:
```sql
|
SELECT MIN("round") FROM "draft_picks" WHERE "college_junior_club_team_league"='new hampshire'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest round for a player selected from a college of New Hampshire?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest round for a player selected from a college of New Hampshire?`:
```sql
|
SELECT "nationality" FROM "draft_picks" WHERE "player"='rod langway'; |
## Task
Generate a SQL query to answer the following question:
`What nationality is Rod Langway?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What nationality is Rod Langway?`:
```sql
|
SELECT "position" FROM "draft_picks" WHERE "round">3; |
## Task
Generate a SQL query to answer the following question:
`What position is the player selected that has a round value over 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What position is the player selected that has a round value over 3?`:
```sql
|
SELECT "college_junior_club_team_league" FROM "draft_picks" WHERE "round">3; |
## Task
Generate a SQL query to answer the following question:
`What college did the player selected in rounds over 3 play for?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What college did the player selected in rounds over 3 play for?`:
```sql
|
SELECT MAX("round") FROM "draft_picks" WHERE "college_junior_club_team_league"='clarkson university'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest round that has a player selected from Clarkson University?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest round that has a player selected from Clarkson University?`:
```sql
|
SELECT MIN("rank") FROM "2000" WHERE "name"='deutsche telekom' AND "market_value_usd_million">'209,628'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest rank of Deutsche Telekom with a market value over 209,628?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000" (
"rank" real,
"name" text,
"headquarters" text,
"primary_industry" text,
"market_value_usd_million" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest rank of Deutsche Telekom with a market value over 209,628?`:
```sql
|
SELECT COUNT("market_value_usd_million") FROM "2000" WHERE "headquarters"='germany'; |
## Task
Generate a SQL query to answer the following question:
`What is the total market value of all corporations headquartered in Germany?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000" (
"rank" real,
"name" text,
"headquarters" text,
"primary_industry" text,
"market_value_usd_million" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total market value of all corporations headquartered in Germany?`:
```sql
|
SELECT MIN("earnings") FROM "leaders" WHERE "player"='vijay singh' AND "wins">24; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest earnings of Vijay Singh who had more than 24 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest earnings of Vijay Singh who had more than 24 wins?`:
```sql
|
SELECT MAX("rank") FROM "ranking" WHERE "change"<44 AND "centre"='buenos aires' AND "rating">628; |
## Task
Generate a SQL query to answer the following question:
`Which Rank is the highest one that has a Change smaller than 44, and a Centre of buenos aires, and a Rating larger than 628?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ranking" (
"rank" real,
"centre" text,
"country" text,
"rating" real,
"change" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank is the highest one that has a Change smaller than 44, and a Centre of buenos aires, and a Rating larger than 628?`:
```sql
|
SELECT "centre" FROM "ranking" WHERE "rank"=42; |
## Task
Generate a SQL query to answer the following question:
`Which Centre has a Rank of 42?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ranking" (
"rank" real,
"centre" text,
"country" text,
"rating" real,
"change" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Centre has a Rank of 42?`:
```sql
|
SELECT SUM("rating") FROM "ranking" WHERE "centre"='helsinki'; |
## Task
Generate a SQL query to answer the following question:
`Which Rating has a Centre of helsinki?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ranking" (
"rank" real,
"centre" text,
"country" text,
"rating" real,
"change" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rating has a Centre of helsinki?`:
```sql
|
SELECT AVG("change") FROM "ranking" WHERE "centre"='buenos aires' AND "rank"<46; |
## Task
Generate a SQL query to answer the following question:
`Which Change is the average one that has a Centre of buenos aires, and a Rank smaller than 46?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ranking" (
"rank" real,
"centre" text,
"country" text,
"rating" real,
"change" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Change is the average one that has a Centre of buenos aires, and a Rank smaller than 46?`:
```sql
|
SELECT "operation" FROM "comparison_of_theoretic_bounds_for_varia" WHERE "binomial"='θ(log n)' AND "strict_fibonacci_heap"='o(log n)'; |
## Task
Generate a SQL query to answer the following question:
`Binomial of θ(log n), and a Strict Fibonacci Heap of o(log n) is what operation?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison_of_theoretic_bounds_for_varia" (
"operation" text,
"binary" text,
"binomial" text,
"fibonacci" text,
"pairing" text,
"brodal" text,
"strict_fibonacci_heap" text
);
### SQL
Given the database schema, here is the SQL query that answers `Binomial of θ(log n), and a Strict Fibonacci Heap of o(log n) is what operation?`:
```sql
|
SELECT "fibonacci" FROM "comparison_of_theoretic_bounds_for_varia" WHERE "operation"='find-min'; |
## Task
Generate a SQL query to answer the following question:
`Operation of find-min has what Fibonacci?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison_of_theoretic_bounds_for_varia" (
"operation" text,
"binary" text,
"binomial" text,
"fibonacci" text,
"pairing" text,
"brodal" text,
"strict_fibonacci_heap" text
);
### SQL
Given the database schema, here is the SQL query that answers `Operation of find-min has what Fibonacci?`:
```sql
|
SELECT "pairing" FROM "comparison_of_theoretic_bounds_for_varia" WHERE "binomial"='θ(1)'; |
## Task
Generate a SQL query to answer the following question:
`Binomial of θ(1) has what pairing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison_of_theoretic_bounds_for_varia" (
"operation" text,
"binary" text,
"binomial" text,
"fibonacci" text,
"pairing" text,
"brodal" text,
"strict_fibonacci_heap" text
);
### SQL
Given the database schema, here is the SQL query that answers `Binomial of θ(1) has what pairing?`:
```sql
|
SELECT "binary" FROM "comparison_of_theoretic_bounds_for_varia" WHERE "pairing"='θ(1)' AND "binomial"='θ(1)'; |
## Task
Generate a SQL query to answer the following question:
`Pairing of θ(1), and a Binomial of θ(1) is what binary?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison_of_theoretic_bounds_for_varia" (
"operation" text,
"binary" text,
"binomial" text,
"fibonacci" text,
"pairing" text,
"brodal" text,
"strict_fibonacci_heap" text
);
### SQL
Given the database schema, here is the SQL query that answers `Pairing of θ(1), and a Binomial of θ(1) is what binary?`:
```sql
|
SELECT "binary" FROM "comparison_of_theoretic_bounds_for_varia" WHERE "operation"='find-min'; |
## Task
Generate a SQL query to answer the following question:
`Operation of find-min has what binary?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison_of_theoretic_bounds_for_varia" (
"operation" text,
"binary" text,
"binomial" text,
"fibonacci" text,
"pairing" text,
"brodal" text,
"strict_fibonacci_heap" text
);
### SQL
Given the database schema, here is the SQL query that answers `Operation of find-min has what binary?`:
```sql
|
SELECT "binomial" FROM "comparison_of_theoretic_bounds_for_varia" WHERE "binary"='θ(log n)' AND "fibonacci"='θ(1)'; |
## Task
Generate a SQL query to answer the following question:
`Binary of θ(log n), and a Fibonacci of θ(1) has what binomial?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison_of_theoretic_bounds_for_varia" (
"operation" text,
"binary" text,
"binomial" text,
"fibonacci" text,
"pairing" text,
"brodal" text,
"strict_fibonacci_heap" text
);
### SQL
Given the database schema, here is the SQL query that answers `Binary of θ(log n), and a Fibonacci of θ(1) has what binomial?`:
```sql
|
SELECT "title" FROM "track_listing" WHERE "duration"='4:57'; |
## Task
Generate a SQL query to answer the following question:
`Which of the titles have a duration time of 4:57?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"title" text,
"translation" text,
"lyricist" text,
"composer" text,
"duration" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which of the titles have a duration time of 4:57?`:
```sql
|
SELECT "composer" FROM "track_listing" WHERE "duration"='3:31'; |
## Task
Generate a SQL query to answer the following question:
`What composer has a duration time of 3:31?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"title" text,
"translation" text,
"lyricist" text,
"composer" text,
"duration" text
);
### SQL
Given the database schema, here is the SQL query that answers `What composer has a duration time of 3:31?`:
```sql
|
SELECT "duration" FROM "track_listing" WHERE "translation"='1000 lies'; |
## Task
Generate a SQL query to answer the following question:
`Which one of the duration has a translation of 1000 lies?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"title" text,
"translation" text,
"lyricist" text,
"composer" text,
"duration" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which one of the duration has a translation of 1000 lies?`:
```sql
|
SELECT "title" FROM "track_listing" WHERE "translation"='i know'; |
## Task
Generate a SQL query to answer the following question:
`Which title has a translation of I know in it?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"title" text,
"translation" text,
"lyricist" text,
"composer" text,
"duration" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which title has a translation of I know in it?`:
```sql
|
SELECT "title" FROM "track_listing" WHERE "translation"='1000 lies'; |
## Task
Generate a SQL query to answer the following question:
`Which title has a translation in it of 1000 lies?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"title" text,
"translation" text,
"lyricist" text,
"composer" text,
"duration" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which title has a translation in it of 1000 lies?`:
```sql
|
SELECT "gold" FROM "medal_winners" WHERE "silver"='bertil ahlin sweden'; |
## Task
Generate a SQL query to answer the following question:
`Who won the gold when Bertil Ahlin Sweden won the silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_winners" (
"event" text,
"gold" text,
"silver" text,
"bronze" text,
"4th_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won the gold when Bertil Ahlin Sweden won the silver?`:
```sql
|
SELECT "gold" FROM "medal_winners" WHERE "bronze"='jules van dyk belgium'; |
## Task
Generate a SQL query to answer the following question:
`Who won the gold when Jules van Dyk Belgium won bronze?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_winners" (
"event" text,
"gold" text,
"silver" text,
"bronze" text,
"4th_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won the gold when Jules van Dyk Belgium won bronze?`:
```sql
|
SELECT "second" FROM "group_a" WHERE "alternate"='margarita fomina'; |
## Task
Generate a SQL query to answer the following question:
`Who is the second for the curling team which has alternate Margarita Fomina?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_a" (
"nation" text,
"skip" text,
"third" text,
"second" text,
"lead" text,
"alternate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the second for the curling team which has alternate Margarita Fomina?`:
```sql
|
SELECT "second" FROM "group_a" WHERE "alternate"='margarita fomina'; |
## Task
Generate a SQL query to answer the following question:
`Who is the second for the team with alternate Margarita Fomina?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_a" (
"nation" text,
"skip" text,
"third" text,
"second" text,
"lead" text,
"alternate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the second for the team with alternate Margarita Fomina?`:
```sql
|
SELECT "alternate" FROM "group_a" WHERE "third"='monika wagner'; |
## Task
Generate a SQL query to answer the following question:
`Who is the alternate for the team for which Monika Wagner is the third?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_a" (
"nation" text,
"skip" text,
"third" text,
"second" text,
"lead" text,
"alternate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the alternate for the team for which Monika Wagner is the third?`:
```sql
|
SELECT "lead" FROM "group_a" WHERE "second"='nkeiruka ezekh'; |
## Task
Generate a SQL query to answer the following question:
`Who is the lead for the team with Nkeiruka Ezekh as second?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_a" (
"nation" text,
"skip" text,
"third" text,
"second" text,
"lead" text,
"alternate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the lead for the team with Nkeiruka Ezekh as second?`:
```sql
|
SELECT "lead" FROM "group_a" WHERE "alternate"='christina haller'; |
## Task
Generate a SQL query to answer the following question:
`Who is the lead for the team with Christina Haller as alternate?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_a" (
"nation" text,
"skip" text,
"third" text,
"second" text,
"lead" text,
"alternate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the lead for the team with Christina Haller as alternate?`:
```sql
|
SELECT "county" FROM "references" WHERE "year_built">1920 AND "latitude"='37°40′30\"n'; |
## Task
Generate a SQL query to answer the following question:
`What County was built after 1920 with a Latitude of 37°40′30"n?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"county" text,
"monument_name" text,
"year_built" real,
"city_or_town" text,
"latitude" text,
"longitude" text
);
### SQL
Given the database schema, here is the SQL query that answers `What County was built after 1920 with a Latitude of 37°40′30"n?`:
```sql
|
SELECT "latitude" FROM "references" WHERE "year_built"=1901; |
## Task
Generate a SQL query to answer the following question:
`What is the Latitude of the monument built in 1901?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"county" text,
"monument_name" text,
"year_built" real,
"city_or_town" text,
"latitude" text,
"longitude" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Latitude of the monument built in 1901?`:
```sql
|
SELECT "city_or_town" FROM "references" WHERE "longitude"='89°11′w'; |
## Task
Generate a SQL query to answer the following question:
`What is the City or Town of the monument with a Longitude of 89°11′w?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"county" text,
"monument_name" text,
"year_built" real,
"city_or_town" text,
"latitude" text,
"longitude" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the City or Town of the monument with a Longitude of 89°11′w?`:
```sql
|
SELECT "monument_name" FROM "references" WHERE "year_built">1887 AND "county"='warren'; |
## Task
Generate a SQL query to answer the following question:
`What Monument was built after 1887 in Warren County?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"county" text,
"monument_name" text,
"year_built" real,
"city_or_town" text,
"latitude" text,
"longitude" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Monument was built after 1887 in Warren County?`:
```sql
|
SELECT "county" FROM "references" WHERE "longitude"='85°45′43″w'; |
## Task
Generate a SQL query to answer the following question:
`What County has a Longitude of 85°45′43″w?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"county" text,
"monument_name" text,
"year_built" real,
"city_or_town" text,
"latitude" text,
"longitude" text
);
### SQL
Given the database schema, here is the SQL query that answers `What County has a Longitude of 85°45′43″w?`:
```sql
|
SELECT "opponent_in_the_final" FROM "doubles_6" WHERE "partner"='jorgelina cravero'; |
## Task
Generate a SQL query to answer the following question:
`What is the Opponent from the final with a Partner named jorgelina cravero?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_6" (
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Opponent from the final with a Partner named jorgelina cravero?`:
```sql
|
SELECT "outcome" FROM "singles_23_12_11" WHERE "tournament"='leipzig' AND "score"='w/o'; |
## Task
Generate a SQL query to answer the following question:
`What was the outcome for the match at the leipzig tournament with a score w/o?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_23_12_11" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the outcome for the match at the leipzig tournament with a score w/o?`:
```sql
|
SELECT "opponent" FROM "singles_23_12_11" WHERE "tournament"='leipzig'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent that anke huber played against in the leipzig tournament?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_23_12_11" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent that anke huber played against in the leipzig tournament?`:
```sql
|
SELECT "outcome" FROM "singles_23_12_11" WHERE "opponent"='magdalena maleeva'; |
## Task
Generate a SQL query to answer the following question:
`What was the outcome of the match against Magdalena Maleeva?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_23_12_11" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the outcome of the match against Magdalena Maleeva?`:
```sql
|
SELECT "player" FROM "round_one" WHERE "pick_num"='15'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the player that was Pick 15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_one" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the player that was Pick 15?`:
```sql
|
SELECT "college_junior_club_team" FROM "round_one" WHERE "pick_num"='12'; |
## Task
Generate a SQL query to answer the following question:
`To which college/junior/club team did the player that was Pick 12 belong?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_one" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `To which college/junior/club team did the player that was Pick 12 belong?`:
```sql
|
SELECT "nhl_team" FROM "round_one" WHERE "position"='left wing' AND "college_junior_club_team"='toronto marlboros (omjhl)'; |
## Task
Generate a SQL query to answer the following question:
`What NHL team has a player in the position of Left Wing that came from the Toronto Marlboros (omjhl)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_one" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What NHL team has a player in the position of Left Wing that came from the Toronto Marlboros (omjhl)?`:
```sql
|
SELECT "college_junior_club_team" FROM "round_one" WHERE "pick_num"='16'; |
## Task
Generate a SQL query to answer the following question:
`To which college/junior/club team did the player that was Pick 16 belong?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_one" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `To which college/junior/club team did the player that was Pick 16 belong?`:
```sql
|
SELECT "company" FROM "theatre_credits" WHERE "director"='simon stone' AND "year"<2011; |
## Task
Generate a SQL query to answer the following question:
`What company does Simon Stone direct earlier than 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "theatre_credits" (
"year" real,
"production" text,
"role" text,
"director" text,
"company" text
);
### SQL
Given the database schema, here is the SQL query that answers `What company does Simon Stone direct earlier than 2011?`:
```sql
|
SELECT "result" FROM "brazil_national_team" WHERE "competition"='world cup qualifying' AND "date"='march 21, 1954'; |
## Task
Generate a SQL query to answer the following question:
`Which Result has a Competition of world cup qualifying, and a Date of march 21, 1954?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "brazil_national_team" (
"date" text,
"result" text,
"score" text,
"brazil_scorers" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Result has a Competition of world cup qualifying, and a Date of march 21, 1954?`:
```sql
|
SELECT "competition" FROM "brazil_national_team" WHERE "result"='w' AND "score"='2-0' AND "date"='may 9, 1954'; |
## Task
Generate a SQL query to answer the following question:
`Which Competition has a Result of w, and a Score of 2-0, and a Date of may 9, 1954?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "brazil_national_team" (
"date" text,
"result" text,
"score" text,
"brazil_scorers" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Competition has a Result of w, and a Score of 2-0, and a Date of may 9, 1954?`:
```sql
|
SELECT "result" FROM "brazil_national_team" WHERE "score"='4-1' AND "competition"='world cup qualifying'; |
## Task
Generate a SQL query to answer the following question:
`Which Result has a Score of 4-1, and a Competition of world cup qualifying?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "brazil_national_team" (
"date" text,
"result" text,
"score" text,
"brazil_scorers" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Result has a Score of 4-1, and a Competition of world cup qualifying?`:
```sql
|
SELECT "score" FROM "brazil_national_team" WHERE "competition"='world cup qualifying' AND "brazil_scorers"='baltazar' AND "date"='march 14, 1954'; |
## Task
Generate a SQL query to answer the following question:
`Which Score has a Competition of world cup qualifying, and a Brazil scorers of baltazar, and a Date of march 14, 1954?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "brazil_national_team" (
"date" text,
"result" text,
"score" text,
"brazil_scorers" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Score has a Competition of world cup qualifying, and a Brazil scorers of baltazar, and a Date of march 14, 1954?`:
```sql
|
SELECT "brazil_scorers" FROM "brazil_national_team" WHERE "result"='w' AND "competition"='world cup qualifying' AND "date"='february 28, 1954'; |
## Task
Generate a SQL query to answer the following question:
`Which Brazil scorers have a Result of w, and a Competition of world cup qualifying, and a Date of february 28, 1954?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "brazil_national_team" (
"date" text,
"result" text,
"score" text,
"brazil_scorers" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Brazil scorers have a Result of w, and a Competition of world cup qualifying, and a Date of february 28, 1954?`:
```sql
|
SELECT "district" FROM "south_carolina" WHERE "first_elected"='1900'; |
## Task
Generate a SQL query to answer the following question:
`when first elected was 1900 what was the district?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `when first elected was 1900 what was the district?`:
```sql
|
SELECT "party" FROM "south_carolina" WHERE "first_elected"='1898'; |
## Task
Generate a SQL query to answer the following question:
`when first elected was 1898 what was the party?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `when first elected was 1898 what was the party?`:
```sql
|
SELECT SUM("games") FROM "world_championship_group_a_soviet_union" WHERE "lost"=6 AND "points"<7; |
## Task
Generate a SQL query to answer the following question:
`How many Games have a Lost of 6, and Points smaller than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_group_a_soviet_union" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Games have a Lost of 6, and Points smaller than 7?`:
```sql
|
SELECT AVG("number") FROM "receiving" WHERE "player"='larry centers' AND "yards"<600; |
## Task
Generate a SQL query to answer the following question:
`What is Larry Centers' average number when there were less than 600 yards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "receiving" (
"player" text,
"number" real,
"yards" real,
"average" real,
"long" real,
"touchdowns" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Larry Centers' average number when there were less than 600 yards?`:
```sql
|
SELECT MAX("number") FROM "receiving" WHERE "long">50 AND "yards"<762; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number when there were more than 50 long and less than 762 yards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "receiving" (
"player" text,
"number" real,
"yards" real,
"average" real,
"long" real,
"touchdowns" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number when there were more than 50 long and less than 762 yards?`:
```sql
|
SELECT MAX("yards") FROM "receiving" WHERE "average"=9.5; |
## Task
Generate a SQL query to answer the following question:
`What is the highest amount of yards when the average is 9.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "receiving" (
"player" text,
"number" real,
"yards" real,
"average" real,
"long" real,
"touchdowns" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest amount of yards when the average is 9.5?`:
```sql
|
SELECT "runner_up" FROM "european_tour_wins_7" WHERE "date"='5 aug 1990'; |
## Task
Generate a SQL query to answer the following question:
`Who was the runner-up on 5 aug 1990?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_7" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the runner-up on 5 aug 1990?`:
```sql
|
SELECT "tournament" FROM "european_tour_wins_7" WHERE "winning_score"='−14 (65-69-72-68=274)'; |
## Task
Generate a SQL query to answer the following question:
`Which Tournament has a Winning score of −14 (65-69-72-68=274)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_7" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Tournament has a Winning score of −14 (65-69-72-68=274)?`:
```sql
|
SELECT "runner_up" FROM "european_tour_wins_7" WHERE "winning_score"='−20 (70-69-64-65=268)'; |
## Task
Generate a SQL query to answer the following question:
`Which Runner-up has a Winning score of −20 (70-69-64-65=268)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_7" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Runner-up has a Winning score of −20 (70-69-64-65=268)?`:
```sql
|
SELECT "date" FROM "european_tour_wins_7" WHERE "winning_score"='−15 (71-69-68-65=273)'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has a Winning score of −15 (71-69-68-65=273)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_7" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date has a Winning score of −15 (71-69-68-65=273)?`:
```sql
|
SELECT "tournament" FROM "european_tour_wins_7" WHERE "runner_up"='vijay singh'; |
## Task
Generate a SQL query to answer the following question:
`In which tournament was vijay singh a runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_7" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `In which tournament was vijay singh a runner-up?`:
```sql
|
SELECT "tournament" FROM "european_tour_wins_7" WHERE "runner_up"='vijay singh'; |
## Task
Generate a SQL query to answer the following question:
`In which tournament was vijay singh a runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_7" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `In which tournament was vijay singh a runner-up?`:
```sql
|
SELECT "description" FROM "five_cent_test_tokens" WHERE "year_of_issue"=1983 AND "weight"='3.50grams'; |
## Task
Generate a SQL query to answer the following question:
`Which Description has a Year of Issue of 1983, and a Weight of 3.50grams?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "five_cent_test_tokens" (
"year_of_issue" real,
"description" text,
"weight" text,
"diameter" text,
"thickness" text,
"edge" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Description has a Year of Issue of 1983, and a Weight of 3.50grams?`:
```sql
|
SELECT "thickness" FROM "five_cent_test_tokens" WHERE "year_of_issue"<1983; |
## Task
Generate a SQL query to answer the following question:
`Which Thickness has a Year of Issue smaller than 1983?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "five_cent_test_tokens" (
"year_of_issue" real,
"description" text,
"weight" text,
"diameter" text,
"thickness" text,
"edge" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Thickness has a Year of Issue smaller than 1983?`:
```sql
|
SELECT "description" FROM "five_cent_test_tokens" WHERE "year_of_issue"=1983 AND "thickness"='1.7mm' AND "weight"='3.50grams'; |
## Task
Generate a SQL query to answer the following question:
`Which Description has a Year of Issue of 1983, and a Thickness of 1.7mm, and a Weight of 3.50grams?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "five_cent_test_tokens" (
"year_of_issue" real,
"description" text,
"weight" text,
"diameter" text,
"thickness" text,
"edge" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Description has a Year of Issue of 1983, and a Thickness of 1.7mm, and a Weight of 3.50grams?`:
```sql
|
SELECT "thickness" FROM "five_cent_test_tokens" WHERE "weight"='3.50grams'; |
## Task
Generate a SQL query to answer the following question:
`Which Thickness has a Weight of 3.50grams?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "five_cent_test_tokens" (
"year_of_issue" real,
"description" text,
"weight" text,
"diameter" text,
"thickness" text,
"edge" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Thickness has a Weight of 3.50grams?`:
```sql
|
SELECT "thickness" FROM "five_cent_test_tokens" WHERE "diameter"='21.9mm'; |
## Task
Generate a SQL query to answer the following question:
`Which Thickness has a Diameter of 21.9mm?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "five_cent_test_tokens" (
"year_of_issue" real,
"description" text,
"weight" text,
"diameter" text,
"thickness" text,
"edge" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Thickness has a Diameter of 21.9mm?`:
```sql
|
SELECT "socialist_labor_ticket" FROM "1958_state_election_results" WHERE "liberal_ticket"='w. averell harriman'; |
## Task
Generate a SQL query to answer the following question:
`Who was on the Socialist Labor ticket in the race against W. Averell Harriman?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1958_state_election_results" (
"office" text,
"republican_ticket" text,
"democratic_ticket" text,
"liberal_ticket" text,
"independent_socialist_ticket" text,
"socialist_labor_ticket" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was on the Socialist Labor ticket in the race against W. Averell Harriman?`:
```sql
|
SELECT "republican_ticket" FROM "1958_state_election_results" WHERE "democratic_ticket"='arthur levitt'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Republican candidate against the Democratic candidate Arthur Levitt?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1958_state_election_results" (
"office" text,
"republican_ticket" text,
"democratic_ticket" text,
"liberal_ticket" text,
"independent_socialist_ticket" text,
"socialist_labor_ticket" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Republican candidate against the Democratic candidate Arthur Levitt?`:
```sql
|
SELECT "independent_socialist_ticket" FROM "1958_state_election_results" WHERE "office"='comptroller'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Independent Socialist candidate for the office of comptroller?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1958_state_election_results" (
"office" text,
"republican_ticket" text,
"democratic_ticket" text,
"liberal_ticket" text,
"independent_socialist_ticket" text,
"socialist_labor_ticket" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Independent Socialist candidate for the office of comptroller?`:
```sql
|
SELECT "independent_socialist_ticket" FROM "1958_state_election_results" WHERE "liberal_ticket"='edward goodell'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Independent Socialist candidate who ran against the Liberal candidate Edward Goodell?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1958_state_election_results" (
"office" text,
"republican_ticket" text,
"democratic_ticket" text,
"liberal_ticket" text,
"independent_socialist_ticket" text,
"socialist_labor_ticket" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Independent Socialist candidate who ran against the Liberal candidate Edward Goodell?`:
```sql
|
SELECT "att" FROM "game_log" WHERE "time"='2:14'; |
## Task
Generate a SQL query to answer the following question:
`Which Att has a Time of 2:14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"time" text,
"att" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Att has a Time of 2:14?`:
```sql
|
SELECT "time" FROM "game_log" WHERE "record"='66-95'; |
## Task
Generate a SQL query to answer the following question:
`when is Record of 66-95?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"time" text,
"att" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `when is Record of 66-95?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "record"='65-95'; |
## Task
Generate a SQL query to answer the following question:
`Which Opponent has a Record of 65-95?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"time" text,
"att" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Opponent has a Record of 65-95?`:
```sql
|
SELECT "to_par" FROM "final_round" WHERE "player"='ernie els'; |
## Task
Generate a SQL query to answer the following question:
`What is the to par that has ernie els as the player?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the to par that has ernie els as the player?`:
```sql
|
SELECT "player" FROM "final_round" WHERE "money"='159,500' AND "country"='france'; |
## Task
Generate a SQL query to answer the following question:
`What player has money of (£) 159,500, and france is the country?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What player has money of (£) 159,500, and france is the country?`:
```sql
|
SELECT "player" FROM "final_round" WHERE "score"='69-70-68-73=280'; |
## Task
Generate a SQL query to answer the following question:
`What player has 69-70-68-73=280 as the score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What player has 69-70-68-73=280 as the score?`:
```sql
|
SELECT AVG("year") FROM "grand_prix_motorcycle_racing_results" WHERE "wins"<1 AND "team"='yamaha' AND "points">2; |
## Task
Generate a SQL query to answer the following question:
`What is the average year that has a win less than 1, yamaha as the team, with points greater than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_motorcycle_racing_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average year that has a win less than 1, yamaha as the team, with points greater than 2?`:
```sql
|
SELECT MAX("wins") FROM "grand_prix_motorcycle_racing_results" WHERE "class"='350cc' AND "team"='yamaha' AND "points"<37 AND "year">1979; |
## Task
Generate a SQL query to answer the following question:
`What is the highest wins that has 350cc as the class, yamaha for the team, with points less than 37, and a year after 1979?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_motorcycle_racing_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest wins that has 350cc as the class, yamaha for the team, with points less than 37, and a year after 1979?`:
```sql
|
SELECT SUM("points") FROM "grand_prix_motorcycle_racing_results" WHERE "class"='500cc' AND "wins">0 AND "year">1974; |
## Task
Generate a SQL query to answer the following question:
`How many points have 500cc for the class, a win greater than 0, with a year after 1974?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_motorcycle_racing_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many points have 500cc for the class, a win greater than 0, with a year after 1974?`:
```sql
|
SELECT SUM("wins") FROM "grand_prix_motorcycle_racing_results" WHERE "year">1976 AND "class"='350cc'; |
## Task
Generate a SQL query to answer the following question:
`How many wins have a year after 1976, and 350cc as the class?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grand_prix_motorcycle_racing_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins have a year after 1976, and 350cc as the class?`:
```sql
|
SELECT COUNT("san_jose_wins") FROM "games" WHERE "la_goals">6 AND "la_wins"<21; |
## Task
Generate a SQL query to answer the following question:
`How many San Jose wins have an LA goals larger than 6, and an LA wins smaller than 21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "games" (
"la_wins" real,
"draws" real,
"san_jose_wins" real,
"la_goals" real,
"san_jose_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many San Jose wins have an LA goals larger than 6, and an LA wins smaller than 21?`:
```sql
|
SELECT MIN("san_jose_goals") FROM "games" WHERE "san_jose_wins"<0; |
## Task
Generate a SQL query to answer the following question:
`Which San Jose goals have a San Jose wins smaller than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "games" (
"la_wins" real,
"draws" real,
"san_jose_wins" real,
"la_goals" real,
"san_jose_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which San Jose goals have a San Jose wins smaller than 0?`:
```sql
|
SELECT MAX("april") FROM "schedule_and_results" WHERE "record"='38-33-10'; |
## Task
Generate a SQL query to answer the following question:
`Name the most april with record of 38-33-10`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"april" real,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most april with record of 38-33-10`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.