output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "1st_leg" FROM "second_qualifying_round" WHERE "team_1"='aalborg bk'; |
## Task
Generate a SQL query to answer the following question:
`When Aalborg BK is Team 1, 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 Aalborg BK is Team 1, what is the 1st leg?`:
```sql
|
SELECT "story_timeline" FROM "references" WHERE "published"<1984 AND "in_order_of_publication"='first'; |
## Task
Generate a SQL query to answer the following question:
`What is the story timeline that was published first prior to 1984?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"order" real,
"title" text,
"story_timeline" text,
"published" real,
"in_order_of_publication" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the story timeline that was published first prior to 1984?`:
```sql
|
SELECT COUNT("published") FROM "references" WHERE "in_order_of_publication"='first'; |
## Task
Generate a SQL query to answer the following question:
`How many total publications were the first of the series?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"order" real,
"title" text,
"story_timeline" text,
"published" real,
"in_order_of_publication" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many total publications were the first of the series?`:
```sql
|
SELECT "play_by_play" FROM "1990s" WHERE "year"<1998 AND "network"='fox'; |
## Task
Generate a SQL query to answer the following question:
`Who did the play-by-play before 1998 on Fox network?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1990s" (
"year" real,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"ice_level_reporters" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who did the play-by-play before 1998 on Fox network?`:
```sql
|
SELECT "play_by_play" FROM "1990s" WHERE "year"<1992 AND "ice_level_reporters"='mike emrick'; |
## Task
Generate a SQL query to answer the following question:
`Who did the play-by-play before 1992 with the Ice level reporter Mike Emrick?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1990s" (
"year" real,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"ice_level_reporters" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who did the play-by-play before 1992 with the Ice level reporter Mike Emrick?`:
```sql
|
SELECT "ice_level_reporters" FROM "1990s" WHERE "color_commentator_s"='john davidson' AND "play_by_play"='marv albert' AND "year">1992; |
## Task
Generate a SQL query to answer the following question:
`Who is the Ice level reporter after 1992 with the color commentator John Davidson and the play-by-play Marv Albert?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1990s" (
"year" real,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"ice_level_reporters" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the Ice level reporter after 1992 with the color commentator John Davidson and the play-by-play Marv Albert?`:
```sql
|
SELECT "network" FROM "1990s" WHERE "play_by_play"='marv albert' AND "year"<1994; |
## Task
Generate a SQL query to answer the following question:
`What is the network with the play-by-play Marv Albert before 1994?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1990s" (
"year" real,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"ice_level_reporters" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the network with the play-by-play Marv Albert before 1994?`:
```sql
|
SELECT COUNT("crowd") FROM "round_13" WHERE "home_team"='carlton'; |
## Task
Generate a SQL query to answer the following question:
`What was the total crowd of the Carlton game?`
### 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 was the total crowd of the Carlton game?`:
```sql
|
SELECT MAX("long") FROM "wide_receivers" WHERE "player"='charles pauley' AND "yards"<60; |
## Task
Generate a SQL query to answer the following question:
`What was the highest long of Charles Pauley with fewer than 60 yards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wide_receivers" (
"player" text,
"rec" real,
"yards" real,
"avg" real,
"td_s" real,
"long" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the highest long of Charles Pauley with fewer than 60 yards?`:
```sql
|
SELECT "score" FROM "playoffs" WHERE "date"='may 26'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the game on May 26?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the game on May 26?`:
```sql
|
SELECT "location_attendance" FROM "playoffs" WHERE "date"='may 22'; |
## Task
Generate a SQL query to answer the following question:
`What was the location and attendance on the May 22 game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the location and attendance on the May 22 game?`:
```sql
|
SELECT "final_placing" FROM "career_summary" WHERE "poles"=0 AND "races">16 AND "podiums"=16; |
## Task
Generate a SQL query to answer the following question:
`What is the final placing of the team with 0 ples, more than 16 races, and 16 podiums?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team_name" text,
"races" real,
"wins" real,
"poles" real,
"f_laps" real,
"podiums" real,
"points" text,
"final_placing" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the final placing of the team with 0 ples, more than 16 races, and 16 podiums?`:
```sql
|
SELECT SUM("podiums") FROM "career_summary" WHERE "final_placing"='14th' AND "season">2008 AND "races"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of podiums of the teams with a final placing of 14th, seasons after 2008, and less than 1 races?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team_name" text,
"races" real,
"wins" real,
"poles" real,
"f_laps" real,
"podiums" real,
"points" text,
"final_placing" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of podiums of the teams with a final placing of 14th, seasons after 2008, and less than 1 races?`:
```sql
|
SELECT COUNT("season") FROM "career_summary" WHERE "wins">0 AND "final_placing"='1st'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of seasons with more than 0 wins and a 1st final placing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team_name" text,
"races" real,
"wins" real,
"poles" real,
"f_laps" real,
"podiums" real,
"points" text,
"final_placing" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of seasons with more than 0 wins and a 1st final placing?`:
```sql
|
SELECT AVG("wins") FROM "career_summary" WHERE "poles">0 AND "podiums"<3; |
## Task
Generate a SQL query to answer the following question:
`What is the average wins of a team with more than 0 ples and less than 3 podiums?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team_name" text,
"races" real,
"wins" real,
"poles" real,
"f_laps" real,
"podiums" real,
"points" text,
"final_placing" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average wins of a team with more than 0 ples and less than 3 podiums?`:
```sql
|
SELECT "ends" FROM "squad_information" WHERE "transfer_fee"='free' AND "goals"=0 AND "name"='roy carroll'; |
## Task
Generate a SQL query to answer the following question:
`I want the ends for transfer fee of free and goals being 0 for roy carroll`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_information" (
"nat" text,
"name" text,
"since" text,
"goals" real,
"ends" real,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the ends for transfer fee of free and goals being 0 for roy carroll`:
```sql
|
SELECT COUNT("ends") FROM "squad_information" WHERE "name"='filip šebo' AND "goals">2; |
## Task
Generate a SQL query to answer the following question:
`I want the total number of ends for filip šebo and Goals more than 2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_information" (
"nat" text,
"name" text,
"since" text,
"goals" real,
"ends" real,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the total number of ends for filip šebo and Goals more than 2`:
```sql
|
SELECT "home_team_score" FROM "round_8" WHERE "away_team_score"='5.10 (40)'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the home team whose opponent scored 5.10 (40)?`
### 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 score of the home team whose opponent scored 5.10 (40)?`:
```sql
|
SELECT "away_team" FROM "round_8" WHERE "home_team_score"='11.8 (74)'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the away team whose opponent scored 11.8 (74)?`
### 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 name of the away team whose opponent scored 11.8 (74)?`:
```sql
|
SELECT "crowd" FROM "round_8" WHERE "away_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`How big was the crowd of away team Richmond?`
### 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 `How big was the crowd of away team Richmond?`:
```sql
|
SELECT "away_team_score" FROM "round_8" WHERE "away_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`How much did the away team Geelong score?`
### 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 `How much did the away team Geelong score?`:
```sql
|
SELECT "9_00_pm" FROM "thursday" WHERE "8_00_pm"='smallville'; |
## Task
Generate a SQL query to answer the following question:
`What is on at 9:00pm on the channel of smallville?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "thursday" (
"network" text,
"8_00_pm" text,
"8_30_pm" text,
"9_00_pm" text,
"9_30_pm" text,
"10_00_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is on at 9:00pm on the channel of smallville?`:
```sql
|
SELECT "network" FROM "thursday" WHERE "8_30_pm"='ugly betty'; |
## Task
Generate a SQL query to answer the following question:
`What is the network that plays ugly betty?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "thursday" (
"network" text,
"8_00_pm" text,
"8_30_pm" text,
"9_00_pm" text,
"9_30_pm" text,
"10_00_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the network that plays ugly betty?`:
```sql
|
SELECT "8_30_pm" FROM "thursday" WHERE "network"='fox'; |
## Task
Generate a SQL query to answer the following question:
`What is the 8:30pm show on fox?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "thursday" (
"network" text,
"8_00_pm" text,
"8_30_pm" text,
"9_00_pm" text,
"9_30_pm" text,
"10_00_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 8:30pm show on fox?`:
```sql
|
SELECT "8_30_pm" FROM "thursday" WHERE "10_00_pm"='local programming' AND "9_30_pm"='my thursday night movie'; |
## Task
Generate a SQL query to answer the following question:
`What is the 8:30pm channel that has local programming at ten and nine thirty is my thursday night movie?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "thursday" (
"network" text,
"8_00_pm" text,
"8_30_pm" text,
"9_00_pm" text,
"9_30_pm" text,
"10_00_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 8:30pm channel that has local programming at ten and nine thirty is my thursday night movie?`:
```sql
|
SELECT "10_00_pm" FROM "thursday" WHERE "8_00_pm"='my thursday night movie'; |
## Task
Generate a SQL query to answer the following question:
`Name the 10:00pm when 8:0pm is my thursday night movie`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "thursday" (
"network" text,
"8_00_pm" text,
"8_30_pm" text,
"9_00_pm" text,
"9_30_pm" text,
"10_00_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 10:00pm when 8:0pm is my thursday night movie`:
```sql
|
SELECT AVG("year") FROM "biggest_single_day_gross" WHERE "day_in_release"='friday' AND "day_of_week">2; |
## Task
Generate a SQL query to answer the following question:
`What is the average year for releases on Friday and weeks larger than 2 days?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "biggest_single_day_gross" (
"rank" real,
"movie" text,
"year" real,
"studio_s" text,
"single_day_net_gross" real,
"day_in_release" text,
"day_of_week" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average year for releases on Friday and weeks larger than 2 days?`:
```sql
|
SELECT COUNT("winpct") FROM "season_by_season_records" WHERE "postseason"='did not qualify' AND "rank">8; |
## Task
Generate a SQL query to answer the following question:
`What number of win% has a postseason of did not qualify and rank larger than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_by_season_records" (
"year" real,
"rank" real,
"games" real,
"winpct" real,
"postseason" text
);
### SQL
Given the database schema, here is the SQL query that answers `What number of win% has a postseason of did not qualify and rank larger than 8?`:
```sql
|
SELECT "year" FROM "season_by_season_records" WHERE "rank">5; |
## Task
Generate a SQL query to answer the following question:
`What year ranked larger than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_by_season_records" (
"year" real,
"rank" real,
"games" real,
"winpct" real,
"postseason" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year ranked larger than 5?`:
```sql
|
SELECT "postseason" FROM "season_by_season_records" WHERE "winpct">0.40700000000000003 AND "games"<108 AND "rank"=1; |
## Task
Generate a SQL query to answer the following question:
`What postseason has a win% between 0.40700000000000003 and 108 with a rank of 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_by_season_records" (
"year" real,
"rank" real,
"games" real,
"winpct" real,
"postseason" text
);
### SQL
Given the database schema, here is the SQL query that answers `What postseason has a win% between 0.40700000000000003 and 108 with a rank of 1?`:
```sql
|
SELECT COUNT("laps") FROM "race_results" WHERE "driver"='eddie irvine'; |
## Task
Generate a SQL query to answer the following question:
`How many laps in total does the driver named Eddie Irvine have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_results" (
"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 laps in total does the driver named Eddie Irvine have?`:
```sql
|
SELECT AVG("crowd") FROM "round_3" WHERE "venue"='western oval'; |
## Task
Generate a SQL query to answer the following question:
`What's the average crowd size when the venue is western oval?`
### 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's the average crowd size when the venue is western oval?`:
```sql
|
SELECT "team" FROM "for_top_goalkeepers" WHERE "average"<1.12 AND "goalkeeper"='carlos sánchez'; |
## Task
Generate a SQL query to answer the following question:
`What team has Carlos Sánchez as a goalkeeper and an average below 1.12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "for_top_goalkeepers" (
"goalkeeper" text,
"goals" real,
"matches" real,
"average" real,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team has Carlos Sánchez as a goalkeeper and an average below 1.12?`:
```sql
|
SELECT AVG("average") FROM "for_top_goalkeepers" WHERE "goalkeeper"='jacobo' AND "matches">32; |
## Task
Generate a SQL query to answer the following question:
`What is the average of the team who has Jacobo as a goalkeeper and has played more than 32 matches?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "for_top_goalkeepers" (
"goalkeeper" text,
"goals" real,
"matches" real,
"average" real,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average of the team who has Jacobo as a goalkeeper and has played more than 32 matches?`:
```sql
|
SELECT "home_team" FROM "round_17" WHERE "away_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`What home team played Fitzroy?`
### 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 home team played Fitzroy?`:
```sql
|
SELECT "network" FROM "1980s" WHERE "play_by_play"='john wells'; |
## Task
Generate a SQL query to answer the following question:
`Which network has a play-by-play announcer of John Wells?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980s" (
"year" real,
"network" text,
"play_by_play" text,
"colour_commentator_s" text,
"studio_host" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which network has a play-by-play announcer of John Wells?`:
```sql
|
SELECT "colour_commentator_s" FROM "1980s" WHERE "network"='cbc' AND "year"=1987; |
## Task
Generate a SQL query to answer the following question:
`On CBC, who was the colour commentator in 1987?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980s" (
"year" real,
"network" text,
"play_by_play" text,
"colour_commentator_s" text,
"studio_host" text
);
### SQL
Given the database schema, here is the SQL query that answers `On CBC, who was the colour commentator in 1987?`:
```sql
|
SELECT "colour_commentator_s" FROM "1980s" WHERE "play_by_play"='bob cole'; |
## Task
Generate a SQL query to answer the following question:
`Who was the colour commentator when the play-by-play announcer was Bob Cole?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980s" (
"year" real,
"network" text,
"play_by_play" text,
"colour_commentator_s" text,
"studio_host" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the colour commentator when the play-by-play announcer was Bob Cole?`:
```sql
|
SELECT "studio_host" FROM "1980s" WHERE "play_by_play"='bob cole' AND "colour_commentator_s"='harry neale'; |
## Task
Generate a SQL query to answer the following question:
`Who is the studio host that has a play-by-play announcer of Bob Cole and a colour commentator of Harry Neale?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980s" (
"year" real,
"network" text,
"play_by_play" text,
"colour_commentator_s" text,
"studio_host" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the studio host that has a play-by-play announcer of Bob Cole and a colour commentator of Harry Neale?`:
```sql
|
SELECT "colour_commentator_s" FROM "1980s" WHERE "studio_host"='dave hodge' AND "year"=1981; |
## Task
Generate a SQL query to answer the following question:
`In 1981, with a studio host of Dave Hodge, who was the colour commentator?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980s" (
"year" real,
"network" text,
"play_by_play" text,
"colour_commentator_s" text,
"studio_host" text
);
### SQL
Given the database schema, here is the SQL query that answers `In 1981, with a studio host of Dave Hodge, who was the colour commentator?`:
```sql
|
SELECT "song" FROM "final" WHERE "artist"='mor ve ötesi'; |
## Task
Generate a SQL query to answer the following question:
`What Song is by the Artist 'mor ve ötesi'?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"draw" real,
"language" text,
"artist" text,
"song" text,
"place" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What Song is by the Artist 'mor ve ötesi'?`:
```sql
|
SELECT "home_team_score" FROM "round_18" WHERE "away_team_score"='10.14 (74)'; |
## Task
Generate a SQL query to answer the following question:
`How much did the home team score that played the away team who scored 10.14 (74)?`
### 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 `How much did the home team score that played the away team who scored 10.14 (74)?`:
```sql
|
SELECT COUNT("crowd") FROM "round_18" WHERE "home_team_score"='5.14 (44)'; |
## Task
Generate a SQL query to answer the following question:
`How big was the crowd when the home team scored 5.14 (44)?`
### 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 `How big was the crowd when the home team scored 5.14 (44)?`:
```sql
|
SELECT "date" FROM "round_18" WHERE "home_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What date did the home team Richmond play?`
### 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 date did the home team Richmond play?`:
```sql
|
SELECT MAX("crowd") FROM "round_18" WHERE "home_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What size was the biggest crowd that watched the home team Hawthorn play?`
### 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 size was the biggest crowd that watched the home team Hawthorn play?`:
```sql
|
SELECT "away_team" FROM "round_18" WHERE "away_team_score"='9.12 (66)'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the away team that scored 9.12 (66)?`
### 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 is the name of the away team that scored 9.12 (66)?`:
```sql
|
SELECT MAX("caps") FROM "other_recent_call_ups" WHERE "position"='lock' AND "club_province"='vicenza rangers'; |
## Task
Generate a SQL query to answer the following question:
`What is the high cap total for a lock with the vicenza rangers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_recent_call_ups" (
"player" text,
"position" text,
"date_of_birth_age" text,
"caps" real,
"club_province" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the high cap total for a lock with the vicenza rangers?`:
```sql
|
SELECT "date_of_birth_age" FROM "other_recent_call_ups" WHERE "player"='nese malifa'; |
## Task
Generate a SQL query to answer the following question:
`When was nese malifa born?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_recent_call_ups" (
"player" text,
"position" text,
"date_of_birth_age" text,
"caps" real,
"club_province" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was nese malifa born?`:
```sql
|
SELECT "position" FROM "other_recent_call_ups" WHERE "player"='jj gagiano'; |
## Task
Generate a SQL query to answer the following question:
`What position for jj gagiano?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_recent_call_ups" (
"player" text,
"position" text,
"date_of_birth_age" text,
"caps" real,
"club_province" text
);
### SQL
Given the database schema, here is the SQL query that answers `What position for jj gagiano?`:
```sql
|
SELECT "club_province" FROM "other_recent_call_ups" WHERE "caps"=41; |
## Task
Generate a SQL query to answer the following question:
`What club/province has 41 caps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_recent_call_ups" (
"player" text,
"position" text,
"date_of_birth_age" text,
"caps" real,
"club_province" text
);
### SQL
Given the database schema, here is the SQL query that answers `What club/province has 41 caps?`:
```sql
|
SELECT "date" FROM "grands_prix" WHERE "grand_prix"='australian grand prix'; |
## Task
Generate a SQL query to answer the following question:
`Name the date for the australian grand prix.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grands_prix" (
"round" real,
"grand_prix" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the date for the australian grand prix.`:
```sql
|
SELECT "fastest_lap" FROM "grands_prix" WHERE "pole_position"='damon hill' AND "location"='magny-cours'; |
## Task
Generate a SQL query to answer the following question:
`Who did the fastest lap when pole position was damon hill and the location was magny-cours?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grands_prix" (
"round" real,
"grand_prix" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who did the fastest lap when pole position was damon hill and the location was magny-cours?`:
```sql
|
SELECT "date" FROM "grands_prix" WHERE "grand_prix"='canadian grand prix'; |
## Task
Generate a SQL query to answer the following question:
`What was the date for the canadian grand prix?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grands_prix" (
"round" real,
"grand_prix" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date for the canadian grand prix?`:
```sql
|
SELECT MIN("rebs") FROM "a" WHERE "school_country"='oklahoma' AND "from"<1975; |
## Task
Generate a SQL query to answer the following question:
`What is the low rebound total for players from Oklahoma before 1975?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "a" (
"player" text,
"pos" text,
"from" real,
"school_country" text,
"rebs" real,
"asts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the low rebound total for players from Oklahoma before 1975?`:
```sql
|
SELECT MIN("from") FROM "a" WHERE "pos"='sg' AND "asts">650; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year a SG has over 650 assists?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "a" (
"player" text,
"pos" text,
"from" real,
"school_country" text,
"rebs" real,
"asts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year a SG has over 650 assists?`:
```sql
|
SELECT SUM("foundation") FROM "administered_by_independent_administrati" WHERE "japanese_orthography"='国立看護大学校'; |
## Task
Generate a SQL query to answer the following question:
`What is the number of the Foundation with Japanese orthography of 国立看護大学校?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "administered_by_independent_administrati" (
"english_name" text,
"japanese_orthography" text,
"pronouciation" text,
"abbreviation" text,
"provider_iai" text,
"foundation" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of the Foundation with Japanese orthography of 国立看護大学校?`:
```sql
|
SELECT MIN("yards") FROM "wide_receivers" WHERE "avg"=7 AND "long"<7; |
## Task
Generate a SQL query to answer the following question:
`what is the least yards when the average is 7 and the long is less than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wide_receivers" (
"player" text,
"rec" real,
"yards" real,
"avg" real,
"td_s" real,
"long" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the least yards when the average is 7 and the long is less than 7?`:
```sql
|
SELECT AVG("td_s") FROM "wide_receivers" WHERE "player"='jacques rumph' AND "yards">214; |
## Task
Generate a SQL query to answer the following question:
`what is the average td's for the player jacques rumph with yards more than 214?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wide_receivers" (
"player" text,
"rec" real,
"yards" real,
"avg" real,
"td_s" real,
"long" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the average td's for the player jacques rumph with yards more than 214?`:
```sql
|
SELECT "women_s_doubles" FROM "21st_century" WHERE "men_s_doubles"='howard bach tony gunawan' AND "men_s_singles"='taufik hidayat'; |
## Task
Generate a SQL query to answer the following question:
`Which women's doubles has Howard Bach Tony Gunawan as Men's doubles and Taufik Hidayat as Men's Singles?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "21st_century" (
"year" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which women's doubles has Howard Bach Tony Gunawan as Men's doubles and Taufik Hidayat as Men's Singles?`:
```sql
|
SELECT "men_s_doubles" FROM "21st_century" WHERE "women_s_doubles"='miyuki maeda satoko suetsuna'; |
## Task
Generate a SQL query to answer the following question:
`Which Men's doubles has Miyuki Maeda Satoko Suetsuna as Women's double?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "21st_century" (
"year" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Men's doubles has Miyuki Maeda Satoko Suetsuna as Women's double?`:
```sql
|
SELECT AVG("laps") FROM "race" WHERE "driver"='ralph firman' AND "grid">19; |
## Task
Generate a SQL query to answer the following question:
`What is the average laps for ralph firman with a grid of over 19?`
### 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 `What is the average laps for ralph firman with a grid of over 19?`:
```sql
|
SELECT "grid" FROM "race" WHERE "laps"=6; |
## Task
Generate a SQL query to answer the following question:
`What grid features 6 laps?`
### 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 `What grid features 6 laps?`:
```sql
|
SELECT SUM("asts") FROM "e" WHERE "school_country"='boston college' AND "rebs">63; |
## Task
Generate a SQL query to answer the following question:
`What's the sum of asts for boston college with a rebs over 63?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "e" (
"player" text,
"pos" text,
"from" real,
"school_country" text,
"rebs" real,
"asts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the sum of asts for boston college with a rebs over 63?`:
```sql
|
SELECT AVG("rebs") FROM "e" WHERE "from"<1972; |
## Task
Generate a SQL query to answer the following question:
`What's the average rebs before 1972?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "e" (
"player" text,
"pos" text,
"from" real,
"school_country" text,
"rebs" real,
"asts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the average rebs before 1972?`:
```sql
|
SELECT MAX("rebs") FROM "e" WHERE "pos"='pg' AND "from"<2004; |
## Task
Generate a SQL query to answer the following question:
`What's the highest rebs for a pos of pg before 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "e" (
"player" text,
"pos" text,
"from" real,
"school_country" text,
"rebs" real,
"asts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the highest rebs for a pos of pg before 2004?`:
```sql
|
SELECT "pos" FROM "e" WHERE "asts"<117; |
## Task
Generate a SQL query to answer the following question:
`What's the pos for an asts less than 117?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "e" (
"player" text,
"pos" text,
"from" real,
"school_country" text,
"rebs" real,
"asts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the pos for an asts less than 117?`:
```sql
|
SELECT COUNT("rebs") FROM "e" WHERE "school_country"='ucla' AND "from">1973; |
## Task
Generate a SQL query to answer the following question:
`What's the total of rebs for UCLA after 1973?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "e" (
"player" text,
"pos" text,
"from" real,
"school_country" text,
"rebs" real,
"asts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the total of rebs for UCLA after 1973?`:
```sql
|
SELECT COUNT("release_date") FROM "release_history" WHERE "country"='canada'; |
## Task
Generate a SQL query to answer the following question:
`How many release dates has Canada had?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"release_format" text,
"country" text,
"label" text,
"cat_no" text,
"release_date" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many release dates has Canada had?`:
```sql
|
SELECT "constructor" FROM "race" WHERE "time_retired"='engine' AND "grid"=1; |
## Task
Generate a SQL query to answer the following question:
`What constructor is grid 1 with a time/retired of engine?`
### 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 `What constructor is grid 1 with a time/retired of engine?`:
```sql
|
SELECT "constructor" FROM "race" WHERE "grid"=14; |
## Task
Generate a SQL query to answer the following question:
`Who constructed grid 14?`
### 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 grid 14?`:
```sql
|
SELECT "2001" FROM "singles_performance_timeline" WHERE "2004"='a' AND "2003"='a' AND "2012"='3r'; |
## Task
Generate a SQL query to answer the following question:
`I want to know the 2001 that has a 2004 of a and 2003 of a with 2012 of 3r`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want to know the 2001 that has a 2004 of a and 2003 of a with 2012 of 3r`:
```sql
|
SELECT "2008" FROM "singles_performance_timeline" WHERE "2001"='wta premier 5 tournaments'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the 2008 for when 2001 of wta premier 5 tournaments`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the 2008 for when 2001 of wta premier 5 tournaments`:
```sql
|
SELECT "2013" FROM "singles_performance_timeline" WHERE "2001"='wta premier 5 tournaments'; |
## Task
Generate a SQL query to answer the following question:
`I want to know the 2013 when 2001 was wta premier 5 tournaments`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want to know the 2013 when 2001 was wta premier 5 tournaments`:
```sql
|
SELECT "2007" FROM "singles_performance_timeline" WHERE "2010"='olympic games'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the 2007 for 2010 olympic games`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the 2007 for 2010 olympic games`:
```sql
|
SELECT "2004" FROM "singles_performance_timeline" WHERE "2012"='21'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the 2004 for 2012 of 21`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the 2004 for 2012 of 21`:
```sql
|
SELECT "date" FROM "round_1" WHERE "away_team_score"='3.4 (22)'; |
## Task
Generate a SQL query to answer the following question:
`On which date did the away team score 3.4 (22)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `On which date did the away team score 3.4 (22)?`:
```sql
|
SELECT "away_team" FROM "round_1" WHERE "home_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`When Richmond was the Home team, who was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When Richmond was the Home team, who was the away team?`:
```sql
|
SELECT "home_team" FROM "round_1" WHERE "venue"='corio oval'; |
## Task
Generate a SQL query to answer the following question:
`Which home team plays in the Corio Oval venue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which home team plays in the Corio Oval venue?`:
```sql
|
SELECT "away_team" FROM "round_1" WHERE "venue"='emcg'; |
## Task
Generate a SQL query to answer the following question:
`When the game was played at the EMCG venue, who was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the game was played at the EMCG venue, who was the away team?`:
```sql
|
SELECT "constructor" FROM "race" WHERE "driver"='jenson button'; |
## Task
Generate a SQL query to answer the following question:
`who is the constructor when the driver is jenson button?`
### 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 `who is the constructor when the driver is jenson button?`:
```sql
|
SELECT "grid" FROM "race" WHERE "time_retired"='+27.112'; |
## Task
Generate a SQL query to answer the following question:
`what is the grid when the time/retired is +27.112?`
### 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 grid when the time/retired is +27.112?`:
```sql
|
SELECT MIN("laps") FROM "classification" WHERE "driver"='huub rothengatter' AND "grid"<24; |
## Task
Generate a SQL query to answer the following question:
`I want the fewest Laps for Huub Rothengatter and grid less than 24`
### 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 `I want the fewest Laps for Huub Rothengatter and grid less than 24`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "laps"=47 AND "driver"='rené arnoux'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the time/retired with Laps of 47 and driver of rené arnoux`
### 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 `Tell me the time/retired with Laps of 47 and driver of rené arnoux`:
```sql
|
SELECT MAX("oricon") FROM "albums" WHERE "romaji_title"='nakitakunalu'; |
## Task
Generate a SQL query to answer the following question:
`Which Oricon has a Romaji title of nakitakunalu?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "albums" (
"romaji_title" text,
"japanese_title" text,
"release_date" text,
"reference" text,
"oricon" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Oricon has a Romaji title of nakitakunalu?`:
```sql
|
SELECT "reference" FROM "albums" WHERE "release_date"='1996/10/10'; |
## Task
Generate a SQL query to answer the following question:
`Which Reference has a Release date of 1996/10/10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "albums" (
"romaji_title" text,
"japanese_title" text,
"release_date" text,
"reference" text,
"oricon" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Reference has a Release date of 1996/10/10?`:
```sql
|
SELECT "occupation" FROM "11_seats" WHERE "residence"='windsor junction'; |
## Task
Generate a SQL query to answer the following question:
`What is the occupation of the candidate that resides in Windsor Junction?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "11_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 resides in Windsor Junction?`:
```sql
|
SELECT COUNT("votes") FROM "11_seats" WHERE "rank"='3rd' AND "candidate"='mary louise lorefice'; |
## Task
Generate a SQL query to answer the following question:
`How many votes did 3rd ranking candidate Mary Louise Lorefice receive?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "11_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 `How many votes did 3rd ranking candidate Mary Louise Lorefice receive?`:
```sql
|
SELECT "occupation" FROM "11_seats" WHERE "candidate"='mary louise lorefice'; |
## Task
Generate a SQL query to answer the following question:
`What occupation does Mary Louise Lorefice have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "11_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 occupation does Mary Louise Lorefice have?`:
```sql
|
SELECT "away_team_score" FROM "round_7" WHERE "home_team_score"='7.9 (51)'; |
## Task
Generate a SQL query to answer the following question:
`Which team has an away score of 7.9 (51)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team has an away score of 7.9 (51)?`:
```sql
|
SELECT "date" FROM "round_7" WHERE "away_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the game at Geelong?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"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 date of the game at Geelong?`:
```sql
|
SELECT "venue" FROM "round_7" WHERE "away_team_score"='13.13 (91)'; |
## Task
Generate a SQL query to answer the following question:
`Where was the game with a score of 13.13 (91) played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"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 with a score of 13.13 (91) played?`:
```sql
|
SELECT "date" FROM "round_7" WHERE "away_team"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`When was the game at Essendon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"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 at Essendon?`:
```sql
|
SELECT "venue" FROM "round_7" WHERE "away_team_score"='14.12 (96)'; |
## Task
Generate a SQL query to answer the following question:
`Where did the away team score 14.12 (96)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"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 away team score 14.12 (96)?`:
```sql
|
SELECT "series_name" FROM "champions" WHERE "team_champion"='cram competition'; |
## Task
Generate a SQL query to answer the following question:
`What is the series name where cram competition is the team champion?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions" (
"season" real,
"series_name" text,
"champion" text,
"team_champion" text,
"secondary_class_champion" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the series name where cram competition is the team champion?`:
```sql
|
SELECT MAX("season") FROM "champions" WHERE "series_name"='international formula master' AND "secondary_class_champion"='marcello puglisi (formula master italia)'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest season with International Formula Master as the series name and Marcello Puglisi (formula master italia) as the secondary class champion?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions" (
"season" real,
"series_name" text,
"champion" text,
"team_champion" text,
"secondary_class_champion" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest season with International Formula Master as the series name and Marcello Puglisi (formula master italia) as the secondary class champion?`:
```sql
|
SELECT "secondary_class_champion" FROM "champions" WHERE "season">2008; |
## Task
Generate a SQL query to answer the following question:
`Who is the secondary class champion in the season after 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions" (
"season" real,
"series_name" text,
"champion" text,
"team_champion" text,
"secondary_class_champion" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the secondary class champion in the season after 2008?`:
```sql
|
SELECT SUM("season") FROM "champions" WHERE "secondary_class_champion"='marcello puglisi (formula master italia)'; |
## Task
Generate a SQL query to answer the following question:
`What are the seasons where Marcello Puglisi (formula master italia) was the secondary class champion?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions" (
"season" real,
"series_name" text,
"champion" text,
"team_champion" text,
"secondary_class_champion" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the seasons where Marcello Puglisi (formula master italia) was the secondary class champion?`:
```sql
|
SELECT "champion" FROM "champions" WHERE "season">2005 AND "team_champion"='jd motorsport'; |
## Task
Generate a SQL query to answer the following question:
`Who was the champion of JD Motorsport after 2005?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "champions" (
"season" real,
"series_name" text,
"champion" text,
"team_champion" text,
"secondary_class_champion" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the champion of JD Motorsport after 2005?`:
```sql
|
SELECT "constructor" FROM "classification" WHERE "grid"=8; |
## Task
Generate a SQL query to answer the following question:
`Who is the constructor with the grid of 8?`
### 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 with the grid of 8?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "grid"<3 AND "laps"=45; |
## Task
Generate a SQL query to answer the following question:
`what is the time/retired when the grid is less than 3 and 45 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 time/retired when the grid is less than 3 and 45 laps?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.