output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "attendance" FROM "scottish_football_league_challenge_cup_f" WHERE "score"='† 4–4 †'; |
## Task
Generate a SQL query to answer the following question:
`How many were in attendance when the score was † 4–4 †?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scottish_football_league_challenge_cup_f" (
"season" text,
"winner" text,
"score" text,
"runner_up" text,
"venue" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many were in attendance when the score was † 4–4 †?`:
```sql
|
SELECT "attendance" FROM "scottish_football_league_challenge_cup_f" WHERE "runner_up"='livingston'; |
## Task
Generate a SQL query to answer the following question:
`How many people were watching when Livingston was the runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scottish_football_league_challenge_cup_f" (
"season" text,
"winner" text,
"score" text,
"runner_up" text,
"venue" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people were watching when Livingston was the runner-up?`:
```sql
|
SELECT AVG("grid") FROM "classification" WHERE "laps">52 AND "driver"='andrea de adamich'; |
## Task
Generate a SQL query to answer the following question:
`what average grid has laps larger than 52 and contains the driver of andrea de adamich?`
### 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 `what average grid has laps larger than 52 and contains the driver of andrea de adamich?`:
```sql
|
SELECT MAX("laps") FROM "classification" WHERE "driver"='graham hill' AND "grid">18; |
## Task
Generate a SQL query to answer the following question:
`what's the highest lap that contains the driver of graham hill and a grid that is larger than 18?`
### 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 `what's the highest lap that contains the driver of graham hill and a grid that is larger than 18?`:
```sql
|
SELECT AVG("grid") FROM "classification" WHERE "time_retired"='piston' AND "laps"<15; |
## Task
Generate a SQL query to answer the following question:
`what's the average grid that has a time/retired piston and laps smaller than 15?`
### 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 `what's the average grid that has a time/retired piston and laps smaller than 15?`:
```sql
|
SELECT "tuner" FROM "results" WHERE "season">2004 AND "driver"='gaurav gill' AND "team"='team mrf' AND "governing_body"='mai'; |
## Task
Generate a SQL query to answer the following question:
`Who is the tuner after season 2004 with Gaurav Gill as the driver, Team MRF, and Mai governing body?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"season" real,
"driver" text,
"co_driver" text,
"team" text,
"tuner" text,
"governing_body" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the tuner after season 2004 with Gaurav Gill as the driver, Team MRF, and Mai governing body?`:
```sql
|
SELECT "driver" FROM "results" WHERE "tuner"='n. leelakrishnan' AND "governing_body"='mai' AND "season"=2003; |
## Task
Generate a SQL query to answer the following question:
`Who is the driver in season 2003 with a tuner of N. Leelakrishnan and a Mai governing body?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"season" real,
"driver" text,
"co_driver" text,
"team" text,
"tuner" text,
"governing_body" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the driver in season 2003 with a tuner of N. Leelakrishnan and a Mai governing body?`:
```sql
|
SELECT "tuner" FROM "results" WHERE "team"='mrf'; |
## Task
Generate a SQL query to answer the following question:
`Who is the turner on Team MRF?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"season" real,
"driver" text,
"co_driver" text,
"team" text,
"tuner" text,
"governing_body" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the turner on Team MRF?`:
```sql
|
SELECT MIN("season") FROM "results" WHERE "driver"='farad bathena'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest season with driver Farad Bathena?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"season" real,
"driver" text,
"co_driver" text,
"team" text,
"tuner" text,
"governing_body" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest season with driver Farad Bathena?`:
```sql
|
SELECT MIN("goals") FROM "statistics" WHERE "league"='major league soccer' AND "season"='2005'; |
## Task
Generate a SQL query to answer the following question:
`Which Major League Soccer team for the 2005 season has the lowest goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics" (
"season" text,
"club" text,
"league" text,
"apps" real,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Major League Soccer team for the 2005 season has the lowest goals?`:
```sql
|
SELECT AVG("apps") FROM "statistics" WHERE "league"='major league soccer' AND "club"='seattle sounders fc' AND "goals"<0; |
## Task
Generate a SQL query to answer the following question:
`What are the average apps for the Major League Soccer team club for the Seattle Sounders FC that has goals less than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics" (
"season" text,
"club" text,
"league" text,
"apps" real,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are the average apps for the Major League Soccer team club for the Seattle Sounders FC that has goals less than 0?`:
```sql
|
SELECT "icelandic" FROM "faroese_words_and_phrases_in_comparison_" WHERE "danish"='blåt/blå'; |
## Task
Generate a SQL query to answer the following question:
`Which Icelandic has a Danish of blåt/blå?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "faroese_words_and_phrases_in_comparison_" (
"faroese" text,
"norwegian_bokm_l" text,
"norwegian_nynorsk" text,
"english" text,
"icelandic" text,
"danish" text,
"swedish" text,
"german" text,
"dutch" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Icelandic has a Danish of blåt/blå?`:
```sql
|
SELECT "icelandic" FROM "faroese_words_and_phrases_in_comparison_" WHERE "norwegian_nynorsk"='kvitt/kvit'; |
## Task
Generate a SQL query to answer the following question:
`Which Icelandic has a Norwegian (nynorsk) of kvitt/kvit?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "faroese_words_and_phrases_in_comparison_" (
"faroese" text,
"norwegian_bokm_l" text,
"norwegian_nynorsk" text,
"english" text,
"icelandic" text,
"danish" text,
"swedish" text,
"german" text,
"dutch" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Icelandic has a Norwegian (nynorsk) of kvitt/kvit?`:
```sql
|
SELECT "faroese" FROM "faroese_words_and_phrases_in_comparison_" WHERE "english"='white'; |
## Task
Generate a SQL query to answer the following question:
`Which Faroese has an English of white?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "faroese_words_and_phrases_in_comparison_" (
"faroese" text,
"norwegian_bokm_l" text,
"norwegian_nynorsk" text,
"english" text,
"icelandic" text,
"danish" text,
"swedish" text,
"german" text,
"dutch" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Faroese has an English of white?`:
```sql
|
SELECT "norwegian_nynorsk" FROM "faroese_words_and_phrases_in_comparison_" WHERE "danish"='farvel'; |
## Task
Generate a SQL query to answer the following question:
`Which Norwegian (nynorsk) has a Danish of farvel?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "faroese_words_and_phrases_in_comparison_" (
"faroese" text,
"norwegian_bokm_l" text,
"norwegian_nynorsk" text,
"english" text,
"icelandic" text,
"danish" text,
"swedish" text,
"german" text,
"dutch" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Norwegian (nynorsk) has a Danish of farvel?`:
```sql
|
SELECT "english" FROM "faroese_words_and_phrases_in_comparison_" WHERE "danish"='rødt/rød'; |
## Task
Generate a SQL query to answer the following question:
`Which English has a Danish of rødt/rød?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "faroese_words_and_phrases_in_comparison_" (
"faroese" text,
"norwegian_bokm_l" text,
"norwegian_nynorsk" text,
"english" text,
"icelandic" text,
"danish" text,
"swedish" text,
"german" text,
"dutch" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which English has a Danish of rødt/rød?`:
```sql
|
SELECT "congress" FROM "legislative_history" WHERE "num_of_cosponsors"=44; |
## Task
Generate a SQL query to answer the following question:
`What number of Congress has 44 cosponsors?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "legislative_history" (
"congress" text,
"bill_number" text,
"date_introduced" text,
"sponsor" text,
"num_of_cosponsors" real
);
### SQL
Given the database schema, here is the SQL query that answers `What number of Congress has 44 cosponsors?`:
```sql
|
SELECT "sponsor" FROM "legislative_history" WHERE "date_introduced"='april 22, 2004'; |
## Task
Generate a SQL query to answer the following question:
`Who was the sponsor on April 22, 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "legislative_history" (
"congress" text,
"bill_number" text,
"date_introduced" text,
"sponsor" text,
"num_of_cosponsors" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the sponsor on April 22, 2004?`:
```sql
|
SELECT "score" FROM "february" WHERE "home"='new york rangers'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the game when the New York Rangers were 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,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the game when the New York Rangers were the home team?`:
```sql
|
SELECT "result" FROM "international_goals" WHERE "date"='8 october 1961'; |
## Task
Generate a SQL query to answer the following question:
`What was the result on 8 October 1961?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"goal" real,
"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 result on 8 October 1961?`:
```sql
|
SELECT "venue" FROM "international_goals" WHERE "date"='27 april 1964'; |
## Task
Generate a SQL query to answer the following question:
`What was the venue of the game on 27 April 1964?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"goal" real,
"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 venue of the game on 27 April 1964?`:
```sql
|
SELECT "venue" FROM "round_8" WHERE "home_team_score"='8.13 (61)'; |
## Task
Generate a SQL query to answer the following question:
`Where was the game played with a home team score of 8.13 (61)?`
### 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 `Where was the game played with a home team score of 8.13 (61)?`:
```sql
|
SELECT "home_team_score" FROM "round_8" WHERE "away_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What is the home team score when the away team was Hawthorn?`
### 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 is the home team score when the away team was Hawthorn?`:
```sql
|
SELECT "home_team_score" FROM "round_8" WHERE "away_team_score"='14.15 (99)'; |
## Task
Generate a SQL query to answer the following question:
`What did the home team score when the away team scored 14.15 (99)?`
### 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 did the home team score when the away team scored 14.15 (99)?`:
```sql
|
SELECT "date" FROM "round_8" WHERE "away_team_score"='11.14 (80)'; |
## Task
Generate a SQL query to answer the following question:
`When was the game played where the away team scored 11.14 (80)?`
### 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 `When was the game played where the away team scored 11.14 (80)?`:
```sql
|
SELECT "venue" FROM "round_8" WHERE "away_team_score"='14.15 (99)'; |
## Task
Generate a SQL query to answer the following question:
`Where was the game played when the away team scored 14.15 (99)?`
### 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 `Where was the game played when the away team scored 14.15 (99)?`:
```sql
|
SELECT "home_team" FROM "round_8" WHERE "away_team_score"='13.6 (84)'; |
## Task
Generate a SQL query to answer the following question:
`What home team played against the away team with a score of 13.6 (84)?`
### 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 home team played against the away team with a score of 13.6 (84)?`:
```sql
|
SELECT "score" FROM "singles_runner_up" WHERE "opponent_in_the_final"='divij sharan'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game against Divij Sharan?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_runner_up" (
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game against Divij Sharan?`:
```sql
|
SELECT "score" FROM "singles_runner_up" WHERE "surface"='hard' AND "opponent_in_the_final"='peter gojowczyk'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the match that was a played on a hard surface against Peter Gojowczyk?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_runner_up" (
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the match that was a played on a hard surface against Peter Gojowczyk?`:
```sql
|
SELECT COUNT("attendance") FROM "game_log" WHERE "record"='43-34'; |
## Task
Generate a SQL query to answer the following question:
`How many attended the game with a record of 43-34?`
### 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 `How many attended the game with a record of 43-34?`:
```sql
|
SELECT "opponents" FROM "doubles_7_10" WHERE "partner"='michelle strebel'; |
## Task
Generate a SQL query to answer the following question:
`Who was Manuela Maleeva opponent when she played a match partnered with michelle strebel?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_7_10" (
"edition" text,
"round" text,
"date" text,
"partner" text,
"surface" text,
"opponents" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was Manuela Maleeva opponent when she played a match partnered with michelle strebel?`:
```sql
|
SELECT AVG("points") FROM "yearly_results" WHERE "pct_pct">0.685; |
## Task
Generate a SQL query to answer the following question:
`When the percent is larger than 0.685, what is the average number of points scored?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "yearly_results" (
"season" text,
"games" real,
"lost" real,
"tied" real,
"points" real,
"pct_pct" real,
"goals_for" real,
"goals_against" real,
"standing" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the percent is larger than 0.685, what is the average number of points scored?`:
```sql
|
SELECT MIN("pct_pct") FROM "yearly_results" WHERE "points"<37; |
## Task
Generate a SQL query to answer the following question:
`When less than 37 points are scored, what's the lowest Pct % found?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "yearly_results" (
"season" text,
"games" real,
"lost" real,
"tied" real,
"points" real,
"pct_pct" real,
"goals_for" real,
"goals_against" real,
"standing" text
);
### SQL
Given the database schema, here is the SQL query that answers `When less than 37 points are scored, what's the lowest Pct % found?`:
```sql
|
SELECT "round" FROM "mixed_martial_arts_record" WHERE "event"='rings: king of kings 2000 block a' AND "record"='6-1'; |
## Task
Generate a SQL query to answer the following question:
`How many rounds did the event rings: king of kings 2000 block a have with a record of 6-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many rounds did the event rings: king of kings 2000 block a have with a record of 6-1?`:
```sql
|
SELECT "time" FROM "mixed_martial_arts_record" WHERE "event"='adrenaline mma 3'; |
## Task
Generate a SQL query to answer the following question:
`How long was the fight 'adrenaline mma 3'?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `How long was the fight 'adrenaline mma 3'?`:
```sql
|
SELECT "record" FROM "mixed_martial_arts_record" WHERE "opponent"='john salter'; |
## Task
Generate a SQL query to answer the following question:
`What was roberto travern's record when he fought against john salter?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was roberto travern's record when he fought against john salter?`:
```sql
|
SELECT "away_team_score" FROM "round_15" WHERE "venue"='mcg'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the away team at the MCG?`
### 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 `What was the score of the away team at the MCG?`:
```sql
|
SELECT "constructor" FROM "race" WHERE "grid">20 AND "time_retired"='accident'; |
## Task
Generate a SQL query to answer the following question:
`Who constructed the car with a grid larger than 20 that got in an accident?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who constructed the car with a grid larger than 20 that got in an accident?`:
```sql
|
SELECT "position" FROM "round_three" WHERE "cfl_team"='montreal alouettes (via edmonton)'; |
## Task
Generate a SQL query to answer the following question:
`Which Position has a CFL Team of montreal alouettes (via edmonton)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_three" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Position has a CFL Team of montreal alouettes (via edmonton)?`:
```sql
|
SELECT "player" FROM "round_three" WHERE "cfl_team"='montreal alouettes (via hamilton via winnipeg)'; |
## Task
Generate a SQL query to answer the following question:
`Which Player has a CFL Team of montreal alouettes (via hamilton via winnipeg)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_three" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Player has a CFL Team of montreal alouettes (via hamilton via winnipeg)?`:
```sql
|
SELECT "position" FROM "round_three" WHERE "player"='patrick macdonald'; |
## Task
Generate a SQL query to answer the following question:
`Which Position has a Player of patrick macdonald?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_three" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Position has a Player of patrick macdonald?`:
```sql
|
SELECT SUM("series") FROM "series_summary" WHERE "sixth_place"='joan tena'; |
## Task
Generate a SQL query to answer the following question:
`What series had Joan Tena in sixth place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_summary" (
"series" real,
"year" text,
"winner" text,
"runner_up" text,
"third_place" text,
"fourth_place" text,
"fifth_place" text,
"sixth_place" text,
"host" text
);
### SQL
Given the database schema, here is the SQL query that answers `What series had Joan Tena in sixth place?`:
```sql
|
SELECT "sixth_place" FROM "series_summary" WHERE "series"=7; |
## Task
Generate a SQL query to answer the following question:
`Who was in sixth place in series 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_summary" (
"series" real,
"year" text,
"winner" text,
"runner_up" text,
"third_place" text,
"fourth_place" text,
"fifth_place" text,
"sixth_place" text,
"host" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was in sixth place in series 7?`:
```sql
|
SELECT "sixth_place" FROM "series_summary" WHERE "fifth_place"='hugo salazar'; |
## Task
Generate a SQL query to answer the following question:
`Who was sixth place when Hugo Salazar was fifth place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_summary" (
"series" real,
"year" text,
"winner" text,
"runner_up" text,
"third_place" text,
"fourth_place" text,
"fifth_place" text,
"sixth_place" text,
"host" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was sixth place when Hugo Salazar was fifth place?`:
```sql
|
SELECT "third_place" FROM "series_summary" WHERE "fifth_place"='fran dieli'; |
## Task
Generate a SQL query to answer the following question:
`Who was third place when Fran Dieli was fifth place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_summary" (
"series" real,
"year" text,
"winner" text,
"runner_up" text,
"third_place" text,
"fourth_place" text,
"fifth_place" text,
"sixth_place" text,
"host" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was third place when Fran Dieli was fifth place?`:
```sql
|
SELECT "order_and_title" FROM "cardinal_electors" WHERE "elevated"='1261, december 17' AND "faction"='angevin'; |
## Task
Generate a SQL query to answer the following question:
`What is the Order and Title with an Elevated with 1261, december 17, and a Faction with angevin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cardinal_electors" (
"elector" text,
"nationality" text,
"faction" text,
"order_and_title" text,
"elevated" text,
"elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Order and Title with an Elevated with 1261, december 17, and a Faction with angevin?`:
```sql
|
SELECT "elector" FROM "cardinal_electors" WHERE "nationality"='roman' AND "elevator"='urban iv' AND "elevated"='1261, december 17'; |
## Task
Generate a SQL query to answer the following question:
`What is the Elector with a Nationality with roman, and an Elevator of urban iv, and an Elevated with 1261, december 17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cardinal_electors" (
"elector" text,
"nationality" text,
"faction" text,
"order_and_title" text,
"elevated" text,
"elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Elector with a Nationality with roman, and an Elevator of urban iv, and an Elevated with 1261, december 17?`:
```sql
|
SELECT "nationality" FROM "cardinal_electors" WHERE "elector"='bertrand de saint-martin'; |
## Task
Generate a SQL query to answer the following question:
`What is the Nationality with an Elector with bertrand de saint-martin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cardinal_electors" (
"elector" text,
"nationality" text,
"faction" text,
"order_and_title" text,
"elevated" text,
"elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Nationality with an Elector with bertrand de saint-martin?`:
```sql
|
SELECT "order_and_title" FROM "cardinal_electors" WHERE "nationality"='roman' AND "elector"='matteo orsini rosso'; |
## Task
Generate a SQL query to answer the following question:
`What is the Order and Title with a Nationality with roman, and an Elector with matteo orsini rosso?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cardinal_electors" (
"elector" text,
"nationality" text,
"faction" text,
"order_and_title" text,
"elevated" text,
"elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Order and Title with a Nationality with roman, and an Elector with matteo orsini rosso?`:
```sql
|
SELECT "elector" FROM "cardinal_electors" WHERE "faction"='roman' AND "elevated"='1244, may 28'; |
## Task
Generate a SQL query to answer the following question:
`What is the Elector with a Faction of roman, and an Elevated with 1244, may 28?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cardinal_electors" (
"elector" text,
"nationality" text,
"faction" text,
"order_and_title" text,
"elevated" text,
"elevator" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Elector with a Faction of roman, and an Elevated with 1244, may 28?`:
```sql
|
SELECT "home_team" FROM "round_3" WHERE "away_team_score"='7.11 (53)'; |
## Task
Generate a SQL query to answer the following question:
`What did the away team score at the game when the home team scored 7.11 (53)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"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 away team score at the game when the home team scored 7.11 (53)?`:
```sql
|
SELECT "home_team" FROM "round_3" WHERE "home_team_score"='6.5 (41)'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home team that scored 6.5 (41)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"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 `Who was the home team that scored 6.5 (41)?`:
```sql
|
SELECT "mult" FROM "65_nm" WHERE "release_date"='q4 2007' AND "model_number"='pentium dual-core t2310'; |
## Task
Generate a SQL query to answer the following question:
`What is the mult value of the microprocessor with a release date q4 2007 and model number pentium dual-core t2310?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "65_nm" (
"model_number" text,
"s_spec_number" text,
"frequency" text,
"l2_cache" text,
"mult" text,
"voltage" text,
"socket" text,
"release_date" text,
"part_number_s" text,
"release_price_usd" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the mult value of the microprocessor with a release date q4 2007 and model number pentium dual-core t2310?`:
```sql
|
SELECT "l2_cache" FROM "65_nm" WHERE "model_number"='pentium dual-core t3400'; |
## Task
Generate a SQL query to answer the following question:
`What is the L2 cache of the microprocessor with model number pentium dual-core t3400?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "65_nm" (
"model_number" text,
"s_spec_number" text,
"frequency" text,
"l2_cache" text,
"mult" text,
"voltage" text,
"socket" text,
"release_date" text,
"part_number_s" text,
"release_price_usd" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the L2 cache of the microprocessor with model number pentium dual-core t3400?`:
```sql
|
SELECT "release_price_usd" FROM "65_nm" WHERE "model_number"='pentium dual-core t2330'; |
## Task
Generate a SQL query to answer the following question:
`What is the release price (USD) of the microprocessor with a model number pentium dual-core t2330?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "65_nm" (
"model_number" text,
"s_spec_number" text,
"frequency" text,
"l2_cache" text,
"mult" text,
"voltage" text,
"socket" text,
"release_date" text,
"part_number_s" text,
"release_price_usd" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the release price (USD) of the microprocessor with a model number pentium dual-core t2330?`:
```sql
|
SELECT "date" FROM "season_review" WHERE "fastest_lap"='patrick tambay'; |
## Task
Generate a SQL query to answer the following question:
`What day did Patrick Tambay have the fastest lap?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What day did Patrick Tambay have the fastest lap?`:
```sql
|
SELECT "pole_position" FROM "season_review" WHERE "location"='spa-francorchamps'; |
## Task
Generate a SQL query to answer the following question:
`Who held the pole position in SPA-Francorchamps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who held the pole position in SPA-Francorchamps?`:
```sql
|
SELECT "constructor" FROM "season_review" WHERE "location"='long beach'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Long Beach constructor?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Long Beach constructor?`:
```sql
|
SELECT "venue" FROM "round_13" WHERE "away_team_score"='12.5 (77)'; |
## Task
Generate a SQL query to answer the following question:
`Where was the game played when the away team scored 12.5 (77)?`
### 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 `Where was the game played when the away team scored 12.5 (77)?`:
```sql
|
SELECT "away_team_score" FROM "round_13" WHERE "home_team"='carlton'; |
## Task
Generate a SQL query to answer the following question:
`What did the away team score when Carlton was the home team?`
### 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 did the away team score when Carlton was the home team?`:
```sql
|
SELECT "home_team_score" FROM "round_13" WHERE "home_team"='st kilda'; |
## Task
Generate a SQL query to answer the following question:
`What did St Kilda score when they were the home team?`
### 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 did St Kilda score when they were the home team?`:
```sql
|
SELECT "home_team_score" FROM "round_13" WHERE "away_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What did the home team score when South Melbourne was the away team?`
### 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 did the home team score when South Melbourne was the away team?`:
```sql
|
SELECT "away_team" FROM "round_13" WHERE "home_team_score"='14.14 (98)'; |
## Task
Generate a SQL query to answer the following question:
`Who is the away team when the home team scored 14.14 (98)?`
### 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 `Who is the away team when the home team scored 14.14 (98)?`:
```sql
|
SELECT "leading_scorer" FROM "april" WHERE "date"='april 12, 2008'; |
## Task
Generate a SQL query to answer the following question:
`Name the leading scorer for april 12, 2008`
### 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 `Name the leading scorer for april 12, 2008`:
```sql
|
SELECT "home_team_score" FROM "round_8" WHERE "venue"='brunswick street oval'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the home team that played at Brunswick Street 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 `What was the score for the home team that played at Brunswick Street Oval?`:
```sql
|
SELECT "name" FROM "players_who_made_their_debut_for_the_gee" WHERE "seasons"='1981' AND "order">807; |
## Task
Generate a SQL query to answer the following question:
`what is the name for seasons 1981 and an order more than 807?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_who_made_their_debut_for_the_gee" (
"order" real,
"name" text,
"seasons" text,
"games" real,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the name for seasons 1981 and an order more than 807?`:
```sql
|
SELECT MIN("crowd") FROM "round_13" WHERE "away_team_score"='12.9 (81)'; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest crowd of the away team that scored 12.9 (81)?`
### 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 smallest crowd of the away team that scored 12.9 (81)?`:
```sql
|
SELECT "away_team" FROM "round_13" WHERE "venue"='lake oval'; |
## Task
Generate a SQL query to answer the following question:
`What away team played in Lake Oval?`
### 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 away team played in Lake Oval?`:
```sql
|
SELECT "tournament" FROM "results" WHERE "2009"='11'; |
## Task
Generate a SQL query to answer the following question:
`Which tournament was on 2009 with 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"tournament" text,
"2002" text,
"2003" 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 `Which tournament was on 2009 with 11?`:
```sql
|
SELECT "date" FROM "october" WHERE "attendance">'18,118' AND "visitor"='colorado'; |
## Task
Generate a SQL query to answer the following question:
`On what date was the attendance greater than 18,118 when Colorado was the visitor?`
### 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 `On what date was the attendance greater than 18,118 when Colorado was the visitor?`:
```sql
|
SELECT "driver" FROM "classification" WHERE "laps"=59 AND "grid"=11; |
## Task
Generate a SQL query to answer the following question:
`What driver went 59 laps on grid 11?`
### 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 `What driver went 59 laps on grid 11?`:
```sql
|
SELECT "driver" FROM "race" WHERE "grid"='22'; |
## Task
Generate a SQL query to answer the following question:
`Which driver has a grid value of 22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which driver has a grid value of 22?`:
```sql
|
SELECT "time_retired" FROM "race" WHERE "driver"='jean alesi'; |
## Task
Generate a SQL query to answer the following question:
`What is the value of time/retired for Jean Alesi?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the value of time/retired for Jean Alesi?`:
```sql
|
SELECT "laps" FROM "race" WHERE "time_retired"='electrical' AND "driver"='rubens barrichello'; |
## Task
Generate a SQL query to answer the following question:
`When the time/retired is electrical how many laps did Rubens Barrichello have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the time/retired is electrical how many laps did Rubens Barrichello have?`:
```sql
|
SELECT "laps" FROM "race" WHERE "driver"='eddie irvine'; |
## Task
Generate a SQL query to answer the following question:
`How many laps did Eddie Irvine have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many laps did Eddie Irvine have?`:
```sql
|
SELECT "score" FROM "january" WHERE "home"='hornets' AND "visitor"='clippers'; |
## Task
Generate a SQL query to answer the following question:
`In the game where the Hornets were the home team and Clippers the visiting team, what is the score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"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 `In the game where the Hornets were the home team and Clippers the visiting team, what is the score?`:
```sql
|
SELECT "venue" FROM "round_16" WHERE "crowd">'12,000' AND "home_team"='carlton'; |
## Task
Generate a SQL query to answer the following question:
`Where is the home venue of carlton that had a crowd bigger than 12,000?`
### 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 is the home venue of carlton that had a crowd bigger than 12,000?`:
```sql
|
SELECT "finish" FROM "indy_500_results" WHERE "qual"='99.550'; |
## Task
Generate a SQL query to answer the following question:
`Which finish has a 99.550 Qual?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which finish has a 99.550 Qual?`:
```sql
|
SELECT "qual" FROM "indy_500_results" WHERE "laps"<200 AND "start"='11'; |
## Task
Generate a SQL query to answer the following question:
`Which Qual with laps less than 200 and an 11 start?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Qual with laps less than 200 and an 11 start?`:
```sql
|
SELECT "rank" FROM "indy_500_results" WHERE "start"='totals'; |
## Task
Generate a SQL query to answer the following question:
`Which rank is the start of totals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which rank is the start of totals?`:
```sql
|
SELECT "year" FROM "indy_500_results" WHERE "laps"=112; |
## Task
Generate a SQL query to answer the following question:
`Which year has 112 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which year has 112 laps?`:
```sql
|
SELECT "surface" FROM "doubles_11_2_9" WHERE "score_in_the_final"='0–6, 4–6'; |
## Task
Generate a SQL query to answer the following question:
`On what surface was the score in the final 0–6, 4–6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_11_2_9" (
"outcome" text,
"tournament" text,
"surface" text,
"partnering" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what surface was the score in the final 0–6, 4–6?`:
```sql
|
SELECT "score_in_the_final" FROM "doubles_11_2_9" WHERE "tournament"='$25,000 glasgow, great britain'; |
## Task
Generate a SQL query to answer the following question:
`What score in the final had a tournament of $25,000 Glasgow, Great Britain?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_11_2_9" (
"outcome" text,
"tournament" text,
"surface" text,
"partnering" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What score in the final had a tournament of $25,000 Glasgow, Great Britain?`:
```sql
|
SELECT "surface" FROM "doubles_11_2_9" WHERE "score_in_the_final"='4–6, 3–6'; |
## Task
Generate a SQL query to answer the following question:
`Which surface has a score in the final of 4–6, 3–6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_11_2_9" (
"outcome" text,
"tournament" text,
"surface" text,
"partnering" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which surface has a score in the final of 4–6, 3–6?`:
```sql
|
SELECT COUNT("silver") FROM "medal_table" WHERE "nation"='united states' AND "total">1; |
## Task
Generate a SQL query to answer the following question:
`how many times is the nation listed as united states with the total more than 1?`
### 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 `how many times is the nation listed as united states with the total more than 1?`:
```sql
|
SELECT MIN("total") FROM "medal_table" WHERE "rank"<2 AND "bronze">0; |
## Task
Generate a SQL query to answer the following question:
`what is the lowest total when the rank is less than 2 and bronze is more 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 lowest total when the rank is less than 2 and bronze is more than 0?`:
```sql
|
SELECT "nation" FROM "medal_table" WHERE "total"=1 AND "bronze"<1 AND "rank"=3; |
## Task
Generate a SQL query to answer the following question:
`what is the nation with a total of 1, bronze smaller than 1 and a rank of 3?`
### 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 nation with a total of 1, bronze smaller than 1 and a rank of 3?`:
```sql
|
SELECT SUM("rank") FROM "medal_table" WHERE "silver"<0; |
## Task
Generate a SQL query to answer the following question:
`what is the rank when silver is less 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 rank when silver is less than 0?`:
```sql
|
SELECT AVG("silver") FROM "medal_table" WHERE "gold"=2 AND "rank">1; |
## Task
Generate a SQL query to answer the following question:
`what is the amount of silver when gold is 2 and the rank is more than 1?`
### 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 amount of silver when gold is 2 and the rank is more than 1?`:
```sql
|
SELECT "home" FROM "november" WHERE "decision"='kolzig' AND "date"='november 5'; |
## Task
Generate a SQL query to answer the following question:
`Which home has a Decision of kolzig, and a Date of november 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "november" (
"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 `Which home has a Decision of kolzig, and a Date of november 5?`:
```sql
|
SELECT "score" FROM "november" WHERE "decision"='johnson'; |
## Task
Generate a SQL query to answer the following question:
`Which score has a Decision of johnson?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "november" (
"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 `Which score has a Decision of johnson?`:
```sql
|
SELECT "date" FROM "november" WHERE "home"='washington' AND "visitor"='florida' AND "record"='8-15-2'; |
## Task
Generate a SQL query to answer the following question:
`Which date has a Home of washington, a Visitor of florida, and a Record of 8-15-2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "november" (
"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 `Which date has a Home of washington, a Visitor of florida, and a Record of 8-15-2?`:
```sql
|
SELECT SUM("attendance") FROM "november" WHERE "record"='5-9-0'; |
## Task
Generate a SQL query to answer the following question:
`What is the total of attendance with a Record of 5-9-0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "november" (
"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 total of attendance with a Record of 5-9-0?`:
```sql
|
SELECT "score" FROM "november" WHERE "date"='november 2'; |
## Task
Generate a SQL query to answer the following question:
`Which score has a Date of november 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "november" (
"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 `Which score has a Date of november 2?`:
```sql
|
SELECT "length" FROM "farm_to_market_roads" WHERE "junctions"='sh 359 us 59' AND "route_name"='fm 2895'; |
## Task
Generate a SQL query to answer the following question:
`What's the length of route FM 2895 with junctions sh 359 us 59?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "farm_to_market_roads" (
"route_name" text,
"direction" text,
"termini" text,
"junctions" text,
"length" text,
"population_area" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the length of route FM 2895 with junctions sh 359 us 59?`:
```sql
|
SELECT "termini" FROM "farm_to_market_roads" WHERE "junctions"='i-35 fm 3338 sh 255'; |
## Task
Generate a SQL query to answer the following question:
`What's the termini of the route with junctions of i-35 fm 3338 sh 255?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "farm_to_market_roads" (
"route_name" text,
"direction" text,
"termini" text,
"junctions" text,
"length" text,
"population_area" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the termini of the route with junctions of i-35 fm 3338 sh 255?`:
```sql
|
SELECT "junctions" FROM "farm_to_market_roads" WHERE "termini"='aguilares, texas us 59'; |
## Task
Generate a SQL query to answer the following question:
`What are the junctions of the route with termini aguilares, texas us 59?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "farm_to_market_roads" (
"route_name" text,
"direction" text,
"termini" text,
"junctions" text,
"length" text,
"population_area" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the junctions of the route with termini aguilares, texas us 59?`:
```sql
|
SELECT "route_name" FROM "farm_to_market_roads" WHERE "termini"='fm 1472 sh 255'; |
## Task
Generate a SQL query to answer the following question:
`What route has termini of fm 1472 sh 255?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "farm_to_market_roads" (
"route_name" text,
"direction" text,
"termini" text,
"junctions" text,
"length" text,
"population_area" text
);
### SQL
Given the database schema, here is the SQL query that answers `What route has termini of fm 1472 sh 255?`:
```sql
|
SELECT "termini" FROM "farm_to_market_roads" WHERE "population_area"='aguilares'; |
## Task
Generate a SQL query to answer the following question:
`What termini does the route with a population Area of aguilares have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "farm_to_market_roads" (
"route_name" text,
"direction" text,
"termini" text,
"junctions" text,
"length" text,
"population_area" text
);
### SQL
Given the database schema, here is the SQL query that answers `What termini does the route with a population Area of aguilares have?`:
```sql
|
SELECT "length" FROM "farm_to_market_roads" WHERE "junctions"='ur 1472 sh 255'; |
## Task
Generate a SQL query to answer the following question:
`What's the length of the route with junctions of ur 1472 sh 255?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "farm_to_market_roads" (
"route_name" text,
"direction" text,
"termini" text,
"junctions" text,
"length" text,
"population_area" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the length of the route with junctions of ur 1472 sh 255?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.