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