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_27547668_2\" (\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"viewers\" real,\n \"original_airdate\" text,\n \"prod_code\" real\n);\n\nQuestion: What is the title of the episode with production code 102?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_27547668_2\" WHERE \"prod_code\"=102;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27547668_2\" (\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"viewers\" real,\n \"original_airdate\" text,\n \"prod_code\" real\n);\n\nQuestion: What is the original air date of # 6?"
},
{
"role": "assistant",
"content": "SELECT \"original_airdate\" FROM \"table1_27547668_2\" WHERE \"num\"=6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27547668_2\" (\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"viewers\" real,\n \"original_airdate\" text,\n \"prod_code\" real\n);\n\nQuestion: What is the original air date of the episode with 908000 viewers?"
},
{
"role": "assistant",
"content": "SELECT \"original_airdate\" FROM \"table1_27547668_2\" WHERE \"viewers\"=908000;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27553627_2\" (\n \"season\" text,\n \"episodes\" real,\n \"timeslot_est\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: How many season premieres had 15.27 million viewers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"season_premiere\") FROM \"table1_27553627_2\" WHERE \"viewers_in_millions\"='15.27';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27553627_2\" (\n \"season\" text,\n \"episodes\" real,\n \"timeslot_est\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: When was the season finale that ranked 20th?"
},
{
"role": "assistant",
"content": "SELECT \"season_finale\" FROM \"table1_27553627_2\" WHERE \"rank\"='20th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27553627_2\" (\n \"season\" text,\n \"episodes\" real,\n \"timeslot_est\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: What tv season year had 14.54 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"tv_season\" FROM \"table1_27553627_2\" WHERE \"viewers_in_millions\"='14.54';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27553627_2\" (\n \"season\" text,\n \"episodes\" real,\n \"timeslot_est\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: What season premiere date had a finale on may 22, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"season_premiere\" FROM \"table1_27553627_2\" WHERE \"season_finale\"='May 22, 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27553627_2\" (\n \"season\" text,\n \"episodes\" real,\n \"timeslot_est\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: What episode number had 14.41 million viewers?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"episodes\") FROM \"table1_27553627_2\" WHERE \"viewers_in_millions\"='14.41';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27561505_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"sports_2_0_winning_team\" text,\n \"sports_2_0_winning_team\" text,\n \"gt_2_0_winning_team\" text,\n \"gt_2_0_winning_team\" text,\n \"results\" text\n);\n\nQuestion: What is the minimum rnd at Laguna Seca?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rnd\") FROM \"table1_27561505_2\" WHERE \"circuit\"='Laguna Seca';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27561503_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"sports_2_0_winning_team\" text,\n \"sports_2_0_winning_team\" text,\n \"gt_2_0_winning_team\" text,\n \"gt_2_0_winning_team\" text,\n \"results\" text\n);\n\nQuestion: Name the gt 2.0 winning team for sports 2.0 winning team for #16 trans ocean motors for castle rock"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gt_2_0_winning_team\") FROM \"table1_27561503_2\" WHERE \"sports_2_0_winning_team\"='#16 Trans Ocean Motors' AND \"circuit\"='Castle Rock';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27561503_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"sports_2_0_winning_team\" text,\n \"sports_2_0_winning_team\" text,\n \"gt_2_0_winning_team\" text,\n \"gt_2_0_winning_team\" text,\n \"results\" text\n);\n\nQuestion: Name the rnd for hap sharp"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rnd\") FROM \"table1_27561503_2\" WHERE \"sports_2_0_winning_team\"='Hap Sharp';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27561503_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"sports_2_0_winning_team\" text,\n \"sports_2_0_winning_team\" text,\n \"gt_2_0_winning_team\" text,\n \"gt_2_0_winning_team\" text,\n \"results\" text\n);\n\nQuestion: Name the results for #23 lotus"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"results\") FROM \"table1_27561503_2\" WHERE \"sports_2_0_winning_team\"='#23 Lotus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27561503_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"sports_2_0_winning_team\" text,\n \"sports_2_0_winning_team\" text,\n \"gt_2_0_winning_team\" text,\n \"gt_2_0_winning_team\" text,\n \"results\" text\n);\n\nQuestion: Name the sports 2.0 winning team for hap sharp and castle rock"
},
{
"role": "assistant",
"content": "SELECT \"sports_2_0_winning_team\" FROM \"table1_27561503_2\" WHERE \"sports_2_0_winning_team\"='Hap Sharp' AND \"circuit\"='Castle Rock';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27561503_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"sports_2_0_winning_team\" text,\n \"sports_2_0_winning_team\" text,\n \"gt_2_0_winning_team\" text,\n \"gt_2_0_winning_team\" text,\n \"results\" text\n);\n\nQuestion: Name results for herb wetanson"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"table1_27561503_2\" WHERE \"gt_2_0_winning_team\"='Herb Wetanson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27592654_2\" (\n \"member\" text,\n \"electorate\" text,\n \"province\" text,\n \"m_ps_term\" text,\n \"election_date\" text\n);\n\nQuestion: What was the province if the electorate was Collingwood?"
},
{
"role": "assistant",
"content": "SELECT \"province\" FROM \"table1_27592654_2\" WHERE \"electorate\"='Collingwood';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27592654_2\" (\n \"member\" text,\n \"electorate\" text,\n \"province\" text,\n \"m_ps_term\" text,\n \"election_date\" text\n);\n\nQuestion: What was the province with an election date of 5 cannot handle non-empty timestamp argument! 1861?"
},
{
"role": "assistant",
"content": "SELECT \"province\" FROM \"table1_27592654_2\" WHERE \"election_date\"='5 Cannot handle non-empty timestamp argument! 1861';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team_name\" text,\n \"races\" real,\n \"poles\" real,\n \"wins\" real,\n \"podiums\" real,\n \"f_laps\" real,\n \"points\" real,\n \"final_placing\" text\n);\n\nQuestion: Name the races for final placing being 5th"
},
{
"role": "assistant",
"content": "SELECT \"races\" FROM \"career_summary\" WHERE \"final_placing\"='5th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team_name\" text,\n \"races\" real,\n \"poles\" real,\n \"wins\" real,\n \"podiums\" real,\n \"f_laps\" real,\n \"points\" real,\n \"final_placing\" text\n);\n\nQuestion: Name the post poles for 4 podiums"
},
{
"role": "assistant",
"content": "SELECT MAX(\"poles\") FROM \"career_summary\" WHERE \"podiums\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What was the result for Barreto when his song choice was \"Olhar 43\"?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"performances\" WHERE \"song_choice\"='\\\"Olhar 43\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What was Barreto's song choice when the theme was samba?"
},
{
"role": "assistant",
"content": "SELECT \"song_choice\" FROM \"performances\" WHERE \"theme\"='Samba';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What was Barreto's song choice where the original artist was Patricia Marx?"
},
{
"role": "assistant",
"content": "SELECT \"song_choice\" FROM \"performances\" WHERE \"original_artist\"='Patricia Marx';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: In which week # was the original artist of Barreto's song choice was Leila Pinheiro?"
},
{
"role": "assistant",
"content": "SELECT \"week_num\" FROM \"performances\" WHERE \"original_artist\"='Leila Pinheiro';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: Who is the original artist of \"\u00c9 Preciso Saber Viver\"?"
},
{
"role": "assistant",
"content": "SELECT \"original_artist\" FROM \"performances\" WHERE \"song_choice\"='\\\"\u00c9 Preciso Saber Viver\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_19_9_titles_10_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: When did the earliest tournament happened?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"doubles_19_9_titles_10_runners_up\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_19_9_titles_10_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who was Petrova's partner where she scored 6\u20132, 3\u20136, 6\u20137 (7-9)?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"doubles_19_9_titles_10_runners_up\" WHERE \"score\"='6\u20132, 3\u20136, 6\u20137 (7-9)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_19_9_titles_10_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who were Petrova's opponents with Vania King?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_19_9_titles_10_runners_up\" WHERE \"partner\"='Vania King';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27610775_1\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many episodes titled \"Blue in the face\" were directed by Sean McNamara?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"series_num\") FROM \"table1_27610775_1\" WHERE \"directed_by\"='Sean McNamara' AND \"title\"='\\\"Blue in the Face\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27610775_1\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who wrote the episode with the production code 211?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_27610775_1\" WHERE \"prod_code\"=211;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27610775_1\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What is the maximum production code of the episode directed by Sean McNamara?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"prod_code\") FROM \"table1_27610775_1\" WHERE \"directed_by\"='Sean McNamara';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regional_auditions\" (\n \"episode_air_date\" text,\n \"audition_city\" text,\n \"audition_date\" text,\n \"audition_venue\" text,\n \"guest_fourth_judge\" text\n);\n\nQuestion: How many audition city's are there with an episode air date of June 24, 2010?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"audition_city\") FROM \"regional_auditions\" WHERE \"episode_air_date\"='June 24, 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regional_auditions\" (\n \"episode_air_date\" text,\n \"audition_city\" text,\n \"audition_date\" text,\n \"audition_venue\" text,\n \"guest_fourth_judge\" text\n);\n\nQuestion: List all episode air dates that auditioned at Nego Quirido Sambadrome?"
},
{
"role": "assistant",
"content": "SELECT \"episode_air_date\" FROM \"regional_auditions\" WHERE \"audition_venue\"='Nego Quirido Sambadrome';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regional_auditions\" (\n \"episode_air_date\" text,\n \"audition_city\" text,\n \"audition_date\" text,\n \"audition_venue\" text,\n \"guest_fourth_judge\" text\n);\n\nQuestion: List all episode air dates where Luiza Possi was the guest fourth judge?"
},
{
"role": "assistant",
"content": "SELECT \"episode_air_date\" FROM \"regional_auditions\" WHERE \"guest_fourth_judge\"='Luiza Possi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regional_auditions\" (\n \"episode_air_date\" text,\n \"audition_city\" text,\n \"audition_date\" text,\n \"audition_venue\" text,\n \"guest_fourth_judge\" text\n);\n\nQuestion: How many episode air dates are there for auditioning city Rio De Janeiro?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"episode_air_date\") FROM \"regional_auditions\" WHERE \"audition_city\"='Rio de Janeiro';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regional_auditions\" (\n \"episode_air_date\" text,\n \"audition_city\" text,\n \"audition_date\" text,\n \"audition_venue\" text,\n \"guest_fourth_judge\" text\n);\n\nQuestion: List all episode air dates whose audition venues were Nego Quirido Sambadrome?"
},
{
"role": "assistant",
"content": "SELECT \"episode_air_date\" FROM \"regional_auditions\" WHERE \"audition_venue\"='Nego Quirido Sambadrome';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regional_auditions\" (\n \"episode_air_date\" text,\n \"audition_city\" text,\n \"audition_date\" text,\n \"audition_venue\" text,\n \"guest_fourth_judge\" text\n);\n\nQuestion: Where was the audition venue where Peninha was the guest fourth judge?"
},
{
"role": "assistant",
"content": "SELECT \"audition_venue\" FROM \"regional_auditions\" WHERE \"guest_fourth_judge\"='Peninha';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: Which song was picked that was originally performed by Marisa Monte?"
},
{
"role": "assistant",
"content": "SELECT \"song_choice\" FROM \"performances\" WHERE \"original_artist\"='Marisa Monte';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: Who was the original artist of the song choice \"Sozinho\"?"
},
{
"role": "assistant",
"content": "SELECT \"original_artist\" FROM \"performances\" WHERE \"song_choice\"='\\\"Sozinho\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What was the result of the performance of the song by Caetano Veloso?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"performances\" WHERE \"original_artist\"='Caetano Veloso';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What was the order # of the theme Male Singers?"
},
{
"role": "assistant",
"content": "SELECT \"order_num\" FROM \"performances\" WHERE \"theme\"='Male Singers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What was the theme when original artist Rosana's song was performed?"
},
{
"role": "assistant",
"content": "SELECT \"theme\" FROM \"performances\" WHERE \"original_artist\"='Rosana';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: How many different weeks are there in order number 4 that were judge's choice?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week_num\") FROM \"performances\" WHERE \"theme\"='Judge''s Choice' AND \"order_num\"='4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What Marisa Monte song choice was song during top 5?"
},
{
"role": "assistant",
"content": "SELECT \"song_choice\" FROM \"performances\" WHERE \"week_num\"='Top 5' AND \"original_artist\"='Marisa Monte';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: Who was the original artist of the Top 12 Men theme?"
},
{
"role": "assistant",
"content": "SELECT \"original_artist\" FROM \"performances\" WHERE \"theme\"='Top 12 Men';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What was the result of the Top 12 Men theme?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"performances\" WHERE \"theme\"='Top 12 Men';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What week number was the result bottom 3?"
},
{
"role": "assistant",
"content": "SELECT \"week_num\" FROM \"performances\" WHERE \"result\"='Bottom 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_stats\" (\n \"tournament\" text,\n \"games_played\" real,\n \"points_per_game\" text,\n \"rebounds_per_game\" text,\n \"assists_per_game\" text\n);\n\nQuestion: How many points per game did he have when he had 1.5 assists per game?"
},
{
"role": "assistant",
"content": "SELECT \"points_per_game\" FROM \"international_stats\" WHERE \"assists_per_game\"='1.5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_stats\" (\n \"tournament\" text,\n \"games_played\" real,\n \"points_per_game\" text,\n \"rebounds_per_game\" text,\n \"assists_per_game\" text\n);\n\nQuestion: How many rebounds per game did he have at the 2006 fiba world championship?"
},
{
"role": "assistant",
"content": "SELECT \"rebounds_per_game\" FROM \"international_stats\" WHERE \"tournament\"='2006 FIBA World Championship';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_stats\" (\n \"tournament\" text,\n \"games_played\" real,\n \"points_per_game\" text,\n \"rebounds_per_game\" text,\n \"assists_per_game\" text\n);\n\nQuestion: How many rebounds per game did he have at the 2003 eurobasket?"
},
{
"role": "assistant",
"content": "SELECT \"rebounds_per_game\" FROM \"international_stats\" WHERE \"tournament\"='2003 EuroBasket';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_stats\" (\n \"tournament\" text,\n \"games_played\" real,\n \"points_per_game\" text,\n \"rebounds_per_game\" text,\n \"assists_per_game\" text\n);\n\nQuestion: How many assists per game did he have when he had 6.8 points per game?"
},
{
"role": "assistant",
"content": "SELECT \"assists_per_game\" FROM \"international_stats\" WHERE \"points_per_game\"='6.8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27622417_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_millions\" text,\n \"original_u_s_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: which is the production code when the number of the episode in series is 87? "
},
{
"role": "assistant",
"content": "SELECT \"prod_code\" FROM \"table1_27622417_1\" WHERE \"no_in_series\"=87;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27622417_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_millions\" text,\n \"original_u_s_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: how many directors had the episode called \"magic unmasked\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"directed_by\") FROM \"table1_27622417_1\" WHERE \"title\"='\\\"Magic Unmasked\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27622417_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_millions\" text,\n \"original_u_s_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: what is the number of the episode in the series whose production code is 405?"
},
{
"role": "assistant",
"content": "SELECT \"no_in_series\" FROM \"table1_27622417_1\" WHERE \"prod_code\"='405';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27622417_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_millions\" text,\n \"original_u_s_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: when was the premiere of the episode whose production code is 415? "
},
{
"role": "assistant",
"content": "SELECT \"original_u_s_air_date\" FROM \"table1_27622417_1\" WHERE \"prod_code\"='415';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27622417_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_millions\" text,\n \"original_u_s_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: who were the writers in the episode whose production code was 411? "
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_27622417_1\" WHERE \"prod_code\"='411';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27622417_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_millions\" text,\n \"original_u_s_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: who were the director of the episode whose number in the season is 17? "
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_27622417_1\" WHERE \"no_in_season\"=17;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_issuers\" (\n \"currency\" text,\n \"country\" text,\n \"generic_name_or_nickname\" text,\n \"rating_s_p_moodys\" text,\n \"negotiable_debt_at_mid_2005_us_dollar_bn_equivalent\" real,\n \"government_financial_liabilities_as_pct_of_gdp_end_2003_source_oecd\" text,\n \"issuer\" text,\n \"internet_site\" text\n);\n\nQuestion: Name the currency for negotiable debt being 1300"
},
{
"role": "assistant",
"content": "SELECT \"currency\" FROM \"main_issuers\" WHERE \"negotiable_debt_at_mid_2005_us_dollar_bn_equivalent\"=1300;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_issuers\" (\n \"currency\" text,\n \"country\" text,\n \"generic_name_or_nickname\" text,\n \"rating_s_p_moodys\" text,\n \"negotiable_debt_at_mid_2005_us_dollar_bn_equivalent\" real,\n \"government_financial_liabilities_as_pct_of_gdp_end_2003_source_oecd\" text,\n \"issuer\" text,\n \"internet_site\" text\n);\n\nQuestion: Name the country that has the yen"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"main_issuers\" WHERE \"currency\"='Yen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_issuers\" (\n \"currency\" text,\n \"country\" text,\n \"generic_name_or_nickname\" text,\n \"rating_s_p_moodys\" text,\n \"negotiable_debt_at_mid_2005_us_dollar_bn_equivalent\" real,\n \"government_financial_liabilities_as_pct_of_gdp_end_2003_source_oecd\" text,\n \"issuer\" text,\n \"internet_site\" text\n);\n\nQuestion: Name the number of countries that have the us dollar"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"country\") FROM \"main_issuers\" WHERE \"currency\"='US dollar';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_issuers\" (\n \"currency\" text,\n \"country\" text,\n \"generic_name_or_nickname\" text,\n \"rating_s_p_moodys\" text,\n \"negotiable_debt_at_mid_2005_us_dollar_bn_equivalent\" real,\n \"government_financial_liabilities_as_pct_of_gdp_end_2003_source_oecd\" text,\n \"issuer\" text,\n \"internet_site\" text\n);\n\nQuestion: Name the country for the us dollar"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"main_issuers\" WHERE \"currency\"='US dollar';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_sponsorship\" (\n \"team\" text,\n \"chairman\" text,\n \"head_coach\" text,\n \"captain\" text,\n \"kitmaker\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: How many teams have a head coach named mahdi ali?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"team\") FROM \"personnel_and_sponsorship\" WHERE \"head_coach\"='Mahdi Ali';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_sponsorship\" (\n \"team\" text,\n \"chairman\" text,\n \"head_coach\" text,\n \"captain\" text,\n \"kitmaker\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: How many captains have the kitmaker as n/a?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"captain\") FROM \"personnel_and_sponsorship\" WHERE \"kitmaker\"='N/A';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_sponsorship\" (\n \"team\" text,\n \"chairman\" text,\n \"head_coach\" text,\n \"captain\" text,\n \"kitmaker\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: How many kitmaker correspond to team ittihad kalba?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"kitmaker\") FROM \"personnel_and_sponsorship\" WHERE \"team\"='Ittihad Kalba';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_sponsorship\" (\n \"team\" text,\n \"chairman\" text,\n \"head_coach\" text,\n \"captain\" text,\n \"kitmaker\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: What is the name of the captain when teh shirt sponsor is n/a?"
},
{
"role": "assistant",
"content": "SELECT \"captain\" FROM \"personnel_and_sponsorship\" WHERE \"shirt_sponsor\"='N/A';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_sponsorship\" (\n \"team\" text,\n \"chairman\" text,\n \"head_coach\" text,\n \"captain\" text,\n \"kitmaker\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: How many captains when the shirt sponsor is toshiba?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"captain\") FROM \"personnel_and_sponsorship\" WHERE \"shirt_sponsor\"='Toshiba';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_sponsorship\" (\n \"team\" text,\n \"chairman\" text,\n \"head_coach\" text,\n \"captain\" text,\n \"kitmaker\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: Who is the chairman when teh captain is fawzi bashir?"
},
{
"role": "assistant",
"content": "SELECT \"chairman\" FROM \"personnel_and_sponsorship\" WHERE \"captain\"='Fawzi Bashir';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Which season had f/laps is 0 and races is 2?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"career_summary\" WHERE \"f_laps\"=0 AND \"races\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: How many entries are there for points for the 6th position?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"career_summary\" WHERE \"position\"='6th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: How many season are shown for the 2nd position?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"season\") FROM \"career_summary\" WHERE \"position\"='2nd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: What are the wins for the 7th position?"
},
{
"role": "assistant",
"content": "SELECT \"wins\" FROM \"career_summary\" WHERE \"position\"='7th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: What is the position for the austria formel 3 cup series?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"career_summary\" WHERE \"series\"='Austria Formel 3 Cup';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"retina_display_models\" (\n \"model\" text,\n \"ppi_pixels_per_inch\" real,\n \"ppcm_pixels_per_cm\" real,\n \"resolution\" text,\n \"typical_viewing_distance_in_cm\" text,\n \"pixels_per_degree_ppd\" real\n);\n\nQuestion: How many different PPI does the model with ppcm of 87 have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"ppi_pixels_per_inch\") FROM \"retina_display_models\" WHERE \"ppcm_pixels_per_cm\"=87;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"retina_display_models\" (\n \"model\" text,\n \"ppi_pixels_per_inch\" real,\n \"ppcm_pixels_per_cm\" real,\n \"resolution\" text,\n \"typical_viewing_distance_in_cm\" text,\n \"pixels_per_degree_ppd\" real\n);\n\nQuestion: What's the resolution of the model with a PPD of 69?"
},
{
"role": "assistant",
"content": "SELECT \"resolution\" FROM \"retina_display_models\" WHERE \"pixels_per_degree_ppd\"=69;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"colors\" text,\n \"enrollment\" real,\n \"ihsa_classes_2_3_4\" text,\n \"ihsa_music_class\" text,\n \"ihsa_football_class\" text,\n \"ihsa_cheerleading_class\" text\n);\n\nQuestion: What is the IHSA music class for the mascot that is the lancers?"
},
{
"role": "assistant",
"content": "SELECT \"ihsa_music_class\" FROM \"current_membership\" WHERE \"mascot\"='Lancers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"colors\" text,\n \"enrollment\" real,\n \"ihsa_classes_2_3_4\" text,\n \"ihsa_music_class\" text,\n \"ihsa_football_class\" text,\n \"ihsa_cheerleading_class\" text\n);\n\nQuestion: What is the IHSA cheerleading class for the enrollment of 2600?"
},
{
"role": "assistant",
"content": "SELECT \"ihsa_cheerleading_class\" FROM \"current_membership\" WHERE \"enrollment\"=2600;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"colors\" text,\n \"enrollment\" real,\n \"ihsa_classes_2_3_4\" text,\n \"ihsa_music_class\" text,\n \"ihsa_football_class\" text,\n \"ihsa_cheerleading_class\" text\n);\n\nQuestion: What are the colors for the enrollment of 2020?"
},
{
"role": "assistant",
"content": "SELECT \"colors\" FROM \"current_membership\" WHERE \"enrollment\"=2020;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ice_hockey\" (\n \"conference\" text,\n \"old_membership_total\" real,\n \"new_membership_total\" real,\n \"net_change\" text,\n \"members_added\" real,\n \"members_lost\" real\n);\n\nQuestion: What is the smallest number for old membership total?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"old_membership_total\") FROM \"ice_hockey\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ice_hockey\" (\n \"conference\" text,\n \"old_membership_total\" real,\n \"new_membership_total\" real,\n \"net_change\" text,\n \"members_added\" real,\n \"members_lost\" real\n);\n\nQuestion: What is the lowest number of members lost when the net change is \u22121?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"members_lost\") FROM \"ice_hockey\" WHERE \"net_change\"='\u22121';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ice_hockey\" (\n \"conference\" text,\n \"old_membership_total\" real,\n \"new_membership_total\" real,\n \"net_change\" text,\n \"members_added\" real,\n \"members_lost\" real\n);\n\nQuestion: What is the new membership total if the members lost is bigger than 1.0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"new_membership_total\") FROM \"ice_hockey\" WHERE \"members_lost\">1.0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ice_hockey\" (\n \"conference\" text,\n \"old_membership_total\" real,\n \"new_membership_total\" real,\n \"net_change\" text,\n \"members_added\" real,\n \"members_lost\" real\n);\n\nQuestion: How many members were added at the nchc (men only) conference?"
},
{
"role": "assistant",
"content": "SELECT \"members_added\" FROM \"ice_hockey\" WHERE \"conference\"='NCHC (men only)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ice_hockey\" (\n \"conference\" text,\n \"old_membership_total\" real,\n \"new_membership_total\" real,\n \"net_change\" text,\n \"members_added\" real,\n \"members_lost\" real\n);\n\nQuestion: What was the new membership total at the nchc (men only) conference?"
},
{
"role": "assistant",
"content": "SELECT \"new_membership_total\" FROM \"ice_hockey\" WHERE \"conference\"='NCHC (men only)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"table\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is the outgoing manager when the incoming manager is \u0161tefan tarkovi\u010d?"
},
{
"role": "assistant",
"content": "SELECT \"outgoing_manager\" FROM \"managerial_changes\" WHERE \"incoming_manager\"='\u0160tefan Tarkovi\u010d';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"table\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: How many dates of vacancy were on 30 october 2010?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"team\") FROM \"managerial_changes\" WHERE \"date_of_vacancy\"='30 October 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"table\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is the manner of departure when the date of vacancy is 28 september 2010?"
},
{
"role": "assistant",
"content": "SELECT \"manner_of_departure\" FROM \"managerial_changes\" WHERE \"date_of_vacancy\"='28 September 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"table\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is the date of appointment when the date of vacancy is 24 november 2010?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"date_of_vacancy\"='24 November 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"table\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is the outgoing manager when the date of vacancy is 10 october 2010?"
},
{
"role": "assistant",
"content": "SELECT \"outgoing_manager\" FROM \"managerial_changes\" WHERE \"date_of_vacancy\"='10 October 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"table\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is the table when the team is slovan bratislava?"
},
{
"role": "assistant",
"content": "SELECT \"table\" FROM \"managerial_changes\" WHERE \"team\"='Slovan Bratislava';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27685921_1\" (\n \"year\" real,\n \"exhibitors_domestic\" real,\n \"exhibitors_foreign\" real,\n \"exhibitors_total\" real,\n \"visitors_total\" real,\n \"visitors_foreign_in_pct\" text\n);\n\nQuestion: how many people come to visit when the 1654 exhibitions"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"visitors_total\") FROM \"table1_27685921_1\" WHERE \"exhibitors_total\"=1654;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_27685921_1\" (\n \"year\" real,\n \"exhibitors_domestic\" real,\n \"exhibitors_foreign\" real,\n \"exhibitors_total\" real,\n \"visitors_total\" real,\n \"visitors_foreign_in_pct\" text\n);\n\nQuestion: what is the most time where exhibitions is 1701"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"table1_27685921_1\" WHERE \"exhibitors_total\"=1701;"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: who had high points on march 14?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"date\"='March 14';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: who had high rebounds at game 69?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"game\"=69;"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: Who were the 76ers opponents on January 17?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"date\"='January 17';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: How many players held the high point records for game 34?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"high_points\") FROM \"game_log\" WHERE \"game\"=34;"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: What the win - loss recored for January 7?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='January 7';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: How many people led in points during the game on October 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"high_points\") FROM \"game_log\" WHERE \"date\"='October 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 \"record\" text\n);\n\nQuestion: Name the date for the palace of auburn hills 14,554"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"location_attendance\"='The Palace of Auburn Hills 14,554';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: Name the least game for l 109\u2013116 (ot)"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"game_log\" WHERE \"score\"='L 109\u2013116 (OT)';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: Name the high rebounds for charlotte"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"team\"='Charlotte';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: Name the high rebounds for wells fargo center 16,695"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"location_attendance\"='Wells Fargo Center 16,695';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: Who got the high rebounds if Brook Lopez (15) earned the high points?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"high_points\"='Brook Lopez (15)';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: Who got high assists for team @ Indiana?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"team\"='@ Indiana';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.