output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "written_by" FROM "table1_29087004_3" WHERE "directed_by"='Greg Sullivan' AND "united_states_original_airdate"='July 21, 2012'; |
## Task
Generate a SQL query to answer the following question:
`Who were the writers of the episodes directed by Greg Sullivan and which first aired on July 21, 2012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29087004_3" (
"series_num" real,
"production_code" real,
"title" text,
"directed_by" text,
"written_by" text,
"united_states_original_airdate" text,
"canada_original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the writers of the episodes directed by Greg Sullivan and which first aired on July 21, 2012?`:
```sql
|
SELECT "series_num" FROM "table1_29087004_3" WHERE "written_by"='Evan Gore'; |
## Task
Generate a SQL query to answer the following question:
`Which episode/s were written by Evan Gore?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29087004_3" (
"series_num" real,
"production_code" real,
"title" text,
"directed_by" text,
"written_by" text,
"united_states_original_airdate" text,
"canada_original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which episode/s were written by Evan Gore?`:
```sql
|
SELECT COUNT("home_team_score") FROM "round_1" WHERE "away_team_score"='4.2 (26)' AND "away_team"='Footscray'; |
## Task
Generate a SQL query to answer the following question:
`How many home teams are there when the away team score was 4.2 (26) and away team was footscray?`
### 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,
"ground" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many home teams are there when the away team score was 4.2 (26) and away team was footscray?`:
```sql
|
SELECT "away_team" FROM "round_1" WHERE "home_team"='Essendon'; |
## Task
Generate a SQL query to answer the following question:
`Which team was the away team when home team was essendon?`
### 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,
"ground" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team was the away team when home team was essendon?`:
```sql
|
SELECT COUNT("home_team_score") FROM "round_1" WHERE "away_team"='Fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`How many scores were there for the home team when the away team was fitzroy?`
### 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,
"ground" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many scores were there for the home team when the away team was fitzroy?`:
```sql
|
SELECT "away_team" FROM "round_1" WHERE "home_team"='North Melbourne'; |
## Task
Generate a SQL query to answer the following question:
`Which team was the away team when the home team was north melbourne?`
### 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,
"ground" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team was the away team when the home team was north melbourne?`:
```sql
|
SELECT "date" FROM "round_1" WHERE "home_team"='Melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the game when the home team is melbourne?`
### 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,
"ground" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the game when the home team is melbourne?`:
```sql
|
SELECT "date" FROM "round_1" WHERE "home_team_score"='2.4 (16)'; |
## Task
Generate a SQL query to answer the following question:
`What is the date when the home team score is 2.4 (16)?`
### 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,
"ground" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date when the home team score is 2.4 (16)?`:
```sql
|
SELECT "singer_s" FROM "series_2" WHERE "ratings"='1.45m'; |
## Task
Generate a SQL query to answer the following question:
`Name the singer for 1.45m`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_2" (
"episode" real,
"broadcast_date" text,
"guest_s" text,
"singer_s" text,
"comedian" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the singer for 1.45m`:
```sql
|
SELECT "singer_s" FROM "series_2" WHERE "comedian"='Joe Wilkinson'; |
## Task
Generate a SQL query to answer the following question:
`Name the singer for joe wilkinson`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_2" (
"episode" real,
"broadcast_date" text,
"guest_s" text,
"singer_s" text,
"comedian" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the singer for joe wilkinson`:
```sql
|
SELECT "singer_s" FROM "series_2" WHERE "guest_s"='Bruce Forsyth'; |
## Task
Generate a SQL query to answer the following question:
`Name the singer for bruce forsyth`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_2" (
"episode" real,
"broadcast_date" text,
"guest_s" text,
"singer_s" text,
"comedian" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the singer for bruce forsyth`:
```sql
|
SELECT COUNT("ratings") FROM "series_2" WHERE "guest_s"='Bruce Forsyth'; |
## Task
Generate a SQL query to answer the following question:
`Name the number of ratings for bruce forsyth`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_2" (
"episode" real,
"broadcast_date" text,
"guest_s" text,
"singer_s" text,
"comedian" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the number of ratings for bruce forsyth`:
```sql
|
SELECT "guest_s" FROM "series_2" WHERE "ratings"='1.64m'; |
## Task
Generate a SQL query to answer the following question:
`Name the guest for 1.64m ratings`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_2" (
"episode" real,
"broadcast_date" text,
"guest_s" text,
"singer_s" text,
"comedian" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the guest for 1.64m ratings`:
```sql
|
SELECT "constructor" FROM "grands_prix" WHERE "grand_prix"='Belgian Grand Prix'; |
## Task
Generate a SQL query to answer the following question:
`What was the constructor in the Belgian Grand Prix round?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grands_prix" (
"rd" real,
"grand_prix" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the constructor in the Belgian Grand Prix round?`:
```sql
|
SELECT "fastest_lap" FROM "grands_prix" WHERE "rd"=15; |
## Task
Generate a SQL query to answer the following question:
`Who had the fastest lap in round 15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grands_prix" (
"rd" real,
"grand_prix" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had the fastest lap in round 15?`:
```sql
|
SELECT "date" FROM "round_1" WHERE "home_team"='Essendon'; |
## Task
Generate a SQL query to answer the following question:
`When was the home team Essendon? `
### 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,
"ground" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the home team Essendon? `:
```sql
|
SELECT "ground" FROM "round_1" WHERE "away_team"='Richmond'; |
## Task
Generate a SQL query to answer the following question:
`When Richmond played as the away team, what was the ground?`
### 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,
"ground" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When Richmond played as the away team, what was the ground?`:
```sql
|
SELECT "date" FROM "round_1" WHERE "home_team"='Fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`When did Fitzroy play as the home 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,
"ground" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did Fitzroy play as the home team?`:
```sql
|
SELECT "scores" FROM "table1_29141354_1" WHERE "episode"='01x06'; |
## Task
Generate a SQL query to answer the following question:
`what was the result on 01x06`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29141354_1" (
"episode" text,
"first_broadcast" text,
"andrew_and_georgies_guest" text,
"jamie_and_johns_guest" text,
"scores" text
);
### SQL
Given the database schema, here is the SQL query that answers `what was the result on 01x06`:
```sql
|
SELECT "episode" FROM "table1_29141354_1" WHERE "jamie_and_johns_guest"='Tom Daley'; |
## Task
Generate a SQL query to answer the following question:
`what was the size when tom daley appeared`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29141354_1" (
"episode" text,
"first_broadcast" text,
"andrew_and_georgies_guest" text,
"jamie_and_johns_guest" text,
"scores" text
);
### SQL
Given the database schema, here is the SQL query that answers `what was the size when tom daley appeared`:
```sql
|
SELECT "andrew_and_georgies_guest" FROM "table1_29141354_3" WHERE "jamie_and_johns_guest_dermot_o_leary_replaced_jamie_redknapp_as_team_captain_for_one_week_in_series_3_episode_8"='Phil Taylor'; |
## Task
Generate a SQL query to answer the following question:
`Who was Andrew and Georgie's gues when Jamie and John's guest was Phil Taylor?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29141354_3" (
"episode" text,
"first_broadcast" text,
"andrew_and_georgies_guest" text,
"jamie_and_johns_guest_dermot_o_leary_replaced_jamie_redknapp_as_team_captain_for_one_week_in_series_3_episode_8" text,
"scores" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was Andrew and Georgie's gues when Jamie and John's guest was Phil Taylor?`:
```sql
|
SELECT "episode" FROM "table1_29141354_3" WHERE "jamie_and_johns_guest_dermot_o_leary_replaced_jamie_redknapp_as_team_captain_for_one_week_in_series_3_episode_8"='Mike Tindall'; |
## Task
Generate a SQL query to answer the following question:
`Which episode had Jamie and John's guest as Mike Tindall?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29141354_3" (
"episode" text,
"first_broadcast" text,
"andrew_and_georgies_guest" text,
"jamie_and_johns_guest_dermot_o_leary_replaced_jamie_redknapp_as_team_captain_for_one_week_in_series_3_episode_8" text,
"scores" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which episode had Jamie and John's guest as Mike Tindall?`:
```sql
|
SELECT COUNT("scores") FROM "table1_29141354_3" WHERE "episode"='03x06'; |
## Task
Generate a SQL query to answer the following question:
`How many scores had an episode of 03x06?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29141354_3" (
"episode" text,
"first_broadcast" text,
"andrew_and_georgies_guest" text,
"jamie_and_johns_guest_dermot_o_leary_replaced_jamie_redknapp_as_team_captain_for_one_week_in_series_3_episode_8" text,
"scores" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many scores had an episode of 03x06?`:
```sql
|
SELECT "andrew_and_georgies_guest" FROM "table1_29141354_3" WHERE "jamie_and_johns_guest_dermot_o_leary_replaced_jamie_redknapp_as_team_captain_for_one_week_in_series_3_episode_8"='Amy Williams'; |
## Task
Generate a SQL query to answer the following question:
`Who was Andrew and Georgie's guest when Jamie and John's guest was Amy Williams?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29141354_3" (
"episode" text,
"first_broadcast" text,
"andrew_and_georgies_guest" text,
"jamie_and_johns_guest_dermot_o_leary_replaced_jamie_redknapp_as_team_captain_for_one_week_in_series_3_episode_8" text,
"scores" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was Andrew and Georgie's guest when Jamie and John's guest was Amy Williams?`:
```sql
|
SELECT "scores" FROM "table1_29141354_3" WHERE "jamie_and_johns_guest_dermot_o_leary_replaced_jamie_redknapp_as_team_captain_for_one_week_in_series_3_episode_8"='Boris Becker'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the episode when Jamie and John's guest was Boris Becker?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29141354_3" (
"episode" text,
"first_broadcast" text,
"andrew_and_georgies_guest" text,
"jamie_and_johns_guest_dermot_o_leary_replaced_jamie_redknapp_as_team_captain_for_one_week_in_series_3_episode_8" text,
"scores" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score for the episode when Jamie and John's guest was Boris Becker?`:
```sql
|
SELECT "first_broadcast" FROM "table1_29141354_4" WHERE "jamie_and_johns_guest"='Mark Webber'; |
## Task
Generate a SQL query to answer the following question:
`When id the episode broadcast with Mark Webber as Jamie and John's guest?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29141354_4" (
"episode" text,
"first_broadcast" text,
"andrew_and_georgies_guest_lee_mack_replaced_andrew_flintoff_as_team_captain_for_one_week_in_series_4_episode_2" text,
"jamie_and_johns_guest" text,
"scores" text
);
### SQL
Given the database schema, here is the SQL query that answers `When id the episode broadcast with Mark Webber as Jamie and John's guest?`:
```sql
|
SELECT "first_broadcast" FROM "table1_29141354_4" WHERE "jamie_and_johns_guest"='Andy Murray'; |
## Task
Generate a SQL query to answer the following question:
`What date did the episode with Andy Murray as Jamie and John's guest first broadcast?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29141354_4" (
"episode" text,
"first_broadcast" text,
"andrew_and_georgies_guest_lee_mack_replaced_andrew_flintoff_as_team_captain_for_one_week_in_series_4_episode_2" text,
"jamie_and_johns_guest" text,
"scores" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date did the episode with Andy Murray as Jamie and John's guest first broadcast?`:
```sql
|
SELECT COUNT("andrew_and_georgies_guest_lee_mack_replaced_andrew_flintoff_as_team_captain_for_one_week_in_series_4_episode_2") FROM "table1_29141354_4" WHERE "episode"='04x04'; |
## Task
Generate a SQL query to answer the following question:
`How many items are listed under 'andrew and georgies guest lee mack replaced andrew flint as team captain for one week' for episode 04x04?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29141354_4" (
"episode" text,
"first_broadcast" text,
"andrew_and_georgies_guest_lee_mack_replaced_andrew_flintoff_as_team_captain_for_one_week_in_series_4_episode_2" text,
"jamie_and_johns_guest" text,
"scores" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many items are listed under 'andrew and georgies guest lee mack replaced andrew flint as team captain for one week' for episode 04x04?`:
```sql
|
SELECT "guest_s" FROM "series_3" WHERE "ratings"='1.44m'; |
## Task
Generate a SQL query to answer the following question:
`who guest starred on the episode with a 1.44m rating`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_3" (
"episode" real,
"broadcast_date" text,
"guest_s" text,
"singer_s" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `who guest starred on the episode with a 1.44m rating`:
```sql
|
SELECT "broadcast_date" FROM "series_3" WHERE "guest_s"='Barbara Windsor and Heston Blumenthal'; |
## Task
Generate a SQL query to answer the following question:
`when was the episode on which barbara windsor and heston blumenthal guest starred broadcasted`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_3" (
"episode" real,
"broadcast_date" text,
"guest_s" text,
"singer_s" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `when was the episode on which barbara windsor and heston blumenthal guest starred broadcasted`:
```sql
|
SELECT COUNT("broadcast_date") FROM "series_3" WHERE "singer_s"='The Overtones'; |
## Task
Generate a SQL query to answer the following question:
`how many broadcaste dates features the overtones`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_3" (
"episode" real,
"broadcast_date" text,
"guest_s" text,
"singer_s" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `how many broadcaste dates features the overtones`:
```sql
|
SELECT COUNT("guest_s") FROM "series_3" WHERE "broadcast_date"='11September2012'; |
## Task
Generate a SQL query to answer the following question:
`how many guest stars did the episode that was broadcasted 11september2012 have`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_3" (
"episode" real,
"broadcast_date" text,
"guest_s" text,
"singer_s" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `how many guest stars did the episode that was broadcasted 11september2012 have`:
```sql
|
SELECT "broadcast_date" FROM "series_3" WHERE "guest_s"='Michael McIntyre and Alex James'; |
## Task
Generate a SQL query to answer the following question:
`when was the episode guest starring michael mcintyre and alex james broadcasted`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_3" (
"episode" real,
"broadcast_date" text,
"guest_s" text,
"singer_s" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `when was the episode guest starring michael mcintyre and alex james broadcasted`:
```sql
|
SELECT MIN("episode") FROM "series_3" WHERE "guest_s"='Sarah Millican and Grayson Perry'; |
## Task
Generate a SQL query to answer the following question:
`which episode did sarah millican and grayson perry appear in`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_3" (
"episode" real,
"broadcast_date" text,
"guest_s" text,
"singer_s" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `which episode did sarah millican and grayson perry appear in`:
```sql
|
SELECT "first_broadcast" FROM "table1_29141354_5" WHERE "andrew_and_jacks_guest"='Jessica Ennis'; |
## Task
Generate a SQL query to answer the following question:
`When were episodes first broadcast with jessica ennis as andrew and jacks guest?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29141354_5" (
"episode" text,
"first_broadcast" text,
"andrew_and_jacks_guest" text,
"jamies_guests_peter_crouch_replaced_jamie_redknapp_as_team_captain_for_one_week_in_series_5_episode_2" text,
"scores" text
);
### SQL
Given the database schema, here is the SQL query that answers `When were episodes first broadcast with jessica ennis as andrew and jacks guest?`:
```sql
|
SELECT "directed_by" FROM "table1_29152820_1" WHERE "written_by"='Eli Attie' AND "production_code"='2T5018'; |
## Task
Generate a SQL query to answer the following question:
`Who directed the episode that is written by Eli Attie and production code is 2t5018?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29152820_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed the episode that is written by Eli Attie and production code is 2t5018?`:
```sql
|
SELECT COUNT("no_in_season") FROM "table1_29152820_1" WHERE "no_in_series"=122; |
## Task
Generate a SQL query to answer the following question:
`How many episodes are 122 in the series?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29152820_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many episodes are 122 in the series?`:
```sql
|
SELECT "scores" FROM "table1_29141354_7" WHERE "andrew_and_jacks_guest"='Matt Smith'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the episode with Matt Smith as Andrew and Jack's guest?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29141354_7" (
"episode" text,
"first_broadcast" text,
"andrew_and_jacks_guest" text,
"jamies_guests" text,
"scores" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score for the episode with Matt Smith as Andrew and Jack's guest?`:
```sql
|
SELECT "first_broadcast" FROM "table1_29141354_7" WHERE "andrew_and_jacks_guest"='Amy Williams'; |
## Task
Generate a SQL query to answer the following question:
`When was the episode with Amy Williams as Andrew and Jack's guest broadcast?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29141354_7" (
"episode" text,
"first_broadcast" text,
"andrew_and_jacks_guest" text,
"jamies_guests" text,
"scores" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the episode with Amy Williams as Andrew and Jack's guest broadcast?`:
```sql
|
SELECT MIN("season_no") FROM "table1_29154676_1" WHERE "u_s_viewers_millions"='3.91'; |
## Task
Generate a SQL query to answer the following question:
`What is the last episode in the season that had 3.91 million viewers in the US?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29154676_1" (
"season_no" real,
"series_no" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the last episode in the season that had 3.91 million viewers in the US?`:
```sql
|
SELECT "season_no" FROM "table1_29154676_1" WHERE "title"='\"The Consoler\"'; |
## Task
Generate a SQL query to answer the following question:
`What are the episode numbers in season that were titled "The Consoler"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29154676_1" (
"season_no" real,
"series_no" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the episode numbers in season that were titled "The Consoler"?`:
```sql
|
SELECT COUNT("season_no") FROM "table1_29154676_1" WHERE "written_by"='Warren Leight'; |
## Task
Generate a SQL query to answer the following question:
`How many episodes were written by Warren Leight?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29154676_1" (
"season_no" real,
"series_no" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many episodes were written by Warren Leight?`:
```sql
|
SELECT "u_s_viewers_millions" FROM "table1_29154676_1" WHERE "title"='\"Cadaver\"'; |
## Task
Generate a SQL query to answer the following question:
`How many million viewers in the US did the episode titled "Cadaver" have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29154676_1" (
"season_no" real,
"series_no" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many million viewers in the US did the episode titled "Cadaver" have?`:
```sql
|
SELECT "season_no" FROM "table1_29154676_1" WHERE "title"='\"Cadaver\"'; |
## Task
Generate a SQL query to answer the following question:
`What is the number in season of the episode titled "Cadaver"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29154676_1" (
"season_no" real,
"series_no" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number in season of the episode titled "Cadaver"?`:
```sql
|
SELECT "regular_season_winner" FROM "table1_29146083_3" WHERE "conference_tournament"='1999 Big Sky Men''s Basketball Tournament'; |
## Task
Generate a SQL query to answer the following question:
`Who was the regular season winner of the 1999 Big Sky Men's Basketball Tournament was the conference tournament?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29146083_3" (
"conference" text,
"regular_season_winner" text,
"conference_player_of_the_year" text,
"conference_tournament" text,
"tournament_venue_city" text,
"tournament_winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the regular season winner of the 1999 Big Sky Men's Basketball Tournament was the conference tournament?`:
```sql
|
SELECT COUNT("championship") FROM "doubles_43_26_17" WHERE "score"='4β6, 7β6 (7β5) , [5β10]'; |
## Task
Generate a SQL query to answer the following question:
`How many championships were there where the score was 4β6, 7β6 (7β5) , [5β10]?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_43_26_17" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many championships were there where the score was 4β6, 7β6 (7β5) , [5β10]?`:
```sql
|
SELECT "surface" FROM "doubles_43_26_17" WHERE "score"='6β1, 4β6, [12β10]'; |
## Task
Generate a SQL query to answer the following question:
`On what surface was it the year when the score was 6β1, 4β6, [12β10]?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_43_26_17" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what surface was it the year when the score was 6β1, 4β6, [12β10]?`:
```sql
|
SELECT COUNT("opponent") FROM "doubles_43_26_17" WHERE "score"='6β4, 3β6, [11β13]'; |
## Task
Generate a SQL query to answer the following question:
`How many times has the score been 6β4, 3β6, [11β13]?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_43_26_17" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many times has the score been 6β4, 3β6, [11β13]?`:
```sql
|
SELECT "outgoing_head_coach" FROM "coaching_changes" WHERE "manner_of_departure"='Gardening leave 1'; |
## Task
Generate a SQL query to answer the following question:
`Who are the outgoing head coaches whose manner of departure is Gardening Leave 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "coaching_changes" (
"club" text,
"outgoing_head_coach" text,
"date_of_vacancy" text,
"manner_of_departure" text,
"incoming_head_coach" text,
"date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the outgoing head coaches whose manner of departure is Gardening Leave 1?`:
```sql
|
SELECT "incoming_head_coach" FROM "coaching_changes" WHERE "outgoing_head_coach"='Wan Jamak Wan Hassan'; |
## Task
Generate a SQL query to answer the following question:
`Who was the incoming head coach after Wan Jamak Wan Hassan quit the coaching job?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "coaching_changes" (
"club" text,
"outgoing_head_coach" text,
"date_of_vacancy" text,
"manner_of_departure" text,
"incoming_head_coach" text,
"date_of_appointment" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the incoming head coach after Wan Jamak Wan Hassan quit the coaching job?`:
```sql
|
SELECT "fastest_lap" FROM "table1_29162856_1" WHERE "round"=1; |
## Task
Generate a SQL query to answer the following question:
`Who had the fastest lap in round 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29162856_1" (
"round" real,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_rider" text,
"winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had the fastest lap in round 1?`:
```sql
|
SELECT "pole_position" FROM "table1_29162856_1" WHERE "fastest_lap"='Matt Davies'; |
## Task
Generate a SQL query to answer the following question:
`Who had the pole position when matt davies had the fastest lap?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29162856_1" (
"round" real,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_rider" text,
"winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had the pole position when matt davies had the fastest lap?`:
```sql
|
SELECT "pole_position" FROM "table1_29162856_1" WHERE "winning_rider"='Rob Guiver' AND "fastest_lap"='Kyle Ryde'; |
## Task
Generate a SQL query to answer the following question:
`Who had the pole position(s) when rob guiver won and kyle ryde had the fastest lap?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29162856_1" (
"round" real,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_rider" text,
"winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had the pole position(s) when rob guiver won and kyle ryde had the fastest lap?`:
```sql
|
SELECT MIN("year") FROM "mixed_doubles_9_7_2" WHERE "championship"='US Open (2)'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year in which the result is championship US Open (2)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_doubles_9_7_2" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year in which the result is championship US Open (2)?`:
```sql
|
SELECT "partner" FROM "mixed_doubles_9_7_2" WHERE "championship"='US Open (2)'; |
## Task
Generate a SQL query to answer the following question:
`Who was Bob Bryan's partner in the Championship where the result is US Open (2)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_doubles_9_7_2" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was Bob Bryan's partner in the Championship where the result is US Open (2)?`:
```sql
|
SELECT "score" FROM "mixed_doubles_9_7_2" WHERE "championship"='French Open'; |
## Task
Generate a SQL query to answer the following question:
`What are the results of those matches where the championship is French Open?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_doubles_9_7_2" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the results of those matches where the championship is French Open?`:
```sql
|
SELECT COUNT("original_air_date") FROM "table1_29196086_4" WHERE "written_by"='Harold Hayes Jr. & Craig S. Phillips'; |
## Task
Generate a SQL query to answer the following question:
`on how many days did the episode written by harold hayes jr. & craig s. phillips originally air`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29196086_4" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `on how many days did the episode written by harold hayes jr. & craig s. phillips originally air`:
```sql
|
SELECT "directed_by" FROM "table1_29196086_4" WHERE "title"='\"Grampires\"(Part 1)'; |
## Task
Generate a SQL query to answer the following question:
`who directed "grampires"(part 1)`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29196086_4" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `who directed "grampires"(part 1)`:
```sql
|
SELECT COUNT("no_in_series") FROM "table1_29196086_4" WHERE "original_air_date"='January19,2013'; |
## Task
Generate a SQL query to answer the following question:
`how many episodes originally aired january19,2013`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29196086_4" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `how many episodes originally aired january19,2013`:
```sql
|
SELECT MAX("no_in_season") FROM "table1_29196086_4" WHERE "original_air_date"='October20,2012'; |
## Task
Generate a SQL query to answer the following question:
`which episode of the season aired on october20,2012`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29196086_4" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `which episode of the season aired on october20,2012`:
```sql
|
SELECT "team" FROM "game_log" WHERE "game"=5; |
## Task
Generate a SQL query to answer the following question:
`Which team was the opponent in game 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team was the opponent in game 5?`:
```sql
|
SELECT "date" FROM "rating_figures" WHERE "official_rating_4"='4 633 925'; |
## Task
Generate a SQL query to answer the following question:
`When did the official rating 4+ reach 4 633 925?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rating_figures" (
"episode" real,
"date" text,
"official_rating_4" text,
"share_4" text,
"official_rating_16_39" text,
"share_16_39" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the official rating 4+ reach 4 633 925?`:
```sql
|
SELECT "series" FROM "game_log" WHERE "game"=5; |
## Task
Generate a SQL query to answer the following question:
`Lis the series for game 5.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `Lis the series for game 5.`:
```sql
|
SELECT "score" FROM "game_log" WHERE "high_points"='Boris Diaw (34)'; |
## Task
Generate a SQL query to answer the following question:
`What was the final in the game that boris diaw (34) scored the most points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the final in the game that boris diaw (34) scored the most points?`:
```sql
|
SELECT "december_28" FROM "reaction" WHERE "movies"='Ang Tanging Ina Mo (Last na ''To!)'; |
## Task
Generate a SQL query to answer the following question:
`What is the figure for December 28 for ang tanging ina mo (last na 'to!)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "reaction" (
"movies" text,
"december_25" text,
"december_26" text,
"december_27" text,
"december_28" text,
"december_25_28_total" text,
"total_2_week_gross" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the figure for December 28 for ang tanging ina mo (last na 'to!)?`:
```sql
|
SELECT "december_27" FROM "reaction" WHERE "movies"='Ang Tanging Ina Mo (Last na ''To!)'; |
## Task
Generate a SQL query to answer the following question:
`What is the figure for December 27 for ang tanging ina mo (last na 'to!)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "reaction" (
"movies" text,
"december_25" text,
"december_26" text,
"december_27" text,
"december_28" text,
"december_25_28_total" text,
"total_2_week_gross" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the figure for December 27 for ang tanging ina mo (last na 'to!)?`:
```sql
|
SELECT COUNT("december_28") FROM "reaction" WHERE "movies"='Rosario'; |
## Task
Generate a SQL query to answer the following question:
`How many figures are provided for December 28 for Rosario?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "reaction" (
"movies" text,
"december_25" text,
"december_26" text,
"december_27" text,
"december_28" text,
"december_25_28_total" text,
"total_2_week_gross" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many figures are provided for December 28 for Rosario?`:
```sql
|
SELECT "december_25" FROM "reaction" WHERE "december_25_28_total"='P15.3 million'; |
## Task
Generate a SQL query to answer the following question:
`What is the figure for December 25 for the film that totalled p15.3 million for December 25-28 total?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "reaction" (
"movies" text,
"december_25" text,
"december_26" text,
"december_27" text,
"december_28" text,
"december_25_28_total" text,
"total_2_week_gross" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the figure for December 25 for the film that totalled p15.3 million for December 25-28 total?`:
```sql
|
SELECT "movies" FROM "reaction" WHERE "december_25"='P3.2 million'; |
## Task
Generate a SQL query to answer the following question:
`What film earmed p3.2 million on December 25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "reaction" (
"movies" text,
"december_25" text,
"december_26" text,
"december_27" text,
"december_28" text,
"december_25_28_total" text,
"total_2_week_gross" text
);
### SQL
Given the database schema, here is the SQL query that answers `What film earmed p3.2 million on December 25?`:
```sql
|
SELECT "fri_3_june" FROM "practice_times_and_leaderboard_600cc" WHERE "thurs_2_june"='20'' 50.45 108.623mph'; |
## Task
Generate a SQL query to answer the following question:
`What was the Friday June 3 practice time of the rider who did 20' 50.45 108.623mph on Thursday, June 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "practice_times_and_leaderboard_600cc" (
"rank" real,
"rider" text,
"mon_30_may" text,
"tues_31_may" text,
"wed_1_june" text,
"thurs_2_june" text,
"fri_3_june" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Friday June 3 practice time of the rider who did 20' 50.45 108.623mph on Thursday, June 2?`:
```sql
|
SELECT "wed_1_june" FROM "practice_times_and_leaderboard_600cc" WHERE "thurs_2_june"='21'' 05.87 107.300mph'; |
## Task
Generate a SQL query to answer the following question:
`What's the Wednesday, June 1 practice time for the rider that did 21' 05.87 107.300mph on Thursday, June 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "practice_times_and_leaderboard_600cc" (
"rank" real,
"rider" text,
"mon_30_may" text,
"tues_31_may" text,
"wed_1_june" text,
"thurs_2_june" text,
"fri_3_june" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the Wednesday, June 1 practice time for the rider that did 21' 05.87 107.300mph on Thursday, June 2?`:
```sql
|
SELECT COUNT("written_by") FROM "table1_29219286_1" WHERE "directed_by"='Ernest Dickerson' AND "no_in_season"=9; |
## Task
Generate a SQL query to answer the following question:
`How many people wrote episode 9 in the season that was directed by Ernest Dickerson?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29219286_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people wrote episode 9 in the season that was directed by Ernest Dickerson?`:
```sql
|
SELECT "written_by" FROM "table1_29219286_1" WHERE "directed_by"='Milan Cheylov'; |
## Task
Generate a SQL query to answer the following question:
`Who wrote the episode that was directed by Milan Cheylov?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29219286_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who wrote the episode that was directed by Milan Cheylov?`:
```sql
|
SELECT COUNT("no_in_season") FROM "table1_29219286_1" WHERE "title"='\"First Blood\"'; |
## Task
Generate a SQL query to answer the following question:
`How many episodes in the season had the title, "first blood"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29219286_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"u_s_viewers_millions" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many episodes in the season had the title, "first blood"?`:
```sql
|
SELECT "ep_winning_team" FROM "table1_29225103_2" WHERE "cp_winning_team"='Dave Clark' AND "gm_winning_team"='Stuart Northrup'; |
## Task
Generate a SQL query to answer the following question:
`Who was the EP winning team when the CP winning team was Dave Clark and the GM winning team was Stuart Northrup?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29225103_2" (
"rnd" text,
"circuit" text,
"ap_winning_team" text,
"bp_winning_team" text,
"cm_winning_team" text,
"cp_winning_team" text,
"dm_winning_team" text,
"dp_winning_team" text,
"em_winning_team" text,
"ep_winning_team" text,
"fm_winning_team" text,
"fp_winning_team" text,
"gm_winning_team" text,
"gp_winning_team" text,
"hm_winning_team" text,
"hp_winning_team" text,
"results" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the EP winning team when the CP winning team was Dave Clark and the GM winning team was Stuart Northrup?`:
```sql
|
SELECT "cm_winning_team" FROM "table1_29225103_2" WHERE "fm_winning_team"='#17 Elva - Ford'; |
## Task
Generate a SQL query to answer the following question:
`Who was the CM winning team when the FM winning team was #17 Elva - Ford?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29225103_2" (
"rnd" text,
"circuit" text,
"ap_winning_team" text,
"bp_winning_team" text,
"cm_winning_team" text,
"cp_winning_team" text,
"dm_winning_team" text,
"dp_winning_team" text,
"em_winning_team" text,
"ep_winning_team" text,
"fm_winning_team" text,
"fp_winning_team" text,
"gm_winning_team" text,
"gp_winning_team" text,
"hm_winning_team" text,
"hp_winning_team" text,
"results" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the CM winning team when the FM winning team was #17 Elva - Ford?`:
```sql
|
SELECT "gm_winning_team" FROM "table1_29225103_2" WHERE "ep_winning_team"='#37 Porsche'; |
## Task
Generate a SQL query to answer the following question:
`Who the GM winning team when the EP winning team was #37 Porsche? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29225103_2" (
"rnd" text,
"circuit" text,
"ap_winning_team" text,
"bp_winning_team" text,
"cm_winning_team" text,
"cp_winning_team" text,
"dm_winning_team" text,
"dp_winning_team" text,
"em_winning_team" text,
"ep_winning_team" text,
"fm_winning_team" text,
"fp_winning_team" text,
"gm_winning_team" text,
"gp_winning_team" text,
"hm_winning_team" text,
"hp_winning_team" text,
"results" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who the GM winning team when the EP winning team was #37 Porsche? `:
```sql
|
SELECT "ep_winning_team" FROM "table1_29225103_2" WHERE "fm_winning_team"='Brabham - Ford' AND "hm_winning_team"='Osca'; |
## Task
Generate a SQL query to answer the following question:
`Who was the EP winning team when the FM winning team was Brabham - Ford and the HM winning team was Osca?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29225103_2" (
"rnd" text,
"circuit" text,
"ap_winning_team" text,
"bp_winning_team" text,
"cm_winning_team" text,
"cp_winning_team" text,
"dm_winning_team" text,
"dp_winning_team" text,
"em_winning_team" text,
"ep_winning_team" text,
"fm_winning_team" text,
"fp_winning_team" text,
"gm_winning_team" text,
"gp_winning_team" text,
"hm_winning_team" text,
"hp_winning_team" text,
"results" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the EP winning team when the FM winning team was Brabham - Ford and the HM winning team was Osca?`:
```sql
|
SELECT "hp_winning_team" FROM "table1_29225103_2" WHERE "ep_winning_team"='Hans Zereis' AND "gm_winning_team"='Charles Gibson'; |
## Task
Generate a SQL query to answer the following question:
`Who was the HP winning team when the EP winning team was Hans Zereis and the GM winning team was Charles Gibson? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29225103_2" (
"rnd" text,
"circuit" text,
"ap_winning_team" text,
"bp_winning_team" text,
"cm_winning_team" text,
"cp_winning_team" text,
"dm_winning_team" text,
"dp_winning_team" text,
"em_winning_team" text,
"ep_winning_team" text,
"fm_winning_team" text,
"fp_winning_team" text,
"gm_winning_team" text,
"gp_winning_team" text,
"hm_winning_team" text,
"hp_winning_team" text,
"results" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the HP winning team when the EP winning team was Hans Zereis and the GM winning team was Charles Gibson? `:
```sql
|
SELECT "team" FROM "norwegian_clubs_performance_in_europe" WHERE "opponent"='Elfsborg'; |
## Task
Generate a SQL query to answer the following question:
`what was the name of the team opponent to elfsborg`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "norwegian_clubs_performance_in_europe" (
"team" text,
"contest_and_round" text,
"opponent" text,
"1st_leg_score" text,
"2nd_leg_score" text,
"aggregate_score" text
);
### SQL
Given the database schema, here is the SQL query that answers `what was the name of the team opponent to elfsborg`:
```sql
|
SELECT COUNT("1st_leg_score") FROM "norwegian_clubs_performance_in_europe" WHERE "contest_and_round"='Europa League Play Off Round'; |
## Task
Generate a SQL query to answer the following question:
`what is the score in the 1st leg where the contest and round was in europa league play off round`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "norwegian_clubs_performance_in_europe" (
"team" text,
"contest_and_round" text,
"opponent" text,
"1st_leg_score" text,
"2nd_leg_score" text,
"aggregate_score" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the score in the 1st leg where the contest and round was in europa league play off round`:
```sql
|
SELECT "team" FROM "norwegian_clubs_performance_in_europe" WHERE "aggregate_score"='L 1β2'; |
## Task
Generate a SQL query to answer the following question:
`what is the name of the team which aggregate score is l 1β2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "norwegian_clubs_performance_in_europe" (
"team" text,
"contest_and_round" text,
"opponent" text,
"1st_leg_score" text,
"2nd_leg_score" text,
"aggregate_score" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the name of the team which aggregate score is l 1β2`:
```sql
|
SELECT "aggregate_score" FROM "norwegian_clubs_performance_in_europe" WHERE "contest_and_round"='Europa League Play Off Round'; |
## Task
Generate a SQL query to answer the following question:
`what is the aggregate score for the europa league play off round contest and round`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "norwegian_clubs_performance_in_europe" (
"team" text,
"contest_and_round" text,
"opponent" text,
"1st_leg_score" text,
"2nd_leg_score" text,
"aggregate_score" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the aggregate score for the europa league play off round contest and round`:
```sql
|
SELECT "sydney" FROM "public_transport_pricing" WHERE "distance"='10km'; |
## Task
Generate a SQL query to answer the following question:
`How many dollars is listed under Sydney when the distance is 10km?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "public_transport_pricing" (
"distance" text,
"adelaide" text,
"brisbane" text,
"canberra" text,
"melbourne" text,
"perth" text,
"sydney" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many dollars is listed under Sydney when the distance is 10km?`:
```sql
|
SELECT COUNT("distance") FROM "public_transport_pricing" WHERE "brisbane"='$3.80'; |
## Task
Generate a SQL query to answer the following question:
`How many distance places have brisbane at $3.80?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "public_transport_pricing" (
"distance" text,
"adelaide" text,
"brisbane" text,
"canberra" text,
"melbourne" text,
"perth" text,
"sydney" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many distance places have brisbane at $3.80?`:
```sql
|
SELECT COUNT("melbourne") FROM "public_transport_pricing" WHERE "distance"='15km'; |
## Task
Generate a SQL query to answer the following question:
`How many listings under Melbourne has a distance at 15km?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "public_transport_pricing" (
"distance" text,
"adelaide" text,
"brisbane" text,
"canberra" text,
"melbourne" text,
"perth" text,
"sydney" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many listings under Melbourne has a distance at 15km?`:
```sql
|
SELECT "distance" FROM "public_transport_pricing" WHERE "brisbane"='$4.80'; |
## Task
Generate a SQL query to answer the following question:
`What is the distance when brisbane is $4.80?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "public_transport_pricing" (
"distance" text,
"adelaide" text,
"brisbane" text,
"canberra" text,
"melbourne" text,
"perth" text,
"sydney" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the distance when brisbane is $4.80?`:
```sql
|
SELECT "distance" FROM "public_transport_pricing" WHERE "brisbane"='$5.20'; |
## Task
Generate a SQL query to answer the following question:
`What is the distance when brisbane is $5.20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "public_transport_pricing" (
"distance" text,
"adelaide" text,
"brisbane" text,
"canberra" text,
"melbourne" text,
"perth" text,
"sydney" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the distance when brisbane is $5.20?`:
```sql
|
SELECT COUNT("helen_sildna") FROM "table1_29261215_4" WHERE "iiris_vesik"=3; |
## Task
Generate a SQL query to answer the following question:
`How many scores did Helen Sildna give when Iiris Vesik gave a 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29261215_4" (
"artist" text,
"jaanu_n_gisto" real,
"iiris_vesik" real,
"erik_morna" real,
"veronika_portsmuth" real,
"chalice" real,
"kristo_rajasaare" real,
"hannaliisa_uusmaa" real,
"siim_nestor" real,
"peeter_v_hi" real,
"helen_sildna" real,
"ott_lepland" real,
"total" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many scores did Helen Sildna give when Iiris Vesik gave a 3?`:
```sql
|
SELECT MIN("points") FROM "table1_29261215_4" WHERE "peeter_v_hi"=9; |
## Task
Generate a SQL query to answer the following question:
`What is the maximum points received when Peeter VΓ€hl gave a 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29261215_4" (
"artist" text,
"jaanu_n_gisto" real,
"iiris_vesik" real,
"erik_morna" real,
"veronika_portsmuth" real,
"chalice" real,
"kristo_rajasaare" real,
"hannaliisa_uusmaa" real,
"siim_nestor" real,
"peeter_v_hi" real,
"helen_sildna" real,
"ott_lepland" real,
"total" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the maximum points received when Peeter VΓ€hl gave a 9?`:
```sql
|
SELECT "manager" FROM "team_summaries" WHERE "club"='FC Inter'; |
## Task
Generate a SQL query to answer the following question:
`Who is the manager for the fc inter club?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "team_summaries" (
"club" text,
"location" text,
"stadium" text,
"capacity" real,
"manager" text,
"captain" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the manager for the fc inter club?`:
```sql
|
SELECT "club" FROM "team_summaries" WHERE "location"='Kuopio'; |
## Task
Generate a SQL query to answer the following question:
`Which club is at the location of kuopio?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "team_summaries" (
"club" text,
"location" text,
"stadium" text,
"capacity" real,
"manager" text,
"captain" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which club is at the location of kuopio?`:
```sql
|
SELECT COUNT("stadium") FROM "team_summaries" WHERE "club"='Haka'; |
## Task
Generate a SQL query to answer the following question:
`How many stadiums have haka as the club?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "team_summaries" (
"club" text,
"location" text,
"stadium" text,
"capacity" real,
"manager" text,
"captain" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many stadiums have haka as the club?`:
```sql
|
SELECT "artist_2" FROM "table1_29264319_1" WHERE "artist_1"='Sparfunk & D-Code'; |
## Task
Generate a SQL query to answer the following question:
`Who is the artist 2 on the setlist where the artist 1 is Sparfunk & D-Code?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29264319_1" (
"song_1_title" text,
"artist_1" text,
"song_2_title" text,
"artist_2" text,
"mix_artist" text,
"venue" text,
"battle_mix" text,
"setlist" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the artist 2 on the setlist where the artist 1 is Sparfunk & D-Code?`:
```sql
|
SELECT "mix_artist" FROM "table1_29264319_1" WHERE "setlist"='Closing Party' AND "artist_1"='Dillinja and Skibadee'; |
## Task
Generate a SQL query to answer the following question:
`Who is the mix artist for the closing party setlist where artist 1 is Dillinja and Skibadee?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29264319_1" (
"song_1_title" text,
"artist_1" text,
"song_2_title" text,
"artist_2" text,
"mix_artist" text,
"venue" text,
"battle_mix" text,
"setlist" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the mix artist for the closing party setlist where artist 1 is Dillinja and Skibadee?`:
```sql
|
SELECT "artist_1" FROM "table1_29264319_1" WHERE "song_1_title"='\"Bounce (Remix)\"'; |
## Task
Generate a SQL query to answer the following question:
`Who is the artist 1 on the setlist where the song 1 title is "Bounce (Remix)"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29264319_1" (
"song_1_title" text,
"artist_1" text,
"song_2_title" text,
"artist_2" text,
"mix_artist" text,
"venue" text,
"battle_mix" text,
"setlist" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the artist 1 on the setlist where the song 1 title is "Bounce (Remix)"?`:
```sql
|
SELECT COUNT("original_air_date") FROM "table1_29273115_1" WHERE "written_by"='Charlie Day'; |
## Task
Generate a SQL query to answer the following question:
`On how many different dates was the episode written by Charlie Day aired for the first time?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29273115_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `On how many different dates was the episode written by Charlie Day aired for the first time?`:
```sql
|
SELECT "written_by" FROM "table1_29273115_1" WHERE "production_code"='IP02009'; |
## Task
Generate a SQL query to answer the following question:
`Who are the writers of the episode with production code IP02009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29273115_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the writers of the episode with production code IP02009?`:
```sql
|
SELECT "written_by" FROM "table1_29273115_1" WHERE "title"='\"Mac Bangs Dennis'' Mom\"'; |
## Task
Generate a SQL query to answer the following question:
`Who are the writers of the episode titled "Mac Bangs Dennis' Mom"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29273115_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the writers of the episode titled "Mac Bangs Dennis' Mom"?`:
```sql
|
SELECT COUNT("title") FROM "table1_29273115_1" WHERE "production_code"='IP02003'; |
## Task
Generate a SQL query to answer the following question:
`How many different titles does the episode with production code IP02003 have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_29273115_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many different titles does the episode with production code IP02003 have?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.