output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "record" FROM "game_log" WHERE "date"='february 27'; |
## Task
Generate a SQL query to answer the following question:
`Name the record for february 27`
### 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 `Name the record for february 27`:
```sql
|
SELECT "team" FROM "game_log" WHERE "game"=48; |
## Task
Generate a SQL query to answer the following question:
`Name the team for 48 game`
### 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 `Name the team for 48 game`:
```sql
|
SELECT AVG("share") FROM "weekly_ratings" WHERE "rank_timeslot">3 AND "viewers_m"<4.87; |
## Task
Generate a SQL query to answer the following question:
`What's the average of shows that had a timeslot rank greater that 3 but still had a smaller viewership less than 4.87?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_ratings" (
"episode" text,
"air_date" text,
"timeslot" text,
"rating" real,
"share" real,
"18_49_rating_share" text,
"viewers_m" real,
"rank_timeslot" real,
"rank_night" real,
"rank_overall" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the average of shows that had a timeslot rank greater that 3 but still had a smaller viewership less than 4.87?`:
```sql
|
SELECT "division" FROM "statistics" WHERE "conference"='afc' AND "wins"=10 AND "appearances">18; |
## Task
Generate a SQL query to answer the following question:
`Which division in the AFC Conference had a total of 10 wins and appeared more than 18 times?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics" (
"conference" text,
"division" text,
"appearances" real,
"wins" real,
"losses" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which division in the AFC Conference had a total of 10 wins and appeared more than 18 times?`:
```sql
|
SELECT MIN("wins") FROM "statistics" WHERE "division"='east' AND "losses"=8 AND "appearances"<18; |
## Task
Generate a SQL query to answer the following question:
`How many losses did the East Division have who appeared 18 times and lost 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics" (
"conference" text,
"division" text,
"appearances" real,
"wins" real,
"losses" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many losses did the East Division have who appeared 18 times and lost 8?`:
```sql
|
SELECT "losses" FROM "statistics" WHERE "appearances"<16; |
## Task
Generate a SQL query to answer the following question:
`How many losses did the division who appeared less than 16 times have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics" (
"conference" text,
"division" text,
"appearances" real,
"wins" real,
"losses" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many losses did the division who appeared less than 16 times have?`:
```sql
|
SELECT SUM("total") FROM "medal_count" WHERE "silver"='1' AND "nation"='spain'; |
## Task
Generate a SQL query to answer the following question:
`How many medals for spain with 1 silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"nation" text,
"gold" text,
"silver" text,
"bronze" text,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many medals for spain with 1 silver?`:
```sql
|
SELECT "silver" FROM "medal_count" WHERE "nation"='finland'; |
## Task
Generate a SQL query to answer the following question:
`How many silvers for finland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"nation" text,
"gold" text,
"silver" text,
"bronze" text,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many silvers for finland?`:
```sql
|
SELECT COUNT("total") FROM "medal_count" WHERE "silver"='1' AND "bronze"='1' AND "nation"='spain'; |
## Task
Generate a SQL query to answer the following question:
`How many medals for spain that has 1 silver and 1 bronze?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"nation" text,
"gold" text,
"silver" text,
"bronze" text,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many medals for spain that has 1 silver and 1 bronze?`:
```sql
|
SELECT "record" FROM "regular_season" WHERE "points"<98 AND "opponent"='canucks'; |
## Task
Generate a SQL query to answer the following question:
`What is the record when they play the canucks and have under 98 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text,
"arena" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record when they play the canucks and have under 98 points?`:
```sql
|
SELECT AVG("attendance") FROM "regular_season" WHERE "points">86 AND "opponent"='sharks'; |
## Task
Generate a SQL query to answer the following question:
`How many attended the game against the sharks with over 86 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text,
"arena" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many attended the game against the sharks with over 86 points?`:
```sql
|
SELECT "recorded" FROM "track_listing" WHERE "track">7 AND "translation"='death'; |
## Task
Generate a SQL query to answer the following question:
`Name the song that has a track larger than 7 and means death.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"track" real,
"title" text,
"translation" text,
"composer" text,
"recorded" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the song that has a track larger than 7 and means death.`:
```sql
|
SELECT "title" FROM "track_listing" WHERE "recorded"='1959-09-15' AND "track"=7; |
## Task
Generate a SQL query to answer the following question:
`Which track 7 title was recorded in 1959-09-15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"track" real,
"title" text,
"translation" text,
"composer" text,
"recorded" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which track 7 title was recorded in 1959-09-15?`:
```sql
|
SELECT "track" FROM "track_listing" WHERE "translation"='flemish women'; |
## Task
Generate a SQL query to answer the following question:
`Which track translates to Flemish Women?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"track" real,
"title" text,
"translation" text,
"composer" text,
"recorded" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which track translates to Flemish Women?`:
```sql
|
SELECT MAX("capacity") FROM "attendances" WHERE "average"<489 AND "highest">778; |
## Task
Generate a SQL query to answer the following question:
`What is the high capacity that has an average under 489 and a highest over 778?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "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 `What is the high capacity that has an average under 489 and a highest over 778?`:
```sql
|
SELECT "other_performer_s" FROM "music_videos" WHERE "director_s"='melina matsoukas' AND "album"='loud'; |
## Task
Generate a SQL query to answer the following question:
`On the album titled “Loud” who was the other performer on the song directed by Melina Matsoukas?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "music_videos" (
"title" text,
"other_performer_s" text,
"director_s" text,
"album" text,
"year" real
);
### SQL
Given the database schema, here is the SQL query that answers `On the album titled “Loud” who was the other performer on the song directed by Melina Matsoukas?`:
```sql
|
SELECT "decision" FROM "october" WHERE "home"='vancouver' AND "visitor"='winnipeg'; |
## Task
Generate a SQL query to answer the following question:
`What is the decision when vancouver is at home and winnipeg is away?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "october" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the decision when vancouver is at home and winnipeg is away?`:
```sql
|
SELECT "record" FROM "october" WHERE "home"='chicago'; |
## Task
Generate a SQL query to answer the following question:
`What is the record of the team from chicago?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "october" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record of the team from chicago?`:
```sql
|
SELECT "venue" FROM "round_18" WHERE "away_team"='st kilda'; |
## Task
Generate a SQL query to answer the following question:
`Where was the away team st kilda?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where was the away team st kilda?`:
```sql
|
SELECT "club_province" FROM "2007_rugby_world_cup_squads" WHERE "caps"=1; |
## Task
Generate a SQL query to answer the following question:
`Which club has 1 cap?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007_rugby_world_cup_squads" (
"player" text,
"position" text,
"date_of_birth_age" text,
"caps" real,
"club_province" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which club has 1 cap?`:
```sql
|
SELECT "position" FROM "2007_rugby_world_cup_squads" WHERE "club_province"='meralomas' AND "player"='david biddle'; |
## Task
Generate a SQL query to answer the following question:
`Which position has a club of Meralomas and a player named David Biddle?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007_rugby_world_cup_squads" (
"player" text,
"position" text,
"date_of_birth_age" text,
"caps" real,
"club_province" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which position has a club of Meralomas and a player named David Biddle?`:
```sql
|
SELECT AVG("caps") FROM "2007_rugby_world_cup_squads" WHERE "club_province"='meralomas' AND "position"='centre'; |
## Task
Generate a SQL query to answer the following question:
`What is the average number of caps for Meralomas with positions of centre?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007_rugby_world_cup_squads" (
"player" text,
"position" text,
"date_of_birth_age" text,
"caps" real,
"club_province" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of caps for Meralomas with positions of centre?`:
```sql
|
SELECT "scorers" FROM "games_for_zrinjski_in_european_competiti" WHERE "score"='9-2'; |
## Task
Generate a SQL query to answer the following question:
`Who are the scorers when the score is 9-2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "games_for_zrinjski_in_european_competiti" (
"date" text,
"venue" text,
"opponent" text,
"score" text,
"scorers" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the scorers when the score is 9-2?`:
```sql
|
SELECT MIN("population") FROM "list_of_municipalities_in_quebec" WHERE "region">9; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest population in a region greater than 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_municipalities_in_quebec" (
"code" real,
"type" text,
"name" text,
"area_km_2" real,
"population" real,
"regional_county_municipality" text,
"region" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest population in a region greater than 9?`:
```sql
|
SELECT AVG("area_km_2") FROM "list_of_municipalities_in_quebec" WHERE "code"=98030 AND "population">312; |
## Task
Generate a SQL query to answer the following question:
`What is the average area for code 98030 with population over 312?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_municipalities_in_quebec" (
"code" real,
"type" text,
"name" text,
"area_km_2" real,
"population" real,
"regional_county_municipality" text,
"region" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average area for code 98030 with population over 312?`:
```sql
|
SELECT "attendance" FROM "game_log" WHERE "date"='may 28'; |
## Task
Generate a SQL query to answer the following question:
`What is the attendance on may 28?`
### 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,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the attendance on may 28?`:
```sql
|
SELECT "runner_s_up" FROM "japan_golf_tour_wins_10" WHERE "date"='4 oct 2009'; |
## Task
Generate a SQL query to answer the following question:
`On the Date of 4 Oct 2009, who was the Runner(s)-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "japan_golf_tour_wins_10" (
"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 `On the Date of 4 Oct 2009, who was the Runner(s)-up?`:
```sql
|
SELECT "runner_s_up" FROM "japan_golf_tour_wins_10" WHERE "date"='2 aug 2009'; |
## Task
Generate a SQL query to answer the following question:
`On the Date of 2 Aug 2009, who was the Runner(s)-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "japan_golf_tour_wins_10" (
"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 `On the Date of 2 Aug 2009, who was the Runner(s)-up?`:
```sql
|
SELECT "tournament" FROM "japan_golf_tour_wins_10" WHERE "date"='6 sep 2009'; |
## Task
Generate a SQL query to answer the following question:
`Which Tournament was on the Date 6 Sep 2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "japan_golf_tour_wins_10" (
"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 `Which Tournament was on the Date 6 Sep 2009?`:
```sql
|
SELECT "winning_score" FROM "japan_golf_tour_wins_10" WHERE "tournament"='mynavi abc championship'; |
## Task
Generate a SQL query to answer the following question:
`What was the Winning score for the Mynavi ABC Championship Tournament?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "japan_golf_tour_wins_10" (
"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 was the Winning score for the Mynavi ABC Championship Tournament?`:
```sql
|
SELECT "winning_score" FROM "japan_golf_tour_wins_10" WHERE "margin_of_victory"='5 strokes' AND "date"='6 sep 2009'; |
## Task
Generate a SQL query to answer the following question:
`What was the Winning score when the Margin of victory is 5 strokes and the Date was 6 Sep 2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "japan_golf_tour_wins_10" (
"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 was the Winning score when the Margin of victory is 5 strokes and the Date was 6 Sep 2009?`:
```sql
|
SELECT "runner_s_up" FROM "japan_golf_tour_wins_10" WHERE "date"='4 oct 2009'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Runner(s)-up on the Date 4 Oct 2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "japan_golf_tour_wins_10" (
"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 `Who was the Runner(s)-up on the Date 4 Oct 2009?`:
```sql
|
SELECT "score" FROM "2009" WHERE "third_place"='stefan edberg'; |
## Task
Generate a SQL query to answer the following question:
`What is the score with third place of stefan edberg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009" (
"tournament" text,
"winner" text,
"runner_up" text,
"score" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score with third place of stefan edberg?`:
```sql
|
SELECT "runner_up" FROM "2009" WHERE "tournament"='algarve'; |
## Task
Generate a SQL query to answer the following question:
`Name the runner-up for algarve tournament`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009" (
"tournament" text,
"winner" text,
"runner_up" text,
"score" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the runner-up for algarve tournament`:
```sql
|
SELECT "tournament" FROM "2009" WHERE "third_place"='magnus gustafsson'; |
## Task
Generate a SQL query to answer the following question:
`I want to know the tournament that has a third place of magnus gustafsson`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009" (
"tournament" text,
"winner" text,
"runner_up" text,
"score" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want to know the tournament that has a third place of magnus gustafsson`:
```sql
|
SELECT "winner" FROM "2009" WHERE "third_place"='fernando meligeni'; |
## Task
Generate a SQL query to answer the following question:
`Who was the winner when the third place was fernando meligeni?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009" (
"tournament" text,
"winner" text,
"runner_up" text,
"score" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the winner when the third place was fernando meligeni?`:
```sql
|
SELECT "tournament" FROM "2009" WHERE "winner"='patrick rafter'; |
## Task
Generate a SQL query to answer the following question:
`Name the tournament for patrick rafter winning`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009" (
"tournament" text,
"winner" text,
"runner_up" text,
"score" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the tournament for patrick rafter winning`:
```sql
|
SELECT "owner" FROM "winners_of_the_barbaro_stakes_since_1993" WHERE "trainer"='nick zito' AND "year"='1996'; |
## Task
Generate a SQL query to answer the following question:
`Who was the owner in 1996 of trainer Nick Zito?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners_of_the_barbaro_stakes_since_1993" (
"year" text,
"winner" text,
"jockey" text,
"trainer" text,
"owner" text,
"distance" text,
"time" text,
"purse" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the owner in 1996 of trainer Nick Zito?`:
```sql
|
SELECT "year" FROM "winners_of_the_barbaro_stakes_since_1993" WHERE "distance"='1-1/16' AND "jockey"='ramon dominguez'; |
## Task
Generate a SQL query to answer the following question:
`What year did jockey Ramon Dominguez have a distance of 1-1/16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners_of_the_barbaro_stakes_since_1993" (
"year" text,
"winner" text,
"jockey" text,
"trainer" text,
"owner" text,
"distance" text,
"time" text,
"purse" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year did jockey Ramon Dominguez have a distance of 1-1/16?`:
```sql
|
SELECT "owner" FROM "winners_of_the_barbaro_stakes_since_1993" WHERE "trainer"='steve klesaris'; |
## Task
Generate a SQL query to answer the following question:
`Who was the owner of the trainer Steve Klesaris?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners_of_the_barbaro_stakes_since_1993" (
"year" text,
"winner" text,
"jockey" text,
"trainer" text,
"owner" text,
"distance" text,
"time" text,
"purse" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the owner of the trainer Steve Klesaris?`:
```sql
|
SELECT "owner" FROM "winners_of_the_barbaro_stakes_since_1993" WHERE "winner"='raglan road'; |
## Task
Generate a SQL query to answer the following question:
`Who is the owner of the Raglan Road winner?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners_of_the_barbaro_stakes_since_1993" (
"year" text,
"winner" text,
"jockey" text,
"trainer" text,
"owner" text,
"distance" text,
"time" text,
"purse" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the owner of the Raglan Road winner?`:
```sql
|
SELECT "year" FROM "winners_of_the_barbaro_stakes_since_1993" WHERE "winner"='burning roma'; |
## Task
Generate a SQL query to answer the following question:
`What year was Burning Roma the winner?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners_of_the_barbaro_stakes_since_1993" (
"year" text,
"winner" text,
"jockey" text,
"trainer" text,
"owner" text,
"distance" text,
"time" text,
"purse" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was Burning Roma the winner?`:
```sql
|
SELECT "win_loss" FROM "honour_board" WHERE "coach"='peter german'; |
## Task
Generate a SQL query to answer the following question:
`What is the win/loss of coach Peter German?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "honour_board" (
"season" real,
"position" real,
"win_loss" text,
"coach" text,
"captain" text,
"dudley_tuckey_medal" text,
"leading_goalkicker" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the win/loss of coach Peter German?`:
```sql
|
SELECT "home_team" FROM "round_14" WHERE "home_team_score"='9.8 (62)'; |
## Task
Generate a SQL query to answer the following question:
`Name the home team scored 9.8 (62)`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_14" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the home team scored 9.8 (62)`:
```sql
|
SELECT "tyres" FROM "complete_24_hours_of_le_mans_results" WHERE "year"<1995 AND "laps"=142; |
## Task
Generate a SQL query to answer the following question:
`Which tyre was before 1995 with 142 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_24_hours_of_le_mans_results" (
"year" real,
"class" text,
"tyres" text,
"team" text,
"co_drivers" text,
"laps" real,
"pos" text,
"class_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which tyre was before 1995 with 142 laps?`:
```sql
|
SELECT "tyres" FROM "complete_24_hours_of_le_mans_results" WHERE "laps">5 AND "team"='nissan motorsports international'; |
## Task
Generate a SQL query to answer the following question:
`Which tyres has more than 5 laps with team nissan motorsports international?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_24_hours_of_le_mans_results" (
"year" real,
"class" text,
"tyres" text,
"team" text,
"co_drivers" text,
"laps" real,
"pos" text,
"class_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which tyres has more than 5 laps with team nissan motorsports international?`:
```sql
|
SELECT "pos" FROM "complete_24_hours_of_le_mans_results" WHERE "tyres"='m' AND "laps">352; |
## Task
Generate a SQL query to answer the following question:
`What position that has m tyres and 352 or more laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_24_hours_of_le_mans_results" (
"year" real,
"class" text,
"tyres" text,
"team" text,
"co_drivers" text,
"laps" real,
"pos" text,
"class_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `What position that has m tyres and 352 or more laps?`:
```sql
|
SELECT "team_2" FROM "relegation_playoffs" WHERE "1st_leg"='2-2'; |
## Task
Generate a SQL query to answer the following question:
`who is the team 2 when the 1st leg is 2-2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation_playoffs" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the team 2 when the 1st leg is 2-2?`:
```sql
|
SELECT "team_2" FROM "relegation_playoffs" WHERE "team_1"='sestese(e16)'; |
## Task
Generate a SQL query to answer the following question:
`who is the team 2 when the team 1 is sestese(e16)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation_playoffs" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the team 2 when the team 1 is sestese(e16)?`:
```sql
|
SELECT "team_2" FROM "relegation_playoffs" WHERE "2nd_leg"='3-4'; |
## Task
Generate a SQL query to answer the following question:
`who is the team 2 when the 2nd leg is 3-4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation_playoffs" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the team 2 when the 2nd leg is 3-4?`:
```sql
|
SELECT "team_2" FROM "relegation_playoffs" WHERE "1st_leg"='1-1' AND "team_1"='verucchio(f15)'; |
## Task
Generate a SQL query to answer the following question:
`who is the team 2 when the 1st leg is 1-1 and the team 1 is verucchio(f15)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation_playoffs" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the team 2 when the 1st leg is 1-1 and the team 1 is verucchio(f15)?`:
```sql
|
SELECT MAX("base_pairs") FROM "list_of_sequenced_bacterial_genomes" WHERE "strain"='unspecified'; |
## Task
Generate a SQL query to answer the following question:
`What is the largest base pair with a Strain of unspecified?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_sequenced_bacterial_genomes" (
"species" text,
"strain" text,
"type" text,
"base_pairs" real,
"genes" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest base pair with a Strain of unspecified?`:
```sql
|
SELECT MIN("base_pairs") FROM "list_of_sequenced_bacterial_genomes" WHERE "species"='borrelia garinii' AND "genes">832; |
## Task
Generate a SQL query to answer the following question:
`What is the lowst base pair with a Species of borrelia garinii, and a Genes larger than 832?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_sequenced_bacterial_genomes" (
"species" text,
"strain" text,
"type" text,
"base_pairs" real,
"genes" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowst base pair with a Species of borrelia garinii, and a Genes larger than 832?`:
```sql
|
SELECT "type" FROM "list_of_sequenced_bacterial_genomes" WHERE "species"='unspecified' AND "genes"<367; |
## Task
Generate a SQL query to answer the following question:
`What type has an unspecified species and less than 367 genes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_sequenced_bacterial_genomes" (
"species" text,
"strain" text,
"type" text,
"base_pairs" real,
"genes" real
);
### SQL
Given the database schema, here is the SQL query that answers `What type has an unspecified species and less than 367 genes?`:
```sql
|
SELECT "base_pairs" FROM "list_of_sequenced_bacterial_genomes" WHERE "genes"=832; |
## Task
Generate a SQL query to answer the following question:
`What base pair has 832 genes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_sequenced_bacterial_genomes" (
"species" text,
"strain" text,
"type" text,
"base_pairs" real,
"genes" real
);
### SQL
Given the database schema, here is the SQL query that answers `What base pair has 832 genes?`:
```sql
|
SELECT SUM("genes") FROM "list_of_sequenced_bacterial_genomes" WHERE "species"='leptospira interrogans' AND "base_pairs"<'4,277,185'; |
## Task
Generate a SQL query to answer the following question:
`How many genes have a Species of leptospira interrogans, and a Base Pairs smaller than 4,277,185?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_sequenced_bacterial_genomes" (
"species" text,
"strain" text,
"type" text,
"base_pairs" real,
"genes" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many genes have a Species of leptospira interrogans, and a Base Pairs smaller than 4,277,185?`:
```sql
|
SELECT "competition" FROM "scotland_national_team" WHERE "rank"=9; |
## Task
Generate a SQL query to answer the following question:
`Which competition was ranked 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scotland_national_team" (
"rank" real,
"date" text,
"stadium" text,
"opponent" text,
"competition" text,
"score_scotland_s_score_is_shown_first" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which competition was ranked 9?`:
```sql
|
SELECT "score_scotland_s_score_is_shown_first" FROM "scotland_national_team" WHERE "competition"='bhc' AND "rank"=3; |
## Task
Generate a SQL query to answer the following question:
`What was Scotland's score at the rank 3 Competition of BHC?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scotland_national_team" (
"rank" real,
"date" text,
"stadium" text,
"opponent" text,
"competition" text,
"score_scotland_s_score_is_shown_first" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Scotland's score at the rank 3 Competition of BHC?`:
```sql
|
SELECT SUM("drawn") FROM "all_time_table" WHERE "goals"='274-357'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of draws with 274-357 goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_table" (
"rank" real,
"club_1" text,
"seasons" real,
"spells" real,
"played_2" real,
"drawn" real,
"lost" real,
"goals" text,
"points_3" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of draws with 274-357 goals?`:
```sql
|
SELECT MIN("played_2") FROM "all_time_table" WHERE "lost">83 AND "seasons"=8 AND "club_1"='chernomorets novorossiysk' AND "drawn"<65; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest played 2 number with less than 83 losses and less than 65 draws with Chernomorets Novorossiysk in season 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_table" (
"rank" real,
"club_1" text,
"seasons" real,
"spells" real,
"played_2" real,
"drawn" real,
"lost" real,
"goals" text,
"points_3" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest played 2 number with less than 83 losses and less than 65 draws with Chernomorets Novorossiysk in season 8?`:
```sql
|
SELECT COUNT("rank") FROM "all_time_table" WHERE "goals"='562-506' AND "seasons"<13; |
## Task
Generate a SQL query to answer the following question:
`What is the rank number with 562-506 goals before season 13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_table" (
"rank" real,
"club_1" text,
"seasons" real,
"spells" real,
"played_2" real,
"drawn" real,
"lost" real,
"goals" text,
"points_3" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank number with 562-506 goals before season 13?`:
```sql
|
SELECT COUNT("seasons") FROM "all_time_table" WHERE "goals"='261-338' AND "lost">111; |
## Task
Generate a SQL query to answer the following question:
`How many seasons have goals of 261-338 with more than 111 losses?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_table" (
"rank" real,
"club_1" text,
"seasons" real,
"spells" real,
"played_2" real,
"drawn" real,
"lost" real,
"goals" text,
"points_3" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many seasons have goals of 261-338 with more than 111 losses?`:
```sql
|
SELECT MAX("seasons") FROM "all_time_table" WHERE "drawn"=57 AND "rank"=20 AND "spells">1; |
## Task
Generate a SQL query to answer the following question:
`What is the highest season number with 57 draws, rank 20, and more than 1 spell?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_table" (
"rank" real,
"club_1" text,
"seasons" real,
"spells" real,
"played_2" real,
"drawn" real,
"lost" real,
"goals" text,
"points_3" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest season number with 57 draws, rank 20, and more than 1 spell?`:
```sql
|
SELECT "result" FROM "international_goals" WHERE "venue"='doha'; |
## Task
Generate a SQL query to answer the following question:
`What was the results of the game at Doha?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the results of the game at Doha?`:
```sql
|
SELECT "score" FROM "international_goals" WHERE "competition"='1998 fifa world cup qualification'; |
## Task
Generate a SQL query to answer the following question:
`What was the score during the competition of 1998 fifa world cup qualification?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score during the competition of 1998 fifa world cup qualification?`:
```sql
|
SELECT "competition" FROM "international_goals" WHERE "date"='october 1, 1994'; |
## Task
Generate a SQL query to answer the following question:
`What is the competition that took place on October 1, 1994?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the competition that took place on October 1, 1994?`:
```sql
|
SELECT "competition" FROM "international_goals" WHERE "result"='2-2'; |
## Task
Generate a SQL query to answer the following question:
`What is the competition that had a 2-2 result?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the competition that had a 2-2 result?`:
```sql
|
SELECT "venue" FROM "international_goals" WHERE "result"='4-2'; |
## Task
Generate a SQL query to answer the following question:
`Where did the competition take place that had a 4-2 result?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did the competition take place that had a 4-2 result?`:
```sql
|
SELECT "venue" FROM "international_goals" WHERE "result"='5-1'; |
## Task
Generate a SQL query to answer the following question:
`Where was the competition that took place that had a 5-1 result?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where was the competition that took place that had a 5-1 result?`:
```sql
|
SELECT MAX("goals") FROM "1996_squad_statistics" WHERE "tries"<1 AND "position"='fullback'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the highest goals with tries less than 1 and fullback position`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1996_squad_statistics" (
"player" text,
"position" text,
"tries" real,
"goals" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the highest goals with tries less than 1 and fullback position`:
```sql
|
SELECT MIN("tries") FROM "1996_squad_statistics" WHERE "goals">0 AND "position"='centre' AND "points"<54; |
## Task
Generate a SQL query to answer the following question:
`Tell me the lowest tries for goals more than 0 with centre position and points less than 54`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1996_squad_statistics" (
"player" text,
"position" text,
"tries" real,
"goals" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the lowest tries for goals more than 0 with centre position and points less than 54`:
```sql
|
SELECT "player" FROM "1996_squad_statistics" WHERE "tries">1 AND "points"<54 AND "position"='hooker'; |
## Task
Generate a SQL query to answer the following question:
`I want to know the player with tries more than 1 and position of hooker with points less than 54`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1996_squad_statistics" (
"player" text,
"position" text,
"tries" real,
"goals" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `I want to know the player with tries more than 1 and position of hooker with points less than 54`:
```sql
|
SELECT "player" FROM "1996_squad_statistics" WHERE "points">36 AND "goals">0 AND "tries"=12; |
## Task
Generate a SQL query to answer the following question:
`Tell me the player with points larger than 36 and goals more than 0 with tries of 12`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1996_squad_statistics" (
"player" text,
"position" text,
"tries" real,
"goals" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the player with points larger than 36 and goals more than 0 with tries of 12`:
```sql
|
SELECT "tournament" FROM "singles_performance_timeline" WHERE "2010"='olympic games'; |
## Task
Generate a SQL query to answer the following question:
`What Tournament was the 2010 Olympic Games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Tournament was the 2010 Olympic Games?`:
```sql
|
SELECT "width" FROM "current_fleet" WHERE "entered_service"=2010; |
## Task
Generate a SQL query to answer the following question:
`Which width had an entered service year of 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_fleet" (
"ship" text,
"built" real,
"entered_service" real,
"route" text,
"gross_tonnage" text,
"length" text,
"width" text,
"passengers" real,
"vessels" real,
"knots" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which width had an entered service year of 2010?`:
```sql
|
SELECT MAX("built") FROM "current_fleet" WHERE "entered_service">2003 AND "knots"<27; |
## Task
Generate a SQL query to answer the following question:
`What is the most recent built year when the year of entering service was more recent than 2003, and the knots is less than 27?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_fleet" (
"ship" text,
"built" real,
"entered_service" real,
"route" text,
"gross_tonnage" text,
"length" text,
"width" text,
"passengers" real,
"vessels" real,
"knots" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the most recent built year when the year of entering service was more recent than 2003, and the knots is less than 27?`:
```sql
|
SELECT COUNT("knots") FROM "current_fleet" WHERE "ship"='ms moby vincent' AND "passengers"<1.6; |
## Task
Generate a SQL query to answer the following question:
`How many knots did the Ms Moby Vincent have when passengers was less than 1.6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_fleet" (
"ship" text,
"built" real,
"entered_service" real,
"route" text,
"gross_tonnage" text,
"length" text,
"width" text,
"passengers" real,
"vessels" real,
"knots" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many knots did the Ms Moby Vincent have when passengers was less than 1.6?`:
```sql
|
SELECT "venue" FROM "round_16" WHERE "away_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`Where did Richmond play as the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did Richmond play as the away team?`:
```sql
|
SELECT "attendance" FROM "game_log" WHERE "opponent"='phillies 1:15 pm' AND "date"='april 9'; |
## Task
Generate a SQL query to answer the following question:
`When the phillies 1:15 pm played on April 9, what was the attendance?`
### 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,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the phillies 1:15 pm played on April 9, what was the attendance?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "score"='5-1'; |
## Task
Generate a SQL query to answer the following question:
`When was there a score of 5-1?`
### 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,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was there a score of 5-1?`:
```sql
|
SELECT AVG("silver") FROM "medal_table" WHERE "bronze">1; |
## Task
Generate a SQL query to answer the following question:
`What is the average number of silvers for nations with over 1 bronze medal?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of silvers for nations with over 1 bronze medal?`:
```sql
|
SELECT "interregnum_ended" FROM "list_of_imperial_vicars_1437_1792" WHERE "count_palatine_of_saxony"='frederick augustus i, elector of saxony'; |
## Task
Generate a SQL query to answer the following question:
`What is the Interregnum ended for Count Palatine of Saxony of frederick augustus i, elector of saxony?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_imperial_vicars_1437_1792" (
"interregnum_began" text,
"interregnum_ended" text,
"duration" text,
"count_palatine_of_saxony" text,
"count_palatine_of_the_rhine" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Interregnum ended for Count Palatine of Saxony of frederick augustus i, elector of saxony?`:
```sql
|
SELECT "interregnum_ended" FROM "list_of_imperial_vicars_1437_1792" WHERE "count_palatine_of_saxony"='john george ii, elector of saxony'; |
## Task
Generate a SQL query to answer the following question:
`What is the Interregnum ended for Count Palatine of Saxony of john george ii, elector of saxony?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_imperial_vicars_1437_1792" (
"interregnum_began" text,
"interregnum_ended" text,
"duration" text,
"count_palatine_of_saxony" text,
"count_palatine_of_the_rhine" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Interregnum ended for Count Palatine of Saxony of john george ii, elector of saxony?`:
```sql
|
SELECT "duration" FROM "list_of_imperial_vicars_1437_1792" WHERE "count_palatine_of_the_rhine"='charles albert, elector of bavaria'; |
## Task
Generate a SQL query to answer the following question:
`What is the duration for Count Palatine of the Rhine of charles albert, elector of bavaria?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_imperial_vicars_1437_1792" (
"interregnum_began" text,
"interregnum_ended" text,
"duration" text,
"count_palatine_of_saxony" text,
"count_palatine_of_the_rhine" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the duration for Count Palatine of the Rhine of charles albert, elector of bavaria?`:
```sql
|
SELECT "count_palatine_of_the_rhine" FROM "list_of_imperial_vicars_1437_1792" WHERE "interregnum_began"='2 april 1657 death of ferdinand iii'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the Count Palatine of the Rhine with a Interregnum began of 2 april 1657 death of ferdinand iii?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_imperial_vicars_1437_1792" (
"interregnum_began" text,
"interregnum_ended" text,
"duration" text,
"count_palatine_of_saxony" text,
"count_palatine_of_the_rhine" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the Count Palatine of the Rhine with a Interregnum began of 2 april 1657 death of ferdinand iii?`:
```sql
|
SELECT "interregnum_ended" FROM "list_of_imperial_vicars_1437_1792" WHERE "duration"='3 months, 6 days'; |
## Task
Generate a SQL query to answer the following question:
`What is the Interregnum ended for the person with a Duration of 3 months, 6 days?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_imperial_vicars_1437_1792" (
"interregnum_began" text,
"interregnum_ended" text,
"duration" text,
"count_palatine_of_saxony" text,
"count_palatine_of_the_rhine" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Interregnum ended for the person with a Duration of 3 months, 6 days?`:
```sql
|
SELECT "crowd" FROM "round_5" WHERE "home_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What was the crowd size when the home team was Hawthorn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_5" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the crowd size when the home team was Hawthorn?`:
```sql
|
SELECT SUM("share") FROM "weekly_ratings" WHERE "timeslot"='8:30 p.m.' AND "air_date"='march 27, 2008' AND "rank_overall">65; |
## Task
Generate a SQL query to answer the following question:
`What is the total share with Timeslot of 8:30 p.m., anAir Date of march 27, 2008, and a Rank greater than 65?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_ratings" (
"episode" text,
"air_date" text,
"timeslot" text,
"rating" real,
"share" real,
"18_49_rating_share" text,
"viewers_m" real,
"rank_timeslot" real,
"rank_night" text,
"rank_overall" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total share with Timeslot of 8:30 p.m., anAir Date of march 27, 2008, and a Rank greater than 65?`:
```sql
|
SELECT "viewers_m" FROM "weekly_ratings" WHERE "air_date"='march 20, 2008' AND "18_49_rating_share"='2.3/7'; |
## Task
Generate a SQL query to answer the following question:
`How many viewers have an Air Date of march 20, 2008, and an 18-49 (Rating/Share) of 2.3/7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_ratings" (
"episode" text,
"air_date" text,
"timeslot" text,
"rating" real,
"share" real,
"18_49_rating_share" text,
"viewers_m" real,
"rank_timeslot" real,
"rank_night" text,
"rank_overall" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many viewers have an Air Date of march 20, 2008, and an 18-49 (Rating/Share) of 2.3/7?`:
```sql
|
SELECT COUNT("viewers_m") FROM "weekly_ratings" WHERE "rank_night"='n/a' AND "timeslot"='8:30 p.m.'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Viewers with a Rank (Night) of n/a, and a Timeslot of 8:30 p.m.?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_ratings" (
"episode" text,
"air_date" text,
"timeslot" text,
"rating" real,
"share" real,
"18_49_rating_share" text,
"viewers_m" real,
"rank_timeslot" real,
"rank_night" text,
"rank_overall" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Viewers with a Rank (Night) of n/a, and a Timeslot of 8:30 p.m.?`:
```sql
|
SELECT COUNT("attendance") FROM "april" WHERE "decision"='mclean' AND "home"='calgary'; |
## Task
Generate a SQL query to answer the following question:
`How many people attended the game when Calgary was the home team and the decision was McLean?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "april" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people attended the game when Calgary was the home team and the decision was McLean?`:
```sql
|
SELECT "record" FROM "april" WHERE "home"='los angeles'; |
## Task
Generate a SQL query to answer the following question:
`What is the record of the game when Los Angeles was the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "april" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record of the game when Los Angeles was the home team?`:
```sql
|
SELECT "record" FROM "april" WHERE "score"='1 – 5'; |
## Task
Generate a SQL query to answer the following question:
`What is the record of the game with a score of 1 – 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "april" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record of the game with a score of 1 – 5?`:
```sql
|
SELECT MIN("attendance") FROM "april" WHERE "home"='los angeles'; |
## Task
Generate a SQL query to answer the following question:
`What is the least number of people to attend a game when Los Angeles was the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "april" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least number of people to attend a game when Los Angeles was the home team?`:
```sql
|
SELECT "runner_up" FROM "2011" WHERE "tournament"='santiago'; |
## Task
Generate a SQL query to answer the following question:
`who is the runner- up when the tournament is santiago?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011" (
"tournament" text,
"winner" text,
"runner_up" text,
"score" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the runner- up when the tournament is santiago?`:
```sql
|
SELECT "score" FROM "2011" WHERE "runner_up"='richard krajicek'; |
## Task
Generate a SQL query to answer the following question:
`what is the score when the runner-up is richard krajicek?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011" (
"tournament" text,
"winner" text,
"runner_up" text,
"score" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the score when the runner-up is richard krajicek?`:
```sql
|
SELECT "tournament" FROM "2011" WHERE "score"='7-6(0), 6-3'; |
## Task
Generate a SQL query to answer the following question:
`what is the tournament when the score is 7-6(0), 6-3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011" (
"tournament" text,
"winner" text,
"runner_up" text,
"score" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the tournament when the score is 7-6(0), 6-3?`:
```sql
|
SELECT "third_place" FROM "2011" WHERE "tournament"='delray beach'; |
## Task
Generate a SQL query to answer the following question:
`who is third place when the tournament is delray beach?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011" (
"tournament" text,
"winner" text,
"runner_up" text,
"score" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is third place when the tournament is delray beach?`:
```sql
|
SELECT "score" FROM "international_goals" WHERE "competition"='continental qualifier' AND "date"='february 23, 2003'; |
## Task
Generate a SQL query to answer the following question:
`What was the score in the Continental Qualifier on February 23, 2003?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score in the Continental Qualifier on February 23, 2003?`:
```sql
|
SELECT "score" FROM "international_goals" WHERE "competition"='world cup qualifier'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the World Cup Qualifier?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score for the World Cup Qualifier?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.