output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "time_retired" FROM "race" WHERE "grid"=24; |
## Task
Generate a SQL query to answer the following question:
`I want the time/retired for grid of 24`
### 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 `I want the time/retired for grid of 24`:
```sql
|
SELECT "driver" FROM "race" WHERE "grid">9 AND "laps"<26 AND "constructor"='ferrari'; |
## Task
Generate a SQL query to answer the following question:
`I want the driver for ferrari who made Laps less than 26 and grids more than 9`
### 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 `I want the driver for ferrari who made Laps less than 26 and grids more than 9`:
```sql
|
SELECT COUNT("grid") FROM "race" WHERE "laps"=52; |
## Task
Generate a SQL query to answer the following question:
`Tell me the total number of grid for laps of 52`
### 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 `Tell me the total number of grid for laps of 52`:
```sql
|
SELECT "record" FROM "january" WHERE "date"='january 10'; |
## Task
Generate a SQL query to answer the following question:
`What's the record for january 10?`
### 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,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the record for january 10?`:
```sql
|
SELECT "score" FROM "january" WHERE "decision"='hasek' AND "date"='january 5'; |
## Task
Generate a SQL query to answer the following question:
`What's the score on january 5 with a hasek decision?`
### 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,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the score on january 5 with a hasek decision?`:
```sql
|
SELECT "club_team" FROM "1995_draft_picks" WHERE "overall">131 AND "round"=8 AND "player"='kaj linna'; |
## Task
Generate a SQL query to answer the following question:
`What Club team has an average of 8, plays kaj linna, and has an overall larger than 131?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1995_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 Club team has an average of 8, plays kaj linna, and has an overall larger than 131?`:
```sql
|
SELECT "round" FROM "1995_draft_picks" WHERE "player"='bryan berard'; |
## Task
Generate a SQL query to answer the following question:
`What round does Bryan Berard do?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1995_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 round does Bryan Berard do?`:
```sql
|
SELECT AVG("gross_tonnage") FROM "ships_of_the_great_eastern_railway" WHERE "entered_service"='april 1919'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the average gross tonnage for april 1919 entered service`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships_of_the_great_eastern_railway" (
"ship_s_name" text,
"entered_service" text,
"ended_service" text,
"gross_tonnage" real,
"type_of_vessel" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the average gross tonnage for april 1919 entered service`:
```sql
|
SELECT COUNT("gross_tonnage") FROM "ships_of_the_great_eastern_railway" WHERE "entered_service"='1903'; |
## Task
Generate a SQL query to answer the following question:
`I want the total number of gross tonnage when entered service was 1903`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships_of_the_great_eastern_railway" (
"ship_s_name" text,
"entered_service" text,
"ended_service" text,
"gross_tonnage" real,
"type_of_vessel" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the total number of gross tonnage when entered service was 1903`:
```sql
|
SELECT SUM("rank") FROM "season" WHERE "player"='henry shefflin' AND "matches">4; |
## Task
Generate a SQL query to answer the following question:
`what is the rank when the player is henry shefflin and the matches is higher than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"matches" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the rank when the player is henry shefflin and the matches is higher than 4?`:
```sql
|
SELECT AVG("rank") FROM "season" WHERE "total"=39 AND "county"='dublin' AND "matches"<4; |
## Task
Generate a SQL query to answer the following question:
`what is the rank when the total is 39 in the county of dublin and the matches is less than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"matches" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the rank when the total is 39 in the county of dublin and the matches is less than 4?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "date"='november 12, 1972'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent on November 12, 1972?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent on November 12, 1972?`:
```sql
|
SELECT "builder_s_model" FROM "emd" WHERE "total_produced">40 AND "build_date"='1966'; |
## Task
Generate a SQL query to answer the following question:
`Who built the train in 1966 with over 40 produced?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "emd" (
"prr_class" text,
"builder_s_model" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"service" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who built the train in 1966 with over 40 produced?`:
```sql
|
SELECT "prr_class" FROM "emd" WHERE "wheel_arrangement"='b-b' AND "service"='freight' AND "build_date"='1967'; |
## Task
Generate a SQL query to answer the following question:
`What is the PRR class of the freight train built in 1967 with a b-b wheel arrangement?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "emd" (
"prr_class" text,
"builder_s_model" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"service" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the PRR class of the freight train built in 1967 with a b-b wheel arrangement?`:
```sql
|
SELECT "prr_class" FROM "emd" WHERE "wheel_arrangement"='a1a-a1a'; |
## Task
Generate a SQL query to answer the following question:
`What PRR class has a Wheel arrangement of a1a-a1a?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "emd" (
"prr_class" text,
"builder_s_model" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"service" text,
"power_output" text
);
### SQL
Given the database schema, here is the SQL query that answers `What PRR class has a Wheel arrangement of a1a-a1a?`:
```sql
|
SELECT MIN("zone") FROM "c" WHERE "managed_by"='southern' AND "platforms"<2; |
## Task
Generate a SQL query to answer the following question:
`Which Zone is the lowest when Managed By Southern and has Platforms under 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "c" (
"stations" text,
"place" text,
"managed_by" text,
"platforms" real,
"zone" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Zone is the lowest when Managed By Southern and has Platforms under 2?`:
```sql
|
SELECT MAX("platforms") FROM "c" WHERE "stations"='centrale tram stop'; |
## Task
Generate a SQL query to answer the following question:
`What would be the highest Platforms for the Centrale Tram Stop Stations?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "c" (
"stations" text,
"place" text,
"managed_by" text,
"platforms" real,
"zone" real
);
### SQL
Given the database schema, here is the SQL query that answers `What would be the highest Platforms for the Centrale Tram Stop Stations?`:
```sql
|
SELECT SUM("grid") FROM "classification" WHERE "laps">61; |
## Task
Generate a SQL query to answer the following question:
`How many grids had more than 61 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 `How many grids had more than 61 laps?`:
```sql
|
SELECT MAX("pick") FROM "nfl_draft" WHERE "player"='parnell dickinson' AND "round"<7; |
## Task
Generate a SQL query to answer the following question:
`When parnell dickinson was the player and the rounds were under 7, what's the highest pick?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"pick" real,
"round" real,
"player" text,
"position" text,
"school" text
);
### SQL
Given the database schema, here is the SQL query that answers `When parnell dickinson was the player and the rounds were under 7, what's the highest pick?`:
```sql
|
SELECT SUM("round") FROM "nfl_draft" WHERE "position"='linebacker' AND "school"='utah state'; |
## Task
Generate a SQL query to answer the following question:
`When the school picking is utah state for the position of linebacker, what's the sum of those rounds?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"pick" real,
"round" real,
"player" text,
"position" text,
"school" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the school picking is utah state for the position of linebacker, what's the sum of those rounds?`:
```sql
|
SELECT "laps" FROM "classification" WHERE "grid"<2; |
## Task
Generate a SQL query to answer the following question:
`what is the laps when the grid is less than 2?`
### 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 is the laps when the grid is less than 2?`:
```sql
|
SELECT "constructor" FROM "classification" WHERE "grid">23 AND "driver"='piercarlo ghinzani'; |
## Task
Generate a SQL query to answer the following question:
`who is the constructor when the grid is more than 23 and the driver is piercarlo ghinzani?`
### 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 `who is the constructor when the grid is more than 23 and the driver is piercarlo ghinzani?`:
```sql
|
SELECT MAX("year") FROM "achievements" WHERE "venue"='gothenburg, sweden'; |
## Task
Generate a SQL query to answer the following question:
`When is the latest year the venue is in gothenburg, sweden?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `When is the latest year the venue is in gothenburg, sweden?`:
```sql
|
SELECT MIN("year") FROM "achievements" WHERE "venue"='gothenburg, sweden'; |
## Task
Generate a SQL query to answer the following question:
`When is the earliest year the venue is in gothenburg, sweden?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `When is the earliest year the venue is in gothenburg, sweden?`:
```sql
|
SELECT "result" FROM "achievements" WHERE "tournament"='european indoor championships' AND "year">1974; |
## Task
Generate a SQL query to answer the following question:
`What is the result of the european indoor championships after 1974?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result of the european indoor championships after 1974?`:
```sql
|
SELECT "away_team_score" FROM "round_5" WHERE "venue"='western oval'; |
## Task
Generate a SQL query to answer the following question:
`In Western Oval, what was the away team score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_5" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `In Western Oval, what was the away team score?`:
```sql
|
SELECT SUM("places") FROM "men" WHERE "name"='adrian vasile' AND "points"<127.74; |
## Task
Generate a SQL query to answer the following question:
`What is the place number for adrian vasile with less than 127.74 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "men" (
"rank" real,
"name" text,
"nation" text,
"sp_fs" real,
"points" real,
"places" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the place number for adrian vasile with less than 127.74 points?`:
```sql
|
SELECT MAX("sp_fs") FROM "men" WHERE "points"=131.02 AND "rank">15; |
## Task
Generate a SQL query to answer the following question:
`What is the highest SP+FS that has 131.02 Points, and a Rank larger than 15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "men" (
"rank" real,
"name" text,
"nation" text,
"sp_fs" real,
"points" real,
"places" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest SP+FS that has 131.02 Points, and a Rank larger than 15?`:
```sql
|
SELECT MAX("evening_gown") FROM "final_competition_scores" WHERE "interview">9.36 AND "country"='tennessee' AND "average">9.75; |
## Task
Generate a SQL query to answer the following question:
`What is the highest evening gown score of the contestant from Tennessee with an interview score larger than 9.36 and an average larger than 9.75 have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_competition_scores" (
"country" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest evening gown score of the contestant from Tennessee with an interview score larger than 9.36 and an average larger than 9.75 have?`:
```sql
|
SELECT SUM("average") FROM "final_competition_scores" WHERE "swimsuit"<9.32; |
## Task
Generate a SQL query to answer the following question:
`What is the average of the contestant with a swimsuit less than 9.32?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_competition_scores" (
"country" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average of the contestant with a swimsuit less than 9.32?`:
```sql
|
SELECT MAX("swimsuit") FROM "final_competition_scores" WHERE "interview">9.55 AND "evening_gown"=9.75 AND "average">9.67; |
## Task
Generate a SQL query to answer the following question:
`What is the highest swimsuit score of the contestant with a higher than 9.55 interview score, and evening gown of 9.75, and an average higher than 9.67?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_competition_scores" (
"country" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest swimsuit score of the contestant with a higher than 9.55 interview score, and evening gown of 9.75, and an average higher than 9.67?`:
```sql
|
SELECT "country" FROM "final_competition_scores" WHERE "swimsuit"=9.46; |
## Task
Generate a SQL query to answer the following question:
`What is the country of the contestant with a swimsuit of 9.46?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_competition_scores" (
"country" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the country of the contestant with a swimsuit of 9.46?`:
```sql
|
SELECT "date" FROM "shunsuke_nakamura_international_goals" WHERE "goal"=24; |
## Task
Generate a SQL query to answer the following question:
`On what date did Goal 24 take place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "shunsuke_nakamura_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 `On what date did Goal 24 take place?`:
```sql
|
SELECT "team_2" FROM "first_qualifying_round" WHERE "team_1"='valletta'; |
## Task
Generate a SQL query to answer the following question:
`What is the team 2 for team 1 of Valletta?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_qualifying_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the team 2 for team 1 of Valletta?`:
```sql
|
SELECT "defensive" FROM "weekly_awards" WHERE "rookie"='craig point' AND "week"=6; |
## Task
Generate a SQL query to answer the following question:
`Who played defensive when the rookie Craig Point was playing during week 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_awards" (
"month" text,
"week" real,
"overall" text,
"offensive" text,
"defensive" text,
"transition" text,
"rookie" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who played defensive when the rookie Craig Point was playing during week 6?`:
```sql
|
SELECT MIN("week") FROM "weekly_awards" WHERE "transition"='pat mccready'; |
## Task
Generate a SQL query to answer the following question:
`What was the first week that had a transition with Pat Mccready?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_awards" (
"month" text,
"week" real,
"overall" text,
"offensive" text,
"defensive" text,
"transition" text,
"rookie" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the first week that had a transition with Pat Mccready?`:
```sql
|
SELECT "rookie" FROM "weekly_awards" WHERE "defensive"='matt vinc' AND "offensive"='pat maddalena'; |
## Task
Generate a SQL query to answer the following question:
`Who was the rookie who played when Matt Vinc was defensive and Pat Maddalena was offensive?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_awards" (
"month" text,
"week" real,
"overall" text,
"offensive" text,
"defensive" text,
"transition" text,
"rookie" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the rookie who played when Matt Vinc was defensive and Pat Maddalena was offensive?`:
```sql
|
SELECT "overall" FROM "weekly_awards" WHERE "transition"='josh sims'; |
## Task
Generate a SQL query to answer the following question:
`Who played as overall when Josh Sims was transition?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_awards" (
"month" text,
"week" real,
"overall" text,
"offensive" text,
"defensive" text,
"transition" text,
"rookie" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who played as overall when Josh Sims was transition?`:
```sql
|
SELECT SUM("crowd") FROM "round_4" WHERE "venue"='glenferrie oval'; |
## Task
Generate a SQL query to answer the following question:
`How large was the crowd at Glenferrie Oval?`
### 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 `How large was the crowd at Glenferrie Oval?`:
```sql
|
SELECT "actor" FROM "regular_cast" WHERE "character"='ariadne oliver'; |
## Task
Generate a SQL query to answer the following question:
`who is the actor of the character ariadne oliver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_cast" (
"actor" text,
"character" text,
"title_rank" text,
"series" text,
"years" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the actor of the character ariadne oliver?`:
```sql
|
SELECT MAX("grid") FROM "classification" WHERE "driver"='ralph firman' AND "laps"<18; |
## Task
Generate a SQL query to answer the following question:
`What is the largest grid with a Driver of ralph firman, and a Lap smaller 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 is the largest grid with a Driver of ralph firman, and a Lap smaller than 18?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "grid">3 AND "driver"='kimi räikkönen'; |
## Task
Generate a SQL query to answer the following question:
`What time/retired has a Grid larger than 3, and a Driver of kimi räikkönen?`
### 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 time/retired has a Grid larger than 3, and a Driver of kimi räikkönen?`:
```sql
|
SELECT "score" FROM "december" WHERE "date"='december 31'; |
## Task
Generate a SQL query to answer the following question:
`What is the score on December 31?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" text,
"record" text,
"streak" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score on December 31?`:
```sql
|
SELECT MIN("team_1") FROM "second_round" WHERE "agg"='asolo fonte (veneto b)'; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest team 1 number that had asolo fonte (veneto b) as the Agg.?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"team_1" real,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the lowest team 1 number that had asolo fonte (veneto b) as the Agg.?`:
```sql
|
SELECT SUM("grid") FROM "classification" WHERE "driver"='kazuyoshi hoshino' AND "laps"<71; |
## Task
Generate a SQL query to answer the following question:
`What is the grid total for kazuyoshi hoshino with under 71 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 `What is the grid total for kazuyoshi hoshino with under 71 laps?`:
```sql
|
SELECT "driver" FROM "classification" WHERE "laps">72 AND "grid"=2; |
## Task
Generate a SQL query to answer the following question:
`What driver has grid 2 and over 72 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 `What driver has grid 2 and over 72 laps?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "grid"=23; |
## Task
Generate a SQL query to answer the following question:
`What is the time/retired for grid 23?`
### 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 is the time/retired for grid 23?`:
```sql
|
SELECT AVG("top_25") FROM "summary" WHERE "events"<35 AND "tournament"='the open championship'; |
## Task
Generate a SQL query to answer the following question:
`What is the average of the top-25 of those with less than 35 events in the Open Championship?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_10" real,
"top_25" real,
"events" real,
"cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average of the top-25 of those with less than 35 events in the Open Championship?`:
```sql
|
SELECT SUM("events") FROM "summary" WHERE "tournament"='the open championship' AND "cuts_made"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of events the Open Championship has with less than 0 cuts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_10" real,
"top_25" real,
"events" real,
"cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of events the Open Championship has with less than 0 cuts?`:
```sql
|
SELECT COUNT("events") FROM "summary" WHERE "top_25"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of events with a top-25 less than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_10" real,
"top_25" real,
"events" real,
"cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of events with a top-25 less than 0?`:
```sql
|
SELECT COUNT("top_25") FROM "summary" WHERE "top_10">2 AND "cuts_made"<29; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of top-25 with a top-10 bigger than 2 and less than 29 cuts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_10" real,
"top_25" real,
"events" real,
"cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of top-25 with a top-10 bigger than 2 and less than 29 cuts?`:
```sql
|
SELECT MIN("events") FROM "summary" WHERE "tournament"='the open championship' AND "top_10"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of events the Open Championship has with a less than 0 top-10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_10" real,
"top_25" real,
"events" real,
"cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest number of events the Open Championship has with a less than 0 top-10?`:
```sql
|
SELECT "away_team_score" FROM "round_19" WHERE "home_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What is the score for the away team when they played Hawthorn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_19" (
"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 score for the away team when they played Hawthorn?`:
```sql
|
SELECT "home_team" FROM "round_4" WHERE "away_team_score"='8.7 (55)'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home team when the away team scored 8.7 (55)?`
### 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 `Who was the home team when the away team scored 8.7 (55)?`:
```sql
|
SELECT "away_team" FROM "round_4" WHERE "home_team_score"='14.12 (96)'; |
## Task
Generate a SQL query to answer the following question:
`Who did Footscray play against when they scored 14.12 (96)?`
### 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 `Who did Footscray play against when they scored 14.12 (96)?`:
```sql
|
SELECT SUM("crowd") FROM "round_4" WHERE "away_team_score"='8.13 (61)'; |
## Task
Generate a SQL query to answer the following question:
`How many were in attendance when the away team scored 8.13 (61)?`
### 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 `How many were in attendance when the away team scored 8.13 (61)?`:
```sql
|
SELECT "result" FROM "2001_fixtures_and_results" WHERE "score"='30-44'; |
## Task
Generate a SQL query to answer the following question:
`Which result has a Score of 30-44?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2001_fixtures_and_results" (
"date" text,
"competition" text,
"venue" text,
"result" text,
"score" text,
"goals" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which result has a Score of 30-44?`:
```sql
|
SELECT "venue" FROM "2001_fixtures_and_results" WHERE "goals"='h.paul 8/9'; |
## Task
Generate a SQL query to answer the following question:
`Which venue has h.paul 8/9 goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2001_fixtures_and_results" (
"date" text,
"competition" text,
"venue" text,
"result" text,
"score" text,
"goals" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue has h.paul 8/9 goals?`:
```sql
|
SELECT "score" FROM "2001_fixtures_and_results" WHERE "venue"='valley parade' AND "date"='10/6/01'; |
## Task
Generate a SQL query to answer the following question:
`What is the score at valley parade on 10/6/01?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2001_fixtures_and_results" (
"date" text,
"competition" text,
"venue" text,
"result" text,
"score" text,
"goals" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score at valley parade on 10/6/01?`:
```sql
|
SELECT "competition" FROM "2001_fixtures_and_results" WHERE "date"='16/4/01'; |
## Task
Generate a SQL query to answer the following question:
`Which competition has a Date of 16/4/01?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2001_fixtures_and_results" (
"date" text,
"competition" text,
"venue" text,
"result" text,
"score" text,
"goals" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which competition has a Date of 16/4/01?`:
```sql
|
SELECT "occupation" FROM "7_seats" WHERE "riding"='labrador'; |
## Task
Generate a SQL query to answer the following question:
`What is the occupation of the candidate that has a riding of labrador?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "7_seats" (
"riding" text,
"candidate" text,
"gender" text,
"residence" text,
"occupation" text,
"votes" real,
"rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the occupation of the candidate that has a riding of labrador?`:
```sql
|
SELECT AVG("sinclair_coefficient") FROM "notable_sinclair_totals_throughout_the_h" WHERE "sinclair_total"=477.2772023 AND "weight_class_kg">105; |
## Task
Generate a SQL query to answer the following question:
`What is the average sinclair coefficient with a Sinclair Total of 477.2772023, and a Weight Class (kg) larger than 105?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notable_sinclair_totals_throughout_the_h" (
"weight_class_kg" real,
"world_record_kg" text,
"sinclair_coefficient" real,
"sinclair_total" real,
"rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average sinclair coefficient with a Sinclair Total of 477.2772023, and a Weight Class (kg) larger than 105?`:
```sql
|
SELECT MIN("attendance") FROM "game_log" WHERE "date"='may 6'; |
## Task
Generate a SQL query to answer the following question:
`Name the least attendance for may 6`
### 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 `Name the least attendance for may 6`:
```sql
|
SELECT "owner" FROM "satellite_television" WHERE "language"='english' AND "name"='espn international sports'; |
## Task
Generate a SQL query to answer the following question:
`Which ESPN international sports owner speaks English?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "satellite_television" (
"channel" real,
"name" text,
"language" text,
"owner" text,
"group" text,
"type" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which ESPN international sports owner speaks English?`:
```sql
|
SELECT "type" FROM "satellite_television" WHERE "group"='animated'; |
## Task
Generate a SQL query to answer the following question:
`Which type is filed under the Group Animated?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "satellite_television" (
"channel" real,
"name" text,
"language" text,
"owner" text,
"group" text,
"type" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which type is filed under the Group Animated?`:
```sql
|
SELECT "date" FROM "fa_premier_league" WHERE "opponent"='newcastle united' AND "result"='2–1'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has an Opponent of newcastle united, and a Result of 2–1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fa_premier_league" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date has an Opponent of newcastle united, and a Result of 2–1?`:
```sql
|
SELECT "date" FROM "fa_premier_league" WHERE "opponent"='manchester united' AND "venue"='a'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has an Opponent of manchester united, and a Venue A?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fa_premier_league" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date has an Opponent of manchester united, and a Venue A?`:
```sql
|
SELECT "away_team_score" FROM "round_9" WHERE "home_team"='collingwood'; |
## Task
Generate a SQL query to answer the following question:
`In the game where Collingwood is the home team what is the score of the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_9" (
"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 `In the game where Collingwood is the home team what is the score of the away team?`:
```sql
|
SELECT "home_team_score" FROM "round_9" WHERE "home_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What is the home teamscore for Richmond?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_9" (
"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 teamscore for Richmond?`:
```sql
|
SELECT "contestant" FROM "at_home_prize" WHERE "start_bmi"=42.2; |
## Task
Generate a SQL query to answer the following question:
`What contestant had a starting BMI of 42.2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "at_home_prize" (
"season" text,
"contestant" text,
"height" text,
"start_bmi" real,
"start_weight" real,
"recent_bmi" text
);
### SQL
Given the database schema, here is the SQL query that answers `What contestant had a starting BMI of 42.2?`:
```sql
|
SELECT "recent_bmi" FROM "at_home_prize" WHERE "start_bmi"<46.3 AND "season"='season 8'; |
## Task
Generate a SQL query to answer the following question:
`What is the recent BMI on season 8 for the person who's BMI started under 46.3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "at_home_prize" (
"season" text,
"contestant" text,
"height" text,
"start_bmi" real,
"start_weight" real,
"recent_bmi" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the recent BMI on season 8 for the person who's BMI started under 46.3?`:
```sql
|
SELECT "college" FROM "round_1" WHERE "pick"<6 AND "pba_team"='shell turbo chargers'; |
## Task
Generate a SQL query to answer the following question:
`Which college has a pick below 6 for the PBA team the Shell Turbo Chargers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which college has a pick below 6 for the PBA team the Shell Turbo Chargers?`:
```sql
|
SELECT SUM("crowd") FROM "round_11" WHERE "home_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What's the crowd population of the home team located in Richmond?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_11" (
"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's the crowd population of the home team located in Richmond?`:
```sql
|
SELECT "away_team" FROM "round_11" WHERE "home_team"='footscray'; |
## Task
Generate a SQL query to answer the following question:
`What is the visiting team that has a home team related to footscray?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_11" (
"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 visiting team that has a home team related to footscray?`:
```sql
|
SELECT "venue" FROM "round_18" WHERE "home_team_score"='13.13 (91)'; |
## Task
Generate a SQL query to answer the following question:
`Which Venue has a Home team score of 13.13 (91)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Venue has a Home team score of 13.13 (91)?`:
```sql
|
SELECT "home_team" FROM "round_18" WHERE "away_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`Which Home team has an Away team of fitzroy?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Home team has an Away team of fitzroy?`:
```sql
|
SELECT "venue" FROM "round_17" WHERE "home_team_score"='13.14 (92)'; |
## Task
Generate a SQL query to answer the following question:
`Where did the home team score 13.14 (92)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did the home team score 13.14 (92)?`:
```sql
|
SELECT "away_team" FROM "round_17" WHERE "away_team_score"='12.17 (89)'; |
## Task
Generate a SQL query to answer the following question:
`Who is the away team that scored 12.17 (89)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"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 that scored 12.17 (89)?`:
```sql
|
SELECT "venue" FROM "round_17" WHERE "crowd">'13,828' AND "home_team_score"='14.21 (105)'; |
## Task
Generate a SQL query to answer the following question:
`Where did the home team score 14.21 (105) with a crowd larger than 13,828?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did the home team score 14.21 (105) with a crowd larger than 13,828?`:
```sql
|
SELECT "home_team_score" FROM "round_17" WHERE "away_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What did the home team score when the away team was South Melbourne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"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 was South Melbourne?`:
```sql
|
SELECT "home_team_score" FROM "round_17" WHERE "crowd">'20,851' AND "away_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What did the home team score when the away team was Hawthorn and there was a crowd larger than 20,851?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"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 was Hawthorn and there was a crowd larger than 20,851?`:
```sql
|
SELECT "venue" FROM "round_18" WHERE "home_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What venue is the home field of Richmond?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What venue is the home field of Richmond?`:
```sql
|
SELECT "away_team_score" FROM "round_18" WHERE "venue"='princes park'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the away team in the match at Princes Park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the away team in the match at Princes Park?`:
```sql
|
SELECT "home_team_score" FROM "round_18" WHERE "venue"='western oval'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the home team in the match at Western Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the home team in the match at Western Oval?`:
```sql
|
SELECT "party" FROM "polling" WHERE "ifop_5_30_09"='2.5%'; |
## Task
Generate a SQL query to answer the following question:
`Who had an Iflop of 2.5%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "polling" (
"party" text,
"results_2004" text,
"csa_5_28_09" text,
"ifop_5_30_09" text,
"ipsos_5_30_09" text,
"bva_6_1_09" text,
"tns_sofres_6_2_09" text,
"opinion_way_6_3_09" text,
"ipsos_6_3_09" text,
"tns_sofres_6_4_09" text,
"csa_6_4_09" text,
"ifop_6_4_09" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had an Iflop of 2.5%?`:
```sql
|
SELECT "ipsos_5_30_09" FROM "polling" WHERE "bva_6_1_09"='3%'; |
## Task
Generate a SQL query to answer the following question:
`When BVA was 3%, what was the Ipsos?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "polling" (
"party" text,
"results_2004" text,
"csa_5_28_09" text,
"ifop_5_30_09" text,
"ipsos_5_30_09" text,
"bva_6_1_09" text,
"tns_sofres_6_2_09" text,
"opinion_way_6_3_09" text,
"ipsos_6_3_09" text,
"tns_sofres_6_4_09" text,
"csa_6_4_09" text,
"ifop_6_4_09" text
);
### SQL
Given the database schema, here is the SQL query that answers `When BVA was 3%, what was the Ipsos?`:
```sql
|
SELECT "party" FROM "polling" WHERE "ipsos_6_3_09"='27%'; |
## Task
Generate a SQL query to answer the following question:
`Who had an Ipsos of 27%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "polling" (
"party" text,
"results_2004" text,
"csa_5_28_09" text,
"ifop_5_30_09" text,
"ipsos_5_30_09" text,
"bva_6_1_09" text,
"tns_sofres_6_2_09" text,
"opinion_way_6_3_09" text,
"ipsos_6_3_09" text,
"tns_sofres_6_4_09" text,
"csa_6_4_09" text,
"ifop_6_4_09" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had an Ipsos of 27%?`:
```sql
|
SELECT "tns_sofres_6_2_09" FROM "polling" WHERE "ifop_5_30_09"='5%'; |
## Task
Generate a SQL query to answer the following question:
`What was the TNS-Sofres when the Iflop was 5%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "polling" (
"party" text,
"results_2004" text,
"csa_5_28_09" text,
"ifop_5_30_09" text,
"ipsos_5_30_09" text,
"bva_6_1_09" text,
"tns_sofres_6_2_09" text,
"opinion_way_6_3_09" text,
"ipsos_6_3_09" text,
"tns_sofres_6_4_09" text,
"csa_6_4_09" text,
"ifop_6_4_09" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the TNS-Sofres when the Iflop was 5%?`:
```sql
|
SELECT "party" FROM "polling" WHERE "results_2004"='0.00%'; |
## Task
Generate a SQL query to answer the following question:
`Who had 0.00% in 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "polling" (
"party" text,
"results_2004" text,
"csa_5_28_09" text,
"ifop_5_30_09" text,
"ipsos_5_30_09" text,
"bva_6_1_09" text,
"tns_sofres_6_2_09" text,
"opinion_way_6_3_09" text,
"ipsos_6_3_09" text,
"tns_sofres_6_4_09" text,
"csa_6_4_09" text,
"ifop_6_4_09" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had 0.00% in 2004?`:
```sql
|
SELECT "tns_sofres_6_2_09" FROM "polling" WHERE "ipsos_6_3_09"='27%'; |
## Task
Generate a SQL query to answer the following question:
`What's the TNS-Sofres when Ipsos was 27%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "polling" (
"party" text,
"results_2004" text,
"csa_5_28_09" text,
"ifop_5_30_09" text,
"ipsos_5_30_09" text,
"bva_6_1_09" text,
"tns_sofres_6_2_09" text,
"opinion_way_6_3_09" text,
"ipsos_6_3_09" text,
"tns_sofres_6_4_09" text,
"csa_6_4_09" text,
"ifop_6_4_09" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the TNS-Sofres when Ipsos was 27%?`:
```sql
|
SELECT "date" FROM "round_3" WHERE "away_team_score"='11.19 (85)'; |
## Task
Generate a SQL query to answer the following question:
`In the match that had an away score of 11.19 (85), what was the date?`
### 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 `In the match that had an away score of 11.19 (85), what was the date?`:
```sql
|
SELECT "venue" FROM "round_3" WHERE "away_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`In the match where fitzroy was the away team, where was the venue?`
### 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 `In the match where fitzroy was the away team, where was the venue?`:
```sql
|
SELECT "stage_winner" FROM "jersey_progress" WHERE "general_classification"='vladimir karpets' AND "team_classification"='relax-gam' AND "points_classification"='denis menchov'; |
## Task
Generate a SQL query to answer the following question:
`Which Stage (Winner) has a Vladimir Karpets General classification and a Team classification of relax-gam, and a Points classification of Denis Menchov?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jersey_progress" (
"stage_winner" text,
"general_classification" text,
"mountains_classification" text,
"points_classification" text,
"sprints_classification" text,
"team_classification" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Stage (Winner) has a Vladimir Karpets General classification and a Team classification of relax-gam, and a Points classification of Denis Menchov?`:
```sql
|
SELECT "team_classification" FROM "jersey_progress" WHERE "general_classification"='vladimir karpets' AND "mountains_classification"='no award'; |
## Task
Generate a SQL query to answer the following question:
`Which Team classification has a General classification of Vladimir Karpets and a Mountains classification of No Award?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jersey_progress" (
"stage_winner" text,
"general_classification" text,
"mountains_classification" text,
"points_classification" text,
"sprints_classification" text,
"team_classification" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Team classification has a General classification of Vladimir Karpets and a Mountains classification of No Award?`:
```sql
|
SELECT "sprints_classification" FROM "jersey_progress" WHERE "points_classification"='mark cavendish' AND "team_classification"='caisse d''epargne'; |
## Task
Generate a SQL query to answer the following question:
`What Sprints classification has the Points classification, Mark Cavendish and Team classification, Caisse D'epargne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jersey_progress" (
"stage_winner" text,
"general_classification" text,
"mountains_classification" text,
"points_classification" text,
"sprints_classification" text,
"team_classification" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Sprints classification has the Points classification, Mark Cavendish and Team classification, Caisse D'epargne?`:
```sql
|
SELECT COUNT("from") FROM "women" WHERE "thirds"='2' AND "until"=2002; |
## Task
Generate a SQL query to answer the following question:
`How many in the From category had thirds of exactly 2 and an Until stat of 2002?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women" (
"place" real,
"name" text,
"from" real,
"until" real,
"titles" text,
"seconds" text,
"thirds" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many in the From category had thirds of exactly 2 and an Until stat of 2002?`:
```sql
|
SELECT "seconds" FROM "women" WHERE "from"<2006 AND "thirds"='4'; |
## Task
Generate a SQL query to answer the following question:
`What is the second number when from is prior to 2006 and the thirds number was 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women" (
"place" real,
"name" text,
"from" real,
"until" real,
"titles" text,
"seconds" text,
"thirds" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the second number when from is prior to 2006 and the thirds number was 4?`:
```sql
|
SELECT SUM("until") FROM "women" WHERE "titles"='5'; |
## Task
Generate a SQL query to answer the following question:
`What is the total Until when the Titles was 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women" (
"place" real,
"name" text,
"from" real,
"until" real,
"titles" text,
"seconds" text,
"thirds" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total Until when the Titles was 5?`:
```sql
|
SELECT "1st_leg" FROM "second_qualifying_round" WHERE "team_1"='aalborg bk'; |
## Task
Generate a SQL query to answer the following question:
`When Team 1 is Aalborg BK, what is the 1st Leg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_qualifying_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `When Team 1 is Aalborg BK, what is the 1st Leg?`:
```sql
|
SELECT "agg" FROM "second_qualifying_round" WHERE "team_2"='partizan'; |
## Task
Generate a SQL query to answer the following question:
`When Partizan is Team 2, what is the Agg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_qualifying_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `When Partizan is Team 2, what is the Agg?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.