output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "home_team" FROM "nba_finals" WHERE "game"='game 1'; |
## Task
Generate a SQL query to answer the following question:
`Which Home Team has a Game of game 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nba_finals" (
"game" text,
"date" text,
"home_team" text,
"result" text,
"road_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Home Team has a Game of game 1?`:
```sql
|
SELECT "game" FROM "nba_finals" WHERE "home_team"='san francisco' AND "date"='april 22'; |
## Task
Generate a SQL query to answer the following question:
`Which Game has a Home Team of san francisco, and a Date of april 22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nba_finals" (
"game" text,
"date" text,
"home_team" text,
"result" text,
"road_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Game has a Home Team of san francisco, and a Date of april 22?`:
```sql
|
SELECT "road_team" FROM "nba_finals" WHERE "home_team"='boston' AND "result"='124-101'; |
## Task
Generate a SQL query to answer the following question:
`Which Road Team has a Home Team of boston, and a Result of 124-101?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nba_finals" (
"game" text,
"date" text,
"home_team" text,
"result" text,
"road_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Road Team has a Home Team of boston, and a Result of 124-101?`:
```sql
|
SELECT "game" FROM "nba_finals" WHERE "home_team"='san francisco' AND "date"='april 22'; |
## Task
Generate a SQL query to answer the following question:
`Which Game has a Home Team of san francisco, and a Date of april 22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nba_finals" (
"game" text,
"date" text,
"home_team" text,
"result" text,
"road_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Game has a Home Team of san francisco, and a Date of april 22?`:
```sql
|
SELECT "result" FROM "nba_finals" WHERE "road_team"='san francisco' AND "game"='game 2'; |
## Task
Generate a SQL query to answer the following question:
`Which Result has a Road Team of san francisco, and a Game of game 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nba_finals" (
"game" text,
"date" text,
"home_team" text,
"result" text,
"road_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Result has a Road Team of san francisco, and a Game of game 2?`:
```sql
|
SELECT "home_team" FROM "nba_finals" WHERE "result"='124-101'; |
## Task
Generate a SQL query to answer the following question:
`Which Home Team has a Result of 124-101?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nba_finals" (
"game" text,
"date" text,
"home_team" text,
"result" text,
"road_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Home Team has a Result of 124-101?`:
```sql
|
SELECT COUNT("attendance") FROM "schedule" WHERE "result"='l 24-20' AND "week"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the total attendance in a week less than 5 when the result was l 24-20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total attendance in a week less than 5 when the result was l 24-20?`:
```sql
|
SELECT MAX("week") FROM "schedule" WHERE "opponent"='atlanta falcons'; |
## Task
Generate a SQL query to answer the following question:
`What is the largest week with the Atlanta Falcons as the opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest week with the Atlanta Falcons as the opponent?`:
```sql
|
SELECT COUNT("attendance") FROM "schedule" WHERE "week">1 AND "opponent"='philadelphia eagles'; |
## Task
Generate a SQL query to answer the following question:
`What is the total attendance in a week greater than 1 with an opponent of Philadelphia Eagles?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total attendance in a week greater than 1 with an opponent of Philadelphia Eagles?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "opponent"='washington capitals' AND "record"='24-34-17'; |
## Task
Generate a SQL query to answer the following question:
`Which Score has an Opponent of washington capitals, and a Record of 24-34-17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
"attendance" real,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Score has an Opponent of washington capitals, and a Record of 24-34-17?`:
```sql
|
SELECT MAX("game") FROM "game_log" WHERE "attendance"<'18,277' AND "points"=64; |
## Task
Generate a SQL query to answer the following question:
`Which Game has an Attendance smaller than 18,277, and Points of 64?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
"attendance" real,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Game has an Attendance smaller than 18,277, and Points of 64?`:
```sql
|
SELECT SUM("joined") FROM "members" WHERE "nickname"='knights' AND "enrollment">'2,960'; |
## Task
Generate a SQL query to answer the following question:
`Which Joined has a Nickname of knights, and an Enrollment larger than 2,960?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members" (
"institution" text,
"location" text,
"nickname" text,
"founded" real,
"enrollment" real,
"joined" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Joined has a Nickname of knights, and an Enrollment larger than 2,960?`:
```sql
|
SELECT "nickname" FROM "members" WHERE "enrollment"<501 AND "location"='clarkesville'; |
## Task
Generate a SQL query to answer the following question:
`Which Nickname has an Enrollment smaller than 501, and a Location of clarkesville?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members" (
"institution" text,
"location" text,
"nickname" text,
"founded" real,
"enrollment" real,
"joined" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Nickname has an Enrollment smaller than 501, and a Location of clarkesville?`:
```sql
|
SELECT MAX("joined") FROM "members" WHERE "institution"='abraham baldwin agricultural college' AND "enrollment"<'3,284'; |
## Task
Generate a SQL query to answer the following question:
`Which Joined has an Institution of abraham baldwin agricultural college, and an Enrollment smaller than 3,284?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members" (
"institution" text,
"location" text,
"nickname" text,
"founded" real,
"enrollment" real,
"joined" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Joined has an Institution of abraham baldwin agricultural college, and an Enrollment smaller than 3,284?`:
```sql
|
SELECT "home_team" FROM "group_4" WHERE "away_team_score"='9.11 (65)'; |
## Task
Generate a SQL query to answer the following question:
`What is Home Team, when Away Team Score is 9.11 (65)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_4" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"date" text,
"crowd" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Home Team, when Away Team Score is 9.11 (65)?`:
```sql
|
SELECT "away_team_score" FROM "group_4" WHERE "ground"='optus oval' AND "away_team"='fremantle'; |
## Task
Generate a SQL query to answer the following question:
`What is Away Team Score, when Ground is Optus Oval, and when Away Team is Fremantle?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_4" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"date" text,
"crowd" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Away Team Score, when Ground is Optus Oval, and when Away Team is Fremantle?`:
```sql
|
SELECT "away_team" FROM "group_4" WHERE "ground"='colonial stadium'; |
## Task
Generate a SQL query to answer the following question:
`What is Away Team, when Ground is Colonial Stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_4" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"date" text,
"crowd" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Away Team, when Ground is Colonial Stadium?`:
```sql
|
SELECT SUM("crowd") FROM "group_4" WHERE "date"='sunday, 4 march' AND "home_team_score"='22.13 (145)'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Crowd, when Date is Sunday, 4 March, and when Home Team Score is 22.13 (145)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_4" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"date" text,
"crowd" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Crowd, when Date is Sunday, 4 March, and when Home Team Score is 22.13 (145)?`:
```sql
|
SELECT "place" FROM "second_round" WHERE "score"='71-71=142'; |
## Task
Generate a SQL query to answer the following question:
`A score of 71-71=142 earned what place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `A score of 71-71=142 earned what place?`:
```sql
|
SELECT "to_par" FROM "second_round" WHERE "player"='josé maría olazábal'; |
## Task
Generate a SQL query to answer the following question:
`What was José María Olazábal's score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was José María Olazábal's score?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "date"='october 15, 1967'; |
## Task
Generate a SQL query to answer the following question:
`What team was the opponent on October 15, 1967?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the opponent on October 15, 1967?`:
```sql
|
SELECT MIN("attendance") FROM "schedule" WHERE "opponent"='green bay packers'; |
## Task
Generate a SQL query to answer the following question:
`What was the lowest attendance when the Green Bay Packers played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the lowest attendance when the Green Bay Packers played?`:
```sql
|
SELECT MIN("week") FROM "schedule" WHERE "date"='november 19, 1967'; |
## Task
Generate a SQL query to answer the following question:
`What was the week number when a game was played on November 19, 1967?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the week number when a game was played on November 19, 1967?`:
```sql
|
SELECT "team" FROM "race" WHERE "grid">8 AND "points"<4; |
## Task
Generate a SQL query to answer the following question:
`If a team has a grid of over 8 with less than 4 points, what's the team name?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `If a team has a grid of over 8 with less than 4 points, what's the team name?`:
```sql
|
SELECT "team" FROM "race" WHERE "laps"=90 AND "points"<19 AND "driver"='patrick carpentier'; |
## Task
Generate a SQL query to answer the following question:
`When Patrick Carpentier is driving and has less than 19 points with 90 laps, what team is racing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `When Patrick Carpentier is driving and has less than 19 points with 90 laps, what team is racing?`:
```sql
|
SELECT "score" FROM "highest_scoring_grand_finals" WHERE "total_points"=50; |
## Task
Generate a SQL query to answer the following question:
`What was the score where the total points was 50?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_scoring_grand_finals" (
"total_points" real,
"score" text,
"premiers" text,
"runners_up" text,
"details" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score where the total points was 50?`:
```sql
|
SELECT MIN("total_points") FROM "highest_scoring_grand_finals" WHERE "details"='2001 nrl grand final'; |
## Task
Generate a SQL query to answer the following question:
`For the match that had detail of 2001 nrl grand final, what was the lowest total points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_scoring_grand_finals" (
"total_points" real,
"score" text,
"premiers" text,
"runners_up" text,
"details" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the match that had detail of 2001 nrl grand final, what was the lowest total points?`:
```sql
|
SELECT AVG("game") FROM "game_log" WHERE "high_points"='wilson chandler (16)'; |
## Task
Generate a SQL query to answer the following question:
`Which average Game has a High points of wilson chandler (16)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which average Game has a High points of wilson chandler (16)?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "game">76 AND "location_attendance"='madison square garden 19,763' AND "high_rebounds"='wilson chandler (8)'; |
## Task
Generate a SQL query to answer the following question:
`Which Score has a Game larger than 76, a Location Attendance of madison square garden 19,763, and a High rebounds of wilson chandler (8)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Score has a Game larger than 76, a Location Attendance of madison square garden 19,763, and a High rebounds of wilson chandler (8)?`:
```sql
|
SELECT "team" FROM "game_log" WHERE "record"='32–50'; |
## Task
Generate a SQL query to answer the following question:
`Which Team has a Record of 32–50?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Team has a Record of 32–50?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "record"='29–47'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has a Record of 29–47?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date has a Record of 29–47?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "location_attendance"='madison square garden 19,763' AND "high_rebounds"='david lee (12)'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has a Location Attendance of madison square garden 19,763, and a High rebounds of david lee (12)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date has a Location Attendance of madison square garden 19,763, and a High rebounds of david lee (12)?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "score"='w 107–102 (ot)'; |
## Task
Generate a SQL query to answer the following question:
`Which Record has a Score of w 107–102 (ot)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Record has a Score of w 107–102 (ot)?`:
```sql
|
SELECT "team" FROM "game_log" WHERE "location_attendance"='fedexforum 11,731'; |
## Task
Generate a SQL query to answer the following question:
`Which Team has a Location Attendance of fedexforum 11,731?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Team has a Location Attendance of fedexforum 11,731?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "score"='l 97–99 (ot)'; |
## Task
Generate a SQL query to answer the following question:
`Which Record has a Score of l 97–99 (ot)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Record has a Score of l 97–99 (ot)?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "game"=34; |
## Task
Generate a SQL query to answer the following question:
`What is game 34's record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is game 34's record?`:
```sql
|
SELECT "high_assists" FROM "game_log" WHERE "date"='january 2'; |
## Task
Generate a SQL query to answer the following question:
`What were the high assist on january 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the high assist on january 2?`:
```sql
|
SELECT "director" FROM "submissions" WHERE "film_title_used_in_nomination"='floating life'; |
## Task
Generate a SQL query to answer the following question:
`Who was the director that had a film titled "Floating Life"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "submissions" (
"year_ceremony" text,
"film_title_used_in_nomination" text,
"language_s" text,
"director" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the director that had a film titled "Floating Life"?`:
```sql
|
SELECT COUNT("played") FROM "first_round" WHERE "position">5 AND "points"=11 AND "drawn"<1; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the total number of Played that has the Position larger than 5, and the Points of 11, and the Drawn smaller than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the total number of Played that has the Position larger than 5, and the Points of 11, and the Drawn smaller than 1?`:
```sql
|
SELECT MAX("played") FROM "first_round" WHERE "points">11 AND "lost">7; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the highest Played that has the Points larger than 11, and the Lost larger than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the highest Played that has the Points larger than 11, and the Lost larger than 7?`:
```sql
|
SELECT "score" FROM "second_round" WHERE "player"='dave hill'; |
## Task
Generate a SQL query to answer the following question:
`What was Dave Hill's score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Dave Hill's score?`:
```sql
|
SELECT "to_par" FROM "second_round" WHERE "country"='united states' AND "player"='al mengert'; |
## Task
Generate a SQL query to answer the following question:
`What is the to par of Al Mengert of the United States?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the to par of Al Mengert of the United States?`:
```sql
|
SELECT "score" FROM "second_round" WHERE "country"='united states' AND "place"='t5'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of T5 place in the United States?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of T5 place in the United States?`:
```sql
|
SELECT "player" FROM "second_round" WHERE "country"='united states' AND "place"='t10' AND "score"='67-77=144'; |
## Task
Generate a SQL query to answer the following question:
`Who was the player from the United States in T10 place with a score of 67-77=144?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the player from the United States in T10 place with a score of 67-77=144?`:
```sql
|
SELECT "to_par" FROM "second_round" WHERE "player"='billy casper'; |
## Task
Generate a SQL query to answer the following question:
`What was Billy Casper's to par?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Billy Casper's to par?`:
```sql
|
SELECT SUM("wins") FROM "tournament_summary" WHERE "played"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Wins, when Played is less than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournament_summary" (
"rank" real,
"team" text,
"played" real,
"wins" real,
"ties" real,
"losses" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Wins, when Played is less than 5?`:
```sql
|
SELECT MAX("wins") FROM "tournament_summary" WHERE "rank">2 AND "played"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Wins, when Rank is greater than 2, and when Played is less than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournament_summary" (
"rank" real,
"team" text,
"played" real,
"wins" real,
"ties" real,
"losses" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Wins, when Rank is greater than 2, and when Played is less than 5?`:
```sql
|
SELECT SUM("wins") FROM "tournament_summary" WHERE "team"='sweden' AND "played"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Wins, when Team is Sweden, and when Played is less than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournament_summary" (
"rank" real,
"team" text,
"played" real,
"wins" real,
"ties" real,
"losses" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Wins, when Team is Sweden, and when Played is less than 5?`:
```sql
|
SELECT MAX("points") FROM "tournament_summary" WHERE "played">5; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Points, when Played is greater than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournament_summary" (
"rank" real,
"team" text,
"played" real,
"wins" real,
"ties" real,
"losses" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Points, when Played is greater than 5?`:
```sql
|
SELECT AVG("ties") FROM "tournament_summary" WHERE "played">5; |
## Task
Generate a SQL query to answer the following question:
`What is the average Ties, when Played is greater than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournament_summary" (
"rank" real,
"team" text,
"played" real,
"wins" real,
"ties" real,
"losses" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Ties, when Played is greater than 5?`:
```sql
|
SELECT "date" FROM "european_tour_wins_12" WHERE "runner_s_up"='oliver wilson'; |
## Task
Generate a SQL query to answer the following question:
`What is Date, when Runner(s)-Up is Oliver Wilson?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_12" (
"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 Date, when Runner(s)-Up is Oliver Wilson?`:
```sql
|
SELECT "date" FROM "european_tour_wins_12" WHERE "margin_of_victory"='4 strokes'; |
## Task
Generate a SQL query to answer the following question:
`What is Date, when Margin Of Victory is 4 Strokes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_12" (
"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 Date, when Margin Of Victory is 4 Strokes?`:
```sql
|
SELECT "runner_s_up" FROM "european_tour_wins_12" WHERE "date"='21 jan 2007'; |
## Task
Generate a SQL query to answer the following question:
`What is Runner(s)-up, when Date is 21 Jan 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_12" (
"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 Runner(s)-up, when Date is 21 Jan 2007?`:
```sql
|
SELECT "tournament" FROM "european_tour_wins_12" WHERE "margin_of_victory"='1 stroke' AND "date"='18 jan 2009'; |
## Task
Generate a SQL query to answer the following question:
`What is Tournament, when Margin Of Victory is 1 Stroke, and when Date is 18 Jan 2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_12" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Tournament, when Margin Of Victory is 1 Stroke, and when Date is 18 Jan 2009?`:
```sql
|
SELECT "u_s_senate" FROM "statewide_tickets_on_which_spitzer_has_r" WHERE "year">2002 AND "party"='working families'; |
## Task
Generate a SQL query to answer the following question:
`what is the U.S. senate when the year is after 2002 and the party is working families?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statewide_tickets_on_which_spitzer_has_r" (
"year" real,
"party" text,
"governor" text,
"lieutenant_governor" text,
"comptroller" text,
"attorney_general" text,
"u_s_senate" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the U.S. senate when the year is after 2002 and the party is working families?`:
```sql
|
SELECT COUNT("year") FROM "statewide_tickets_on_which_spitzer_has_r" WHERE "comptroller"='alan hevesi' AND "party"='working families'; |
## Task
Generate a SQL query to answer the following question:
`How many times what the comptroller alan hevesi and the party working families?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statewide_tickets_on_which_spitzer_has_r" (
"year" real,
"party" text,
"governor" text,
"lieutenant_governor" text,
"comptroller" text,
"attorney_general" text,
"u_s_senate" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many times what the comptroller alan hevesi and the party working families?`:
```sql
|
SELECT "high_points" FROM "regular_season" WHERE "location_attendance"='conseco fieldhouse 7,134'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number of points of the game in Conseco fieldhouse 7,134?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of points of the game in Conseco fieldhouse 7,134?`:
```sql
|
SELECT "high_rebounds" FROM "regular_season" WHERE "record"='6-14'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number of rebounds of the game with a 6-14 record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of rebounds of the game with a 6-14 record?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "points">23 AND "attendance">'4,017' AND "date"='january 18'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Record that has the Points larger than 23, and the Attendance larger than 4,017, and the Date of january 18?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"attendance" real,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Record that has the Points larger than 23, and the Attendance larger than 4,017, and the Date of january 18?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "visitor"='pittsburgh' AND "points"<27 AND "home"='boston'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Record that has the Visitor of pittsburgh, and the Points smaller than 27, and the Home of boston?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"attendance" real,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Record that has the Visitor of pittsburgh, and the Points smaller than 27, and the Home of boston?`:
```sql
|
SELECT AVG("points") FROM "game_log" WHERE "attendance"='3,806'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the average Points that has the Attendance of 3,806?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"attendance" real,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the average Points that has the Attendance of 3,806?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "attendance"='38,642'; |
## Task
Generate a SQL query to answer the following question:
`Which opponent had 38,642 attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which opponent had 38,642 attendance?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "attendance"='51,265'; |
## Task
Generate a SQL query to answer the following question:
`What date had 51,265 attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date had 51,265 attendance?`:
```sql
|
SELECT "date" FROM "world_cup_top_twenty_finishes" WHERE "place"='7th'; |
## Task
Generate a SQL query to answer the following question:
`When 7th place, what is the date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_cup_top_twenty_finishes" (
"season" real,
"date" text,
"location" text,
"race" text,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 7th place, what is the date?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "game"=34; |
## Task
Generate a SQL query to answer the following question:
`What is the score of game 34?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of game 34?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "game"=33; |
## Task
Generate a SQL query to answer the following question:
`What is the record of game 33?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record of game 33?`:
```sql
|
SELECT "country" FROM "first_round" WHERE "place"='t4' AND "player"='scott simpson'; |
## Task
Generate a SQL query to answer the following question:
`What is the Country, when Place is "T4", and when Player is "Scott Simpson"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Country, when Place is "T4", and when Player is "Scott Simpson"?`:
```sql
|
SELECT "to_par" FROM "first_round" WHERE "score"=70 AND "player"='craig stadler'; |
## Task
Generate a SQL query to answer the following question:
`What is To Par, when Score is 70, and when Player is "Craig Stadler"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is To Par, when Score is 70, and when Player is "Craig Stadler"?`:
```sql
|
SELECT "player" FROM "first_round" WHERE "score"<69 AND "country"='united states'; |
## Task
Generate a SQL query to answer the following question:
`What is Player, when Score is less than 69, and when Country is "United States"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Player, when Score is less than 69, and when Country is "United States"?`:
```sql
|
SELECT "writer" FROM "production" WHERE "producer"='phil collinson' AND "director"='alice troughton'; |
## Task
Generate a SQL query to answer the following question:
`Who was the writer that the director was Alice Troughton and the producer was Phil Collinson?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "production" (
"block" real,
"episode_title" text,
"director" text,
"writer" text,
"producer" text,
"code" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the writer that the director was Alice Troughton and the producer was Phil Collinson?`:
```sql
|
SELECT "location_attendance" FROM "game_log" WHERE "game">2 AND "team"='new orleans'; |
## Task
Generate a SQL query to answer the following question:
`What is the location and attendance after game 2, and the team New Orleans?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the location and attendance after game 2, and the team New Orleans?`:
```sql
|
SELECT "teleplay" FROM "episodes" WHERE "season">1.1 AND "first_broadcast"='february 20, 1981'; |
## Task
Generate a SQL query to answer the following question:
`What is Teleplay, when Season is greater than 1.1, and when First Broadcast is "February 20, 1981"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episodes" (
"title" text,
"season" real,
"director" text,
"teleplay" text,
"first_broadcast" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Teleplay, when Season is greater than 1.1, and when First Broadcast is "February 20, 1981"?`:
```sql
|
SELECT "title" FROM "episodes" WHERE "season"<1.8 AND "first_broadcast"='march 6, 1981'; |
## Task
Generate a SQL query to answer the following question:
`What is Title, when Season is less than 1.8, and when First Broadcast is March 6, 1981?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episodes" (
"title" text,
"season" real,
"director" text,
"teleplay" text,
"first_broadcast" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Title, when Season is less than 1.8, and when First Broadcast is March 6, 1981?`:
```sql
|
SELECT "director" FROM "episodes" WHERE "season"=1.4; |
## Task
Generate a SQL query to answer the following question:
`What is Director, when Season is 1.4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episodes" (
"title" text,
"season" real,
"director" text,
"teleplay" text,
"first_broadcast" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Director, when Season is 1.4?`:
```sql
|
SELECT "teleplay" FROM "episodes" WHERE "director"='george mccowan' AND "season"<1.1400000000000001 AND "first_broadcast"='april 3, 1981'; |
## Task
Generate a SQL query to answer the following question:
`What is Teleplay, when Director is "George McCowan", when Season is less than 1.1400000000000001, and when First Broadcast is April 3, 1981?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episodes" (
"title" text,
"season" real,
"director" text,
"teleplay" text,
"first_broadcast" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Teleplay, when Director is "George McCowan", when Season is less than 1.1400000000000001, and when First Broadcast is April 3, 1981?`:
```sql
|
SELECT AVG("season") FROM "episodes" WHERE "first_broadcast"='january 23, 1981'; |
## Task
Generate a SQL query to answer the following question:
`What is the average Season, when First Broadcast is January 23, 1981?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episodes" (
"title" text,
"season" real,
"director" text,
"teleplay" text,
"first_broadcast" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Season, when First Broadcast is January 23, 1981?`:
```sql
|
SELECT "teleplay" FROM "episodes" WHERE "first_broadcast"='april 10, 1981'; |
## Task
Generate a SQL query to answer the following question:
`What is Teleplay, when First Broadcast is April 10, 1981?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episodes" (
"title" text,
"season" real,
"director" text,
"teleplay" text,
"first_broadcast" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Teleplay, when First Broadcast is April 10, 1981?`:
```sql
|
SELECT "h_a" FROM "pre_season_and_friendlies" WHERE "opponents"='bohemians'; |
## Task
Generate a SQL query to answer the following question:
`What the H/A when the opponent is the Bohemians?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season_and_friendlies" (
"date" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What the H/A when the opponent is the Bohemians?`:
```sql
|
SELECT AVG("attendance") FROM "pre_season_and_friendlies" WHERE "opponents"='cork city'; |
## Task
Generate a SQL query to answer the following question:
`What is the attendance when Cork City is the opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season_and_friendlies" (
"date" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the attendance when Cork City is the opponent?`:
```sql
|
SELECT "h_a" FROM "pre_season_and_friendlies" WHERE "opponents"='cork city'; |
## Task
Generate a SQL query to answer the following question:
`What is the H/A when Cork City is the opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season_and_friendlies" (
"date" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the H/A when Cork City is the opponent?`:
```sql
|
SELECT "h_a" FROM "pre_season_and_friendlies" WHERE "date"='5 august 1990'; |
## Task
Generate a SQL query to answer the following question:
`What is the H/A on 5 August 1990?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season_and_friendlies" (
"date" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the H/A on 5 August 1990?`:
```sql
|
SELECT "result_f_a" FROM "pre_season_and_friendlies" WHERE "date"='5 august 1990'; |
## Task
Generate a SQL query to answer the following question:
`What is the result F-A on 5 August 1990?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season_and_friendlies" (
"date" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result F-A on 5 August 1990?`:
```sql
|
SELECT "internal_floppy_disk" FROM "cromemco_s_100_microcomputer_systems_z_8" WHERE "s_100_slots">8 AND "year_introduced"<1978; |
## Task
Generate a SQL query to answer the following question:
`What is the value for internal floppy disk with s-100 slots greater than 8 introduced earlier than 1978?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cromemco_s_100_microcomputer_systems_z_8" (
"system" text,
"year_introduced" real,
"s_100_slots" real,
"internal_floppy_disk" text,
"internal_hard_disk" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the value for internal floppy disk with s-100 slots greater than 8 introduced earlier than 1978?`:
```sql
|
SELECT "system" FROM "cromemco_s_100_microcomputer_systems_z_8" WHERE "s_100_slots"<21 AND "year_introduced"<1981 AND "internal_hard_disk"='11 megabytes'; |
## Task
Generate a SQL query to answer the following question:
`Which system introduced earlier than 1981 has an internal hard disk of 11 megabytes and less than 21 s-100 slots?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cromemco_s_100_microcomputer_systems_z_8" (
"system" text,
"year_introduced" real,
"s_100_slots" real,
"internal_floppy_disk" text,
"internal_hard_disk" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which system introduced earlier than 1981 has an internal hard disk of 11 megabytes and less than 21 s-100 slots?`:
```sql
|
SELECT "college" FROM "nfl_draft" WHERE "player"='marcus wilson'; |
## Task
Generate a SQL query to answer the following question:
`What college did Marcus Wilson attend?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"pick_num" real,
"nfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What college did Marcus Wilson attend?`:
```sql
|
SELECT "player" FROM "nfl_draft" WHERE "pick_num"<304 AND "college"='notre dame'; |
## Task
Generate a SQL query to answer the following question:
`Who is the player that attended Notre Dame with a pick smaller than 304?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"pick_num" real,
"nfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the player that attended Notre Dame with a pick smaller than 304?`:
```sql
|
SELECT "college" FROM "nfl_draft" WHERE "player"='leon perry'; |
## Task
Generate a SQL query to answer the following question:
`What college did Leon Perry attend?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"pick_num" real,
"nfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What college did Leon Perry attend?`:
```sql
|
SELECT "nfl_team" FROM "nfl_draft" WHERE "position"='tight end'; |
## Task
Generate a SQL query to answer the following question:
`What NFL team did the Tight End position belong to?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"pick_num" real,
"nfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What NFL team did the Tight End position belong to?`:
```sql
|
SELECT SUM("week") FROM "season_schedule" WHERE "opponent"='san diego chargers'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of weeks that the buffalo bills played against the San Diego Chargers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of weeks that the buffalo bills played against the San Diego Chargers?`:
```sql
|
SELECT "attendance" FROM "season_schedule" WHERE "date"='bye'; |
## Task
Generate a SQL query to answer the following question:
`What is the attendance of the game that had a date listed as Bye?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the attendance of the game that had a date listed as Bye?`:
```sql
|
SELECT SUM("week") FROM "season_schedule" WHERE "attendance"='41,384'; |
## Task
Generate a SQL query to answer the following question:
`How many weeks were there games with 41,384 fans in attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many weeks were there games with 41,384 fans in attendance?`:
```sql
|
SELECT MIN("week") FROM "season_schedule" WHERE "date"='december 3, 1967'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest week number that had a game on December 3, 1967?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest week number that had a game on December 3, 1967?`:
```sql
|
SELECT "result" FROM "season_schedule" WHERE "attendance"='20,627'; |
## Task
Generate a SQL query to answer the following question:
`What was the result of the game that had 20,627 fans in attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of the game that had 20,627 fans in attendance?`:
```sql
|
SELECT "rider" FROM "moto_gp_classification" WHERE "laps"='22' AND "time_retired"='+19.435'; |
## Task
Generate a SQL query to answer the following question:
`Who is the rider with 22 laps and a +19.435 time/retired?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "moto_gp_classification" (
"rider" text,
"manufacturer" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the rider with 22 laps and a +19.435 time/retired?`:
```sql
|
SELECT "grid" FROM "moto_gp_classification" WHERE "manufacturer"='yamaha' AND "time_retired"='+19.435'; |
## Task
Generate a SQL query to answer the following question:
`What is the grid with a yamaha manufacturer and a +19.435 time/retired?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "moto_gp_classification" (
"rider" text,
"manufacturer" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the grid with a yamaha manufacturer and a +19.435 time/retired?`:
```sql
|
SELECT "grid" FROM "moto_gp_classification" WHERE "rider"='shinya nakano'; |
## Task
Generate a SQL query to answer the following question:
`What is the grid of rider shinya nakano?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "moto_gp_classification" (
"rider" text,
"manufacturer" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the grid of rider shinya nakano?`:
```sql
|
SELECT "rider" FROM "moto_gp_classification" WHERE "laps"='22' AND "time_retired"='+1:44.775'; |
## Task
Generate a SQL query to answer the following question:
`Who is the rider with 22 laps and a +1:44.775 time/retired?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "moto_gp_classification" (
"rider" text,
"manufacturer" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the rider with 22 laps and a +1:44.775 time/retired?`:
```sql
|
SELECT "manufacturer" FROM "moto_gp_classification" WHERE "grid"='14'; |
## Task
Generate a SQL query to answer the following question:
`What is the manufacturer with a 14 grid?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "moto_gp_classification" (
"rider" text,
"manufacturer" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the manufacturer with a 14 grid?`:
```sql
|
SELECT "rider" FROM "moto_gp_classification" WHERE "manufacturer"='yamaha' AND "grid"='17'; |
## Task
Generate a SQL query to answer the following question:
`Who is the rider with a yamaha manufacturer and a 17 grid?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "moto_gp_classification" (
"rider" text,
"manufacturer" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the rider with a yamaha manufacturer and a 17 grid?`:
```sql
|
SELECT SUM("attendance") FROM "uefa_champions_league" WHERE "venue"='h' AND "opponent"='auxerre'; |
## Task
Generate a SQL query to answer the following question:
`What is the total of attendance at Venue h when Auxerre were playing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "uefa_champions_league" (
"date" text,
"round" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total of attendance at Venue h when Auxerre were playing?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.