output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "runner_s_up" FROM "european_tour_wins_5" WHERE "tournament"='alfred dunhill links championship'; |
## Task
Generate a SQL query to answer the following question:
`Who were the runners-up at the Alfred Dunhill Links Championship?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_tour_wins_5" (
"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 were the runners-up at the Alfred Dunhill Links Championship?`:
```sql
|
SELECT MAX("grid") FROM "classification" WHERE "laps">137 AND "rank"<8; |
## Task
Generate a SQL query to answer the following question:
`Name the highest grid for Laps more than 137 and rank is less than 8`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"grid" real,
"driver" text,
"constructor" text,
"qual" real,
"rank" real,
"laps" real,
"time_retired" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the highest grid for Laps more than 137 and rank is less than 8`:
```sql
|
SELECT COUNT("rank") FROM "classification" WHERE "grid"<20 AND "driver"='dick rathmann' AND "qual">130.92; |
## Task
Generate a SQL query to answer the following question:
`I want the total number of rank for Grid less than 20 and dick rathmann and Qual more than 130.92`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"grid" real,
"driver" text,
"constructor" text,
"qual" real,
"rank" real,
"laps" real,
"time_retired" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the total number of rank for Grid less than 20 and dick rathmann and Qual more than 130.92`:
```sql
|
SELECT "nation" FROM "medal_count" WHERE "gold"='1' AND "bronze"='1' AND "total"=2; |
## Task
Generate a SQL query to answer the following question:
`Which nation won 1 gold medal and 1 bronze, for a total of 2 medals?`
### 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 `Which nation won 1 gold medal and 1 bronze, for a total of 2 medals?`:
```sql
|
SELECT "leading_scorer" FROM "april" WHERE "home"='trail blazers'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the Leading scorer when the Home was the Trail blazers?`
### 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,
"leading_scorer" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the Leading scorer when the Home was the Trail blazers?`:
```sql
|
SELECT SUM("ngc_number") FROM "2501_2600" WHERE "object_type"='spiral galaxy' AND "right_ascension_j2000"='08h14m40.4s'; |
## Task
Generate a SQL query to answer the following question:
`I want the sum of NGC number for spiral galaxy and right acension of 08h14m40.4s`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2501_2600" (
"ngc_number" real,
"object_type" text,
"constellation" text,
"right_ascension_j2000" text,
"declination_j2000" text,
"apparent_magnitude" real
);
### SQL
Given the database schema, here is the SQL query that answers `I want the sum of NGC number for spiral galaxy and right acension of 08h14m40.4s`:
```sql
|
SELECT "right_ascension_j2000" FROM "2501_2600" WHERE "object_type"='open cluster' AND "ngc_number">2547; |
## Task
Generate a SQL query to answer the following question:
`Tell me the right ascension for open cluster and NGC number more than 2547`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2501_2600" (
"ngc_number" real,
"object_type" text,
"constellation" text,
"right_ascension_j2000" text,
"declination_j2000" text,
"apparent_magnitude" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the right ascension for open cluster and NGC number more than 2547`:
```sql
|
SELECT "constellation" FROM "2501_2600" WHERE "declination_j2000"='°45′' AND "right_ascension_j2000"='07h58m'; |
## Task
Generate a SQL query to answer the following question:
`I want the constellation for declination for °45′ and right ascension of 07h58m`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2501_2600" (
"ngc_number" real,
"object_type" text,
"constellation" text,
"right_ascension_j2000" text,
"declination_j2000" text,
"apparent_magnitude" real
);
### SQL
Given the database schema, here is the SQL query that answers `I want the constellation for declination for °45′ and right ascension of 07h58m`:
```sql
|
SELECT "ngc_number" FROM "2501_2600" WHERE "right_ascension_j2000"='08h11m13.6s'; |
## Task
Generate a SQL query to answer the following question:
`I want the NGC number for right ascension of 08h11m13.6s`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2501_2600" (
"ngc_number" real,
"object_type" text,
"constellation" text,
"right_ascension_j2000" text,
"declination_j2000" text,
"apparent_magnitude" real
);
### SQL
Given the database schema, here is the SQL query that answers `I want the NGC number for right ascension of 08h11m13.6s`:
```sql
|
SELECT AVG("crowd") FROM "round_13" WHERE "home_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What is the average crowd when the home team is north melbourne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"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 is the average crowd when the home team is north melbourne?`:
```sql
|
SELECT COUNT("crowd") FROM "round_13" WHERE "venue"='mcg'; |
## Task
Generate a SQL query to answer the following question:
`What is the crowd total at mcg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"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 is the crowd total at mcg?`:
```sql
|
SELECT AVG("mintage") FROM "canadian_wildlife_series" WHERE "animal"='red breasted nuthatch' AND "year"<2007; |
## Task
Generate a SQL query to answer the following question:
`How many Red Breasted Nuthatch coins created before 2007 were minted, on average?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "canadian_wildlife_series" (
"year" real,
"animal" text,
"artist" text,
"finish" text,
"mintage" real,
"issue_price" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Red Breasted Nuthatch coins created before 2007 were minted, on average?`:
```sql
|
SELECT SUM("year") FROM "canadian_wildlife_series" WHERE "animal"='downy woodpecker'; |
## Task
Generate a SQL query to answer the following question:
`What year was the downy woodpecker coin created?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "canadian_wildlife_series" (
"year" real,
"animal" text,
"artist" text,
"finish" text,
"mintage" real,
"issue_price" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was the downy woodpecker coin created?`:
```sql
|
SELECT "artist" FROM "canadian_wildlife_series" WHERE "year"<2010; |
## Task
Generate a SQL query to answer the following question:
`Which artist created coins before 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "canadian_wildlife_series" (
"year" real,
"animal" text,
"artist" text,
"finish" text,
"mintage" real,
"issue_price" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which artist created coins before 2010?`:
```sql
|
SELECT COUNT("game") FROM "game_log" WHERE "team"='boston'; |
## Task
Generate a SQL query to answer the following question:
`What is the game number against the team Boston?`
### 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 game number against the team Boston?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "game"=23; |
## Task
Generate a SQL query to answer the following question:
`What is the date of game 23?`
### 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 date of game 23?`:
```sql
|
SELECT "percent_of_slovenes_1951" FROM "twin_town" WHERE "village_german"='roach'; |
## Task
Generate a SQL query to answer the following question:
`What percentage of Slovenes lived in the village of Roach in 1951?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "twin_town" (
"village_german" text,
"village_slovenian" text,
"number_of_peoople_1991" real,
"percent_of_slovenes_1991" text,
"percent_of_slovenes_1951" text
);
### SQL
Given the database schema, here is the SQL query that answers `What percentage of Slovenes lived in the village of Roach in 1951?`:
```sql
|
SELECT "venue" FROM "round_15" WHERE "away_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`Which Venue has an Away team of south melbourne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_15" (
"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 `Which Venue has an Away team of south melbourne?`:
```sql
|
SELECT SUM("crowd") FROM "round_15" WHERE "away_team_score"='17.11 (113)'; |
## Task
Generate a SQL query to answer the following question:
`Which Crowd has an Away team score of 17.11 (113)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_15" (
"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 `Which Crowd has an Away team score of 17.11 (113)?`:
```sql
|
SELECT "venue" FROM "round_15" WHERE "home_team_score"='13.11 (89)'; |
## Task
Generate a SQL query to answer the following question:
`Which Venue has a Home team score of 13.11 (89)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_15" (
"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 `Which Venue has a Home team score of 13.11 (89)?`:
```sql
|
SELECT "away_team" FROM "round_6" WHERE "away_team_score"='21.10 (136)'; |
## Task
Generate a SQL query to answer the following question:
`Which Away team scored 21.10 (136)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"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 `Which Away team scored 21.10 (136)?`:
```sql
|
SELECT "away_team_score" FROM "round_6" WHERE "away_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What did the Melbourne team score in their away game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"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 did the Melbourne team score in their away game?`:
```sql
|
SELECT "home_team" FROM "round_6" WHERE "venue"='arden street oval'; |
## Task
Generate a SQL query to answer the following question:
`Which Home team plays at the arden street oval Venue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"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 `Which Home team plays at the arden street oval Venue?`:
```sql
|
SELECT "venue" FROM "round_6" WHERE "home_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What is Home team Venue for the hawthorn team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"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 is Home team Venue for the hawthorn team?`:
```sql
|
SELECT "home_team" FROM "round_6" WHERE "venue"='princes park'; |
## Task
Generate a SQL query to answer the following question:
`What Home team plays at the princes park Venue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"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 Home team plays at the princes park Venue?`:
```sql
|
SELECT "home_away" FROM "schedule" WHERE "opponent"='rattlers' AND "field"='united sports training center'; |
## Task
Generate a SQL query to answer the following question:
`Was the game against the Rattlers at the United Sports Training Center a home game or an away game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"home_away" text,
"field" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Was the game against the Rattlers at the United Sports Training Center a home game or an away game?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "field"='multi-sport field'; |
## Task
Generate a SQL query to answer the following question:
`What was the opponent for the game at Multi-sport Field?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"home_away" text,
"field" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the opponent for the game at Multi-sport Field?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "home_away"='away' AND "date"='august 4'; |
## Task
Generate a SQL query to answer the following question:
`What is the result of the away game played on August 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"home_away" text,
"field" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result of the away game played on August 4?`:
```sql
|
SELECT "field" FROM "schedule" WHERE "date"='july 12'; |
## Task
Generate a SQL query to answer the following question:
`On which field was the game played on July 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"home_away" text,
"field" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `On which field was the game played on July 12?`:
```sql
|
SELECT "venue" FROM "international_goals" WHERE "scored"=1 AND "competition"='2006 fifa world cup qualification'; |
## Task
Generate a SQL query to answer the following question:
`At what venue did Sigurd Rushfeldt score 1 point in the 2006 FIFA World Cup Qualification competition?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"result" text,
"competition" text,
"scored" real
);
### SQL
Given the database schema, here is the SQL query that answers `At what venue did Sigurd Rushfeldt score 1 point in the 2006 FIFA World Cup Qualification competition?`:
```sql
|
SELECT "date" FROM "international_goals" WHERE "scored"<2 AND "competition"='uefa euro 2004 qualifying'; |
## Task
Generate a SQL query to answer the following question:
`What date did Sigurd Rushfeldt score less than 2 points in the UEFA Euro 2004 qualifying competition?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"result" text,
"competition" text,
"scored" real
);
### SQL
Given the database schema, here is the SQL query that answers `What date did Sigurd Rushfeldt score less than 2 points in the UEFA Euro 2004 qualifying competition?`:
```sql
|
SELECT "tournament" FROM "doubles_10_5_5" WHERE "date"='february 17, 2002'; |
## Task
Generate a SQL query to answer the following question:
`What is the tournament on February 17, 2002?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_10_5_5" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the tournament on February 17, 2002?`:
```sql
|
SELECT MAX("goals") FROM "update_november_14_2012" WHERE "player"='mitsuo kato'; |
## Task
Generate a SQL query to answer the following question:
`How many goals does mitsuo kato have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "update_november_14_2012" (
"player" text,
"games" real,
"goals" real,
"first_games" text,
"last_games" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many goals does mitsuo kato have?`:
```sql
|
SELECT "engine" FROM "entries" WHERE "entrant"='scuderia ferrari' AND "driver"='raymond sommer'; |
## Task
Generate a SQL query to answer the following question:
`Which engine has the entrant scuderia ferrari and is driven by Raymond Sommer?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "entries" (
"driver" text,
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"tyre" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which engine has the entrant scuderia ferrari and is driven by Raymond Sommer?`:
```sql
|
SELECT "chassis" FROM "entries" WHERE "driver"='reg parnell'; |
## Task
Generate a SQL query to answer the following question:
`What Chassis does Reg Parnell drive?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "entries" (
"driver" text,
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"tyre" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Chassis does Reg Parnell drive?`:
```sql
|
SELECT "speed" FROM "junior_manx_grand_prix" WHERE "rank">8 AND "rider"='ryan mccay'; |
## Task
Generate a SQL query to answer the following question:
`What is Ryan McCay's speed that has a rank better than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "junior_manx_grand_prix" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Ryan McCay's speed that has a rank better than 8?`:
```sql
|
SELECT "team" FROM "junior_manx_grand_prix" WHERE "speed"='113.316mph'; |
## Task
Generate a SQL query to answer the following question:
`What's the name of the team that went 113.316mph?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "junior_manx_grand_prix" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the name of the team that went 113.316mph?`:
```sql
|
SELECT "team" FROM "junior_manx_grand_prix" WHERE "rank"<7 AND "rider"='matts nilsson'; |
## Task
Generate a SQL query to answer the following question:
`What's Matts Nilsson's team that's ranked better than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "junior_manx_grand_prix" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's Matts Nilsson's team that's ranked better than 7?`:
```sql
|
SELECT AVG("drop_zone_time") FROM "air_movement_table_mission_boston" WHERE "drop_zone"='n' AND "troop_carrier_group"='1st pathfinder prov.'; |
## Task
Generate a SQL query to answer the following question:
`What is the average drop zone time in the N drop zone for the 1st Pathfinder Prov.?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "air_movement_table_mission_boston" (
"serial" real,
"airborne_unit" text,
"troop_carrier_group" text,
"num_of_c_47s" real,
"uk_base" text,
"drop_zone" text,
"drop_zone_time" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average drop zone time in the N drop zone for the 1st Pathfinder Prov.?`:
```sql
|
SELECT "uk_base" FROM "air_movement_table_mission_boston" WHERE "airborne_unit"='pathfinders'; |
## Task
Generate a SQL query to answer the following question:
`Which UK Base has an airborne unit of Pathfinders?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "air_movement_table_mission_boston" (
"serial" real,
"airborne_unit" text,
"troop_carrier_group" text,
"num_of_c_47s" real,
"uk_base" text,
"drop_zone" text,
"drop_zone_time" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which UK Base has an airborne unit of Pathfinders?`:
```sql
|
SELECT "high_assists" FROM "playoffs" WHERE "game"=1; |
## Task
Generate a SQL query to answer the following question:
`What was the number of high assists for game 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the number of high assists for game 1?`:
```sql
|
SELECT "chief_judge" FROM "former_judges" WHERE "reason_for_termination"='retirement'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the chief judge which has reason for termination of retirement`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "former_judges" (
"state" text,
"born_died" text,
"active_service" text,
"chief_judge" text,
"senior_status" text,
"appointed_by" text,
"reason_for_termination" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the chief judge which has reason for termination of retirement`:
```sql
|
SELECT "high_assists" FROM "playoffs" WHERE "high_rebounds"='boozer (13)'; |
## Task
Generate a SQL query to answer the following question:
`For boozer (13) what is the high assists and high rebounds?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `For boozer (13) what is the high assists and high rebounds?`:
```sql
|
SELECT "score" FROM "playoffs" WHERE "game"<4 AND "high_points"='williams (28)'; |
## Task
Generate a SQL query to answer the following question:
`What is the score for the game that is less than 4 and a high points of williams (28)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score for the game that is less than 4 and a high points of williams (28)?`:
```sql
|
SELECT "athlete" FROM "wrestling" WHERE "round_3"='did not advance' AND "event"='76 kg'; |
## Task
Generate a SQL query to answer the following question:
`Which athlete in the 76 kg class, did not advance at the end of Round 3.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wrestling" (
"athlete" text,
"event" text,
"round_1" text,
"round_2" text,
"round_3" text,
"round_4" text,
"round_5" text,
"final" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which athlete in the 76 kg class, did not advance at the end of Round 3.`:
```sql
|
SELECT "owner" FROM "the_full_chart" WHERE "post_position"<4 AND "jockey"='todd pletcher'; |
## Task
Generate a SQL query to answer the following question:
`Who owns the horse with a post position of less than 4 with jockey todd pletcher?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "the_full_chart" (
"finish_position" text,
"lengths_behind" text,
"post_position" real,
"horse_name" text,
"trainer" text,
"jockey" text,
"owner" text,
"post_time_odds" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who owns the horse with a post position of less than 4 with jockey todd pletcher?`:
```sql
|
SELECT "jockey" FROM "the_full_chart" WHERE "horse_name"='hard spun'; |
## Task
Generate a SQL query to answer the following question:
`What jockey is on hard spun?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "the_full_chart" (
"finish_position" text,
"lengths_behind" text,
"post_position" real,
"horse_name" text,
"trainer" text,
"jockey" text,
"owner" text,
"post_time_odds" text
);
### SQL
Given the database schema, here is the SQL query that answers `What jockey is on hard spun?`:
```sql
|
SELECT "horse_name" FROM "the_full_chart" WHERE "jockey"='todd pletcher' AND "post_time_odds"='14.20-1'; |
## Task
Generate a SQL query to answer the following question:
`What horse does todd pletcher ride with odds of 14.20-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "the_full_chart" (
"finish_position" text,
"lengths_behind" text,
"post_position" real,
"horse_name" text,
"trainer" text,
"jockey" text,
"owner" text,
"post_time_odds" text
);
### SQL
Given the database schema, here is the SQL query that answers `What horse does todd pletcher ride with odds of 14.20-1?`:
```sql
|
SELECT "owner" FROM "the_full_chart" WHERE "lengths_behind"='5½'; |
## Task
Generate a SQL query to answer the following question:
`Who the Owner that has a Lengths Behind of 5½?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "the_full_chart" (
"finish_position" text,
"lengths_behind" text,
"post_position" real,
"horse_name" text,
"trainer" text,
"jockey" text,
"owner" text,
"post_time_odds" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who the Owner that has a Lengths Behind of 5½?`:
```sql
|
SELECT "date_of_birth_age" FROM "current_squad" WHERE "caps"='3' AND "name"='gabriel quak jun yi'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of birth and age of Gabriel Quak Jun Yi with 3 caps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_squad" (
"name" text,
"date_of_birth_age" text,
"club" text,
"caps" text,
"goals" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of birth and age of Gabriel Quak Jun Yi with 3 caps?`:
```sql
|
SELECT "club" FROM "current_squad" WHERE "name"='hafiz abu sujad'; |
## Task
Generate a SQL query to answer the following question:
`Which club is associated with Hafiz Abu Sujad?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_squad" (
"name" text,
"date_of_birth_age" text,
"club" text,
"caps" text,
"goals" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which club is associated with Hafiz Abu Sujad?`:
```sql
|
SELECT SUM("rank") FROM "medal_table" WHERE "nation"='west germany' AND "bronze">0; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of a rank whose nation is West Germany and has bronze larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of a rank whose nation is West Germany and has bronze larger than 0?`:
```sql
|
SELECT COUNT("bronze") FROM "medal_table" WHERE "total"<3 AND "nation"='poland' AND "rank">4; |
## Task
Generate a SQL query to answer the following question:
`What is the total of Bronze with a total smaller than 3, and a nation of Poland, and a rank larger than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total of Bronze with a total smaller than 3, and a nation of Poland, and a rank larger than 4?`:
```sql
|
SELECT "total_receipts" FROM "democrats" WHERE "money_raised_2_q"='$33,120,440'; |
## Task
Generate a SQL query to answer the following question:
`What were the total receipts when the money raised in 2Q was $33,120,440?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "democrats" (
"candidate" text,
"money_raised_2_q" text,
"loans_received_2_q" text,
"money_spent_2_q" text,
"total_receipts" text,
"cash_on_hand" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the total receipts when the money raised in 2Q was $33,120,440?`:
```sql
|
SELECT "money_spent_2_q" FROM "democrats" WHERE "total_receipts"='$1,117,566'; |
## Task
Generate a SQL query to answer the following question:
`How much money was spent in 2Q when the total receipts were $1,117,566?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "democrats" (
"candidate" text,
"money_raised_2_q" text,
"loans_received_2_q" text,
"money_spent_2_q" text,
"total_receipts" text,
"cash_on_hand" text
);
### SQL
Given the database schema, here is the SQL query that answers `How much money was spent in 2Q when the total receipts were $1,117,566?`:
```sql
|
SELECT "money_raised_2_q" FROM "democrats" WHERE "total_receipts"='$63,075,927'; |
## Task
Generate a SQL query to answer the following question:
`How much money was raised in the 2Q when the total receipts were $63,075,927?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "democrats" (
"candidate" text,
"money_raised_2_q" text,
"loans_received_2_q" text,
"money_spent_2_q" text,
"total_receipts" text,
"cash_on_hand" text
);
### SQL
Given the database schema, here is the SQL query that answers `How much money was raised in the 2Q when the total receipts were $63,075,927?`:
```sql
|
SELECT "cash_on_hand" FROM "democrats" WHERE "money_spent_2_q"='$16,042,388'; |
## Task
Generate a SQL query to answer the following question:
`How much cash was on hand when the money spent in the 2Q was $16,042,388?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "democrats" (
"candidate" text,
"money_raised_2_q" text,
"loans_received_2_q" text,
"money_spent_2_q" text,
"total_receipts" text,
"cash_on_hand" text
);
### SQL
Given the database schema, here is the SQL query that answers `How much cash was on hand when the money spent in the 2Q was $16,042,388?`:
```sql
|
SELECT AVG("laps") FROM "classification" WHERE "driver"='peter gethin' AND "grid"<25; |
## Task
Generate a SQL query to answer the following question:
`When the driver peter gethin has a grid less than 25, what is the average number of laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `When the driver peter gethin has a grid less than 25, what is the average number of laps?`:
```sql
|
SELECT AVG("laps") FROM "classification" WHERE "time_retired"='+ 2 laps' AND "driver"='mike hailwood' AND "grid">12; |
## Task
Generate a SQL query to answer the following question:
`When the driver mike hailwood has a grid greater than 12 and a Time/Retired of + 2 laps, what is the average number of laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `When the driver mike hailwood has a grid greater than 12 and a Time/Retired of + 2 laps, what is the average number of laps?`:
```sql
|
SELECT "home_team_score" FROM "round_4" WHERE "away_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`Which team was the home team when playing South Melbourne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"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 `Which team was the home team when playing South Melbourne?`:
```sql
|
SELECT "home_team_score" FROM "round_4" WHERE "away_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What did the home team when they played Richmond?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"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 did the home team when they played Richmond?`:
```sql
|
SELECT MAX("crowd") FROM "round_4" WHERE "away_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What was the crowd number when Hawthorn was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"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 number when Hawthorn was the away team?`:
```sql
|
SELECT "stage_reached" FROM "national_founders_cup" WHERE "venue"='edmonton green'; |
## Task
Generate a SQL query to answer the following question:
`What is the stage reached for venue edmonton green?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "national_founders_cup" (
"season" text,
"stage_reached" text,
"against" text,
"score" text,
"venue" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the stage reached for venue edmonton green?`:
```sql
|
SELECT AVG("round") FROM "2001_draft_picks" WHERE "club_team"='garmisch-partenkirchen riessersee sc (germany 2)'; |
## Task
Generate a SQL query to answer the following question:
`What is the average round for Club team of garmisch-partenkirchen riessersee sc (germany 2)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2001_draft_picks" (
"round" real,
"overall" real,
"player" text,
"nationality" text,
"club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average round for Club team of garmisch-partenkirchen riessersee sc (germany 2)?`:
```sql
|
SELECT "player" FROM "goal_to_win" WHERE "opponent"='st kilda' AND "team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What richmond player played against st kilda?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goal_to_win" (
"player" text,
"team" text,
"opponent" text,
"year" real,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What richmond player played against st kilda?`:
```sql
|
SELECT "player" FROM "goal_to_win" WHERE "year"=2000; |
## Task
Generate a SQL query to answer the following question:
`What player played in 2000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goal_to_win" (
"player" text,
"team" text,
"opponent" text,
"year" real,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What player played in 2000?`:
```sql
|
SELECT "year" FROM "goal_to_win" WHERE "opponent"='geelong' AND "player"='john roberts'; |
## Task
Generate a SQL query to answer the following question:
`What year for geelong player john roberts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goal_to_win" (
"player" text,
"team" text,
"opponent" text,
"year" real,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year for geelong player john roberts?`:
```sql
|
SELECT "authority" FROM "henderson_massey_local_board" WHERE "roll"=40; |
## Task
Generate a SQL query to answer the following question:
`What's the authority when the roll is 40?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "henderson_massey_local_board" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the authority when the roll is 40?`:
```sql
|
SELECT "authority" FROM "henderson_massey_local_board" WHERE "roll"<234 AND "area"='massey east'; |
## Task
Generate a SQL query to answer the following question:
`What's the authority when the roll is less than 234 for the massey east area?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "henderson_massey_local_board" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the authority when the roll is less than 234 for the massey east area?`:
```sql
|
SELECT "roll" FROM "henderson_massey_local_board" WHERE "decile">6 AND "name"='summerland primary'; |
## Task
Generate a SQL query to answer the following question:
`What's the roll for summerland primary when decile is over 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "henderson_massey_local_board" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the roll for summerland primary when decile is over 6?`:
```sql
|
SELECT "name" FROM "summary_table" WHERE "delivered"='1839/08'; |
## Task
Generate a SQL query to answer the following question:
`What is the name where the delivered date is 1839/08?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary_table" (
"l_cr_no" real,
"type" text,
"manufacturer" text,
"delivered" text,
"name" text,
"jt_cttee_no" real,
"1845_disposal" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name where the delivered date is 1839/08?`:
```sql
|
SELECT "original_u_s_air_date" FROM "episodes" WHERE "original_canadian_air_date"='december 9, 2007'; |
## Task
Generate a SQL query to answer the following question:
`What is the Original U.S. air-date for the Original Canadian air-date of december 9, 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episodes" (
"title" text,
"original_story_author" text,
"director" text,
"original_u_s_air_date" text,
"original_canadian_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Original U.S. air-date for the Original Canadian air-date of december 9, 2007?`:
```sql
|
SELECT "original_canadian_air_date" FROM "episodes" WHERE "director"='michael tolkin'; |
## Task
Generate a SQL query to answer the following question:
`What is the Original Canadian air-date that was directed by Michael Tolkin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episodes" (
"title" text,
"original_story_author" text,
"director" text,
"original_u_s_air_date" text,
"original_canadian_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Original Canadian air-date that was directed by Michael Tolkin?`:
```sql
|
SELECT "original_story_author" FROM "episodes" WHERE "title"='\" jerry was a man \"'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the author of " jerry was a man "?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episodes" (
"title" text,
"original_story_author" text,
"director" text,
"original_u_s_air_date" text,
"original_canadian_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the author of " jerry was a man "?`:
```sql
|
SELECT "original_canadian_air_date" FROM "episodes" WHERE "director"='mark rydell'; |
## Task
Generate a SQL query to answer the following question:
`What was the Original Canadian air-date for the episode directed by mark rydell?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episodes" (
"title" text,
"original_story_author" text,
"director" text,
"original_u_s_air_date" text,
"original_canadian_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Original Canadian air-date for the episode directed by mark rydell?`:
```sql
|
SELECT "home_team" FROM "round_8" WHERE "away_team_score"='8.9 (57)'; |
## Task
Generate a SQL query to answer the following question:
`Which home team faced an away team that scored 8.9 (57)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_8" (
"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 `Which home team faced an away team that scored 8.9 (57)?`:
```sql
|
SELECT "home_team" FROM "round_8" WHERE "venue"='junction oval'; |
## Task
Generate a SQL query to answer the following question:
`Which home team's venue is junction oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_8" (
"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 `Which home team's venue is junction oval?`:
```sql
|
SELECT "venue" FROM "round_8" WHERE "away_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`Which venue was melbourne the away team of?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_8" (
"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 `Which venue was melbourne the away team of?`:
```sql
|
SELECT "home_team_score" FROM "round_8" WHERE "away_team"='footscray'; |
## Task
Generate a SQL query to answer the following question:
`What was the home teams score against the away team footscray?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_8" (
"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 home teams score against the away team footscray?`:
```sql
|
SELECT AVG("long") FROM "wide_receivers" WHERE "player"='ramon richardson' AND "avg">5.5; |
## Task
Generate a SQL query to answer the following question:
`What is the average long that Ramon Richardson played and an average greater than 5.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wide_receivers" (
"player" text,
"rec" real,
"yards" real,
"avg" real,
"long" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average long that Ramon Richardson played and an average greater than 5.5?`:
```sql
|
SELECT MIN("yards") FROM "wide_receivers" WHERE "avg"<3; |
## Task
Generate a SQL query to answer the following question:
`Which has and average less than 3 and the lowest yards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wide_receivers" (
"player" text,
"rec" real,
"yards" real,
"avg" real,
"long" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which has and average less than 3 and the lowest yards?`:
```sql
|
SELECT AVG("rec") FROM "wide_receivers" WHERE "yards"=40 AND "avg">10; |
## Task
Generate a SQL query to answer the following question:
`What is the average rec that is greater than 10 and has 40 yards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wide_receivers" (
"player" text,
"rec" real,
"yards" real,
"avg" real,
"long" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average rec that is greater than 10 and has 40 yards?`:
```sql
|
SELECT "high_assists" FROM "game_log" WHERE "game"=31; |
## Task
Generate a SQL query to answer the following question:
`What was the high assists for game 31?`
### 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 was the high assists for game 31?`:
```sql
|
SELECT "team" FROM "game_log" WHERE "game"=39; |
## Task
Generate a SQL query to answer the following question:
`What team played in game 39?`
### 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 team played in game 39?`:
```sql
|
SELECT "location_attendance" FROM "game_log" WHERE "game"=42; |
## Task
Generate a SQL query to answer the following question:
`How many people attended game 42?`
### 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 `How many people attended game 42?`:
```sql
|
SELECT MAX("total") FROM "asian_youth_games" WHERE "sport"='shooting' AND "bronze"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Shooting Total with a Bronze less than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "asian_youth_games" (
"sport" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Shooting Total with a Bronze less than 0?`:
```sql
|
SELECT MIN("silver") FROM "asian_youth_games" WHERE "bronze">1 AND "sport"='total' AND "gold"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Silver in the Total Sport has less than 1 Gold and more than 1 Bronze?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "asian_youth_games" (
"sport" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Silver in the Total Sport has less than 1 Gold and more than 1 Bronze?`:
```sql
|
SELECT AVG("bronze") FROM "asian_youth_games" WHERE "sport"='football' AND "silver">1; |
## Task
Generate a SQL query to answer the following question:
`What is the football Bronze with more than 1 Silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "asian_youth_games" (
"sport" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the football Bronze with more than 1 Silver?`:
```sql
|
SELECT AVG("silver") FROM "asian_youth_games" WHERE "total">1 AND "gold"=1 AND "bronze">2; |
## Task
Generate a SQL query to answer the following question:
`With 1 Gold, more than 2 Bronze and Total greater than 1, what is the Silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "asian_youth_games" (
"sport" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `With 1 Gold, more than 2 Bronze and Total greater than 1, what is the Silver?`:
```sql
|
SELECT AVG("total") FROM "asian_youth_games" WHERE "silver">1 AND "sport"='total' AND "gold">1; |
## Task
Generate a SQL query to answer the following question:
`With more than 1 Gold and Silver and Total Sport, what is the Total?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "asian_youth_games" (
"sport" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `With more than 1 Gold and Silver and Total Sport, what is the Total?`:
```sql
|
SELECT "year" FROM "nascar_canadian_tire_series" WHERE "distance_duration"='44 laps' AND "driver"='robin buck'; |
## Task
Generate a SQL query to answer the following question:
`What year does robin buck go 44 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_canadian_tire_series" (
"year" real,
"date" text,
"driver" text,
"team" text,
"distance_duration" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year does robin buck go 44 laps?`:
```sql
|
SELECT COUNT("year") FROM "nascar_canadian_tire_series" WHERE "team"='wal-mart / tide'; |
## Task
Generate a SQL query to answer the following question:
`How many years does Team wal-mart / tide participate?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nascar_canadian_tire_series" (
"year" real,
"date" text,
"driver" text,
"team" text,
"distance_duration" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years does Team wal-mart / tide participate?`:
```sql
|
SELECT "score" FROM "international_career" WHERE "result"='11–0'; |
## Task
Generate a SQL query to answer the following question:
`Which score has a Result of 11–0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_career" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which score has a Result of 11–0?`:
```sql
|
SELECT "result" FROM "international_career" WHERE "score"='1–1'; |
## Task
Generate a SQL query to answer the following question:
`Which result has a Score of 1–1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_career" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which result has a Score of 1–1?`:
```sql
|
SELECT "score" FROM "international_career" WHERE "result"='11–0'; |
## Task
Generate a SQL query to answer the following question:
`Which score has a Result of 11–0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_career" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which score has a Result of 11–0?`:
```sql
|
SELECT "score" FROM "february" WHERE "record"='11-32-11'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the game with an 11-32-11 record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the game with an 11-32-11 record?`:
```sql
|
SELECT "home" FROM "february" WHERE "visitor"='new jersey' AND "record"='11-35-12'; |
## Task
Generate a SQL query to answer the following question:
`What is the home team of the game where New Jersey was the visitor team and the record was 11-35-12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home team of the game where New Jersey was the visitor team and the record was 11-35-12?`:
```sql
|
SELECT "visitor" FROM "february" WHERE "home"='chicago'; |
## Task
Generate a SQL query to answer the following question:
`What is the visitor team of the game with Chicago as the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the visitor team of the game with Chicago as the home team?`:
```sql
|
SELECT "score" FROM "february" WHERE "visitor"='new jersey' AND "date"='february 27'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the game on February 27 with New Jersey as the visitor team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the game on February 27 with New Jersey as the visitor team?`:
```sql
|
SELECT "home" FROM "february" WHERE "date"='february 3'; |
## Task
Generate a SQL query to answer the following question:
`What is the home team of the game on February 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home team of the game on February 3?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.