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 \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the outcome for zurich" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"championship\"='Zurich';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the number of surfaces for 4-6, 2-6" }, { "role": "assistant", "content": "SELECT COUNT(\"surface\") FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"score\"='4-6, 2-6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"ws_points\" real,\n \"name\" text,\n \"country\" text,\n \"08_09_i_o_best\" real,\n \"08_09_gp_jgp_best\" real,\n \"08_09_gp_jgp_2nd\" real,\n \"08_09_oi_best\" real,\n \"08_09_oi_2nd\" real,\n \"07_08_i_o_best\" real,\n \"07_08_gp_jgp_best\" real,\n \"07_08_gp_jgp_2nd\" real,\n \"07_08_oi_best\" real,\n \"07_08_oi_2nd\" real\n);\n\nQuestion: What is the least 08-09 gp/jgp 2nd was when the 07-08 gp/jgp best is 223?" }, { "role": "assistant", "content": "SELECT MIN(\"08_09_gp_jgp_2nd\") FROM \"pairs\" WHERE \"07_08_gp_jgp_best\"=223;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"ws_points\" real,\n \"name\" text,\n \"country\" text,\n \"08_09_i_o_best\" real,\n \"08_09_gp_jgp_best\" real,\n \"08_09_gp_jgp_2nd\" real,\n \"08_09_oi_best\" real,\n \"08_09_oi_2nd\" real,\n \"07_08_i_o_best\" real,\n \"07_08_gp_jgp_best\" real,\n \"07_08_gp_jgp_2nd\" real,\n \"07_08_oi_best\" real,\n \"07_08_oi_2nd\" real\n);\n\nQuestion: What is the least 08-09 i/o best?" }, { "role": "assistant", "content": "SELECT MIN(\"08_09_i_o_best\") FROM \"pairs\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"ws_points\" real,\n \"name\" text,\n \"country\" text,\n \"08_09_i_o_best\" real,\n \"08_09_gp_jgp_best\" real,\n \"08_09_gp_jgp_2nd\" real,\n \"08_09_oi_best\" real,\n \"08_09_oi_2nd\" real,\n \"07_08_i_o_best\" real,\n \"07_08_gp_jgp_best\" real,\n \"07_08_gp_jgp_2nd\" real,\n \"07_08_oi_best\" real,\n \"07_08_oi_2nd\" real\n);\n\nQuestion: How many times is keauna mclaughlin / rockne brubaker ranked?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"pairs\" WHERE \"name\"='Keauna McLaughlin / Rockne Brubaker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"sprint_classification\" text,\n \"mountains_classification\" text,\n \"youth_classification\" text,\n \"aggressive_rider\" text,\n \"team_classification\" text\n);\n\nQuestion: Name the sprint classification for michael barry" }, { "role": "assistant", "content": "SELECT \"sprint_classification\" FROM \"jersey_progress\" WHERE \"aggressive_rider\"='Michael Barry';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"sprint_classification\" text,\n \"mountains_classification\" text,\n \"youth_classification\" text,\n \"aggressive_rider\" text,\n \"team_classification\" text\n);\n\nQuestion: Name the youth classification for michael barry" }, { "role": "assistant", "content": "SELECT \"youth_classification\" FROM \"jersey_progress\" WHERE \"aggressive_rider\"='Michael Barry';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"sprint_classification\" text,\n \"mountains_classification\" text,\n \"youth_classification\" text,\n \"aggressive_rider\" text,\n \"team_classification\" text\n);\n\nQuestion: Name the mountains classification for bradley white" }, { "role": "assistant", "content": "SELECT \"mountains_classification\" FROM \"jersey_progress\" WHERE \"aggressive_rider\"='Bradley White';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"profiles\" (\n \"profile\" text,\n \"bandwidth_m_hz\" text,\n \"number_of_carriers\" real,\n \"carrier_bandwidth_k_hz\" text,\n \"power_d_bm\" text,\n \"max_downstream_throughput_mbit_s\" real\n);\n\nQuestion: List all mbit/s with profiles of 8b." }, { "role": "assistant", "content": "SELECT \"max_downstream_throughput_mbit_s\" FROM \"profiles\" WHERE \"profile\"='8b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"profiles\" (\n \"profile\" text,\n \"bandwidth_m_hz\" text,\n \"number_of_carriers\" real,\n \"carrier_bandwidth_k_hz\" text,\n \"power_d_bm\" text,\n \"max_downstream_throughput_mbit_s\" real\n);\n\nQuestion: What are the mhz when the profile is 8b?" }, { "role": "assistant", "content": "SELECT \"bandwidth_m_hz\" FROM \"profiles\" WHERE \"profile\"='8b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"profiles\" (\n \"profile\" text,\n \"bandwidth_m_hz\" text,\n \"number_of_carriers\" real,\n \"carrier_bandwidth_k_hz\" text,\n \"power_d_bm\" text,\n \"max_downstream_throughput_mbit_s\" real\n);\n\nQuestion: What are the highest mbit/s when the dbm is +17.5?" }, { "role": "assistant", "content": "SELECT \"max_downstream_throughput_mbit_s\" FROM \"profiles\" WHERE \"power_d_bm\"='+17.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"profiles\" (\n \"profile\" text,\n \"bandwidth_m_hz\" text,\n \"number_of_carriers\" real,\n \"carrier_bandwidth_k_hz\" text,\n \"power_d_bm\" text,\n \"max_downstream_throughput_mbit_s\" real\n);\n\nQuestion: List all dbm's when profiles are 8a." }, { "role": "assistant", "content": "SELECT \"power_d_bm\" FROM \"profiles\" WHERE \"profile\"='8a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"profiles\" (\n \"profile\" text,\n \"bandwidth_m_hz\" text,\n \"number_of_carriers\" real,\n \"carrier_bandwidth_k_hz\" text,\n \"power_d_bm\" text,\n \"max_downstream_throughput_mbit_s\" real\n);\n\nQuestion: What is the lowest number of carriers?" }, { "role": "assistant", "content": "SELECT MIN(\"number_of_carriers\") FROM \"profiles\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_23958944_5\" (\n \"no_by_series\" real,\n \"no_by_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_number\" real,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: Who directed episode 21?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_23958944_5\" WHERE \"no_by_season\"=21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_23958944_5\" (\n \"no_by_series\" real,\n \"no_by_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_number\" real,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What is the series number of the episode \"Pandora\"?" }, { "role": "assistant", "content": "SELECT \"no_by_series\" FROM \"table1_23958944_5\" WHERE \"title\"='\\\"Pandora\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_23958944_5\" (\n \"no_by_series\" real,\n \"no_by_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_number\" real,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What episode was watched by 10.81 million US viewers?" }, { "role": "assistant", "content": "SELECT MIN(\"no_by_season\") FROM \"table1_23958944_5\" WHERE \"u_s_viewers_in_millions\"='10.81';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_23958944_5\" (\n \"no_by_series\" real,\n \"no_by_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_number\" real,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: How many episodes are titled \"Cops & Robbers\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"no_by_season\") FROM \"table1_23958944_5\" WHERE \"title\"='\\\"Cops & Robbers\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_23958944_5\" (\n \"no_by_series\" real,\n \"no_by_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_number\" real,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What episode is directed by Bryan Spicer and written by Terence Paul Winter?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_23958944_5\" WHERE \"directed_by\"='Bryan Spicer' AND \"written_by\"='Terence Paul Winter';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_23958944_6\" (\n \"no_by_series\" real,\n \"no_by_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_number\" real,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: Name the number of series for 19" }, { "role": "assistant", "content": "SELECT \"no_by_series\" FROM \"table1_23958944_6\" WHERE \"no_by_season\"=19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_23958944_6\" (\n \"no_by_series\" real,\n \"no_by_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_number\" real,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: Name the viewers for 520" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_in_millions\" FROM \"table1_23958944_6\" WHERE \"production_number\"=520;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_23958944_2\" (\n \"no_by_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_number\" real,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: How many different writers have written the episode with series number 8?" }, { "role": "assistant", "content": "SELECT COUNT(\"written_by\") FROM \"table1_23958944_2\" WHERE \"no_by_series\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_23958944_2\" (\n \"no_by_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_number\" real,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: Who is the director of the episode titled \"Hell hath no fury\"?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_23958944_2\" WHERE \"title\"='\\\"Hell Hath No Fury\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_23958944_2\" (\n \"no_by_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_number\" real,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: Who directed the episode titled \"Ghosts\"?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_23958944_2\" WHERE \"title\"='\\\"Ghosts\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_23958944_2\" (\n \"no_by_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_number\" real,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What's the title of the episode with production number 103?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_23958944_2\" WHERE \"production_number\"=103;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_23958944_2\" (\n \"no_by_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_number\" real,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: When did the episode titled \"Hell hath no fury\" air for the first time?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_23958944_2\" WHERE \"title\"='\\\"Hell Hath No Fury\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season_statistics\" (\n \"name\" text,\n \"nationality\" text,\n \"position\" text,\n \"athletica_career\" text,\n \"appearances\" real,\n \"starts\" real,\n \"minutes\" real,\n \"goals\" real,\n \"assists\" real\n);\n\nQuestion: who has the 1 goal and the position is fw?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"regular_season_statistics\" WHERE \"goals\"=1 AND \"position\"='FW';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_songs_released_in_2007\" (\n \"song_title\" text,\n \"artist\" text,\n \"year\" real,\n \"genre\" text,\n \"single_pack_name\" text,\n \"release_date\" text,\n \"family_friendly\" text,\n \"additional_rock_band_3_features\" text\n);\n\nQuestion: How many release dates are there for year of 1988 and additional rock band 3 features is none?" }, { "role": "assistant", "content": "SELECT COUNT(\"release_date\") FROM \"list_of_songs_released_in_2007\" WHERE \"year\"=1988 AND \"additional_rock_band_3_features\"='None';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_songs_released_in_2007\" (\n \"song_title\" text,\n \"artist\" text,\n \"year\" real,\n \"genre\" text,\n \"single_pack_name\" text,\n \"release_date\" text,\n \"family_friendly\" text,\n \"additional_rock_band_3_features\" text\n);\n\nQuestion: Who is the artist for the song title of \" ...and justice for all \"?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"list_of_songs_released_in_2007\" WHERE \"song_title\"='\\\" ...And Justice for All \\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_songs_released_in_2007\" (\n \"song_title\" text,\n \"artist\" text,\n \"year\" real,\n \"genre\" text,\n \"single_pack_name\" text,\n \"release_date\" text,\n \"family_friendly\" text,\n \"additional_rock_band_3_features\" text\n);\n\nQuestion: What is the year for the song title of \" little sister \"?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"list_of_songs_released_in_2007\" WHERE \"song_title\"='\\\" Little Sister \\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_songs_released_in_2007\" (\n \"song_title\" text,\n \"artist\" text,\n \"year\" real,\n \"genre\" text,\n \"single_pack_name\" text,\n \"release_date\" text,\n \"family_friendly\" text,\n \"additional_rock_band_3_features\" text\n);\n\nQuestion: How many single / pack names are there for the song title of \" rockaway beach \"?" }, { "role": "assistant", "content": "SELECT COUNT(\"single_pack_name\") FROM \"list_of_songs_released_in_2007\" WHERE \"song_title\"='\\\" Rockaway Beach \\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_songs_released_in_2007\" (\n \"song_title\" text,\n \"artist\" text,\n \"year\" real,\n \"genre\" text,\n \"single_pack_name\" text,\n \"release_date\" text,\n \"family_friendly\" text,\n \"additional_rock_band_3_features\" text\n);\n\nQuestion: What is the year for the genre of emo and artist is all-american rejects and song title is \" move along \"?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"list_of_songs_released_in_2007\" WHERE \"genre\"='Emo' AND \"artist\"='All-American Rejects' AND \"song_title\"='\\\" Move Along \\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_saint_louis_athletica_statistic\" (\n \"name\" text,\n \"nationality\" text,\n \"position\" text,\n \"athletica_career\" text,\n \"appearances\" real,\n \"starts\" real,\n \"minutes\" real,\n \"goals\" real,\n \"assists\" real\n);\n\nQuestion: What is the nationality associated with 0 minutes, position of MF, and an Athletica career of 2009?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"all_time_saint_louis_athletica_statistic\" WHERE \"minutes\"=0 AND \"position\"='MF' AND \"athletica_career\"='2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoff_statistics\" (\n \"name\" text,\n \"nationality\" text,\n \"position\" text,\n \"appearances\" real,\n \"starts\" real,\n \"minutes\" real,\n \"goals\" real\n);\n\nQuestion: What is the position of the player who is from the United States and has 30 minutes? " }, { "role": "assistant", "content": "SELECT \"position\" FROM \"playoff_statistics\" WHERE \"nationality\"='United States' AND \"minutes\"=30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoff_statistics\" (\n \"name\" text,\n \"nationality\" text,\n \"position\" text,\n \"appearances\" real,\n \"starts\" real,\n \"minutes\" real,\n \"goals\" real\n);\n\nQuestion: What is the most amount of goals any of the players had? " }, { "role": "assistant", "content": "SELECT MAX(\"goals\") FROM \"playoff_statistics\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_songs_released_in_2008\" (\n \"song_title\" text,\n \"artist\" text,\n \"year\" text,\n \"genre\" text,\n \"single_pack_name\" text,\n \"release_date\" text,\n \"family_friendly\" text,\n \"additional_rock_band_3_features\" text\n);\n\nQuestion: What year did the song \"Red Tandy\" come out?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"list_of_songs_released_in_2008\" WHERE \"song_title\"='\\\"Red Tandy\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_songs_released_in_2008\" (\n \"song_title\" text,\n \"artist\" text,\n \"year\" text,\n \"genre\" text,\n \"single_pack_name\" text,\n \"release_date\" text,\n \"family_friendly\" text,\n \"additional_rock_band_3_features\" text\n);\n\nQuestion: What is the song for Dixie Chicks?" }, { "role": "assistant", "content": "SELECT \"song_title\" FROM \"list_of_songs_released_in_2008\" WHERE \"artist\"='Dixie Chicks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_23981882_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: What is the episode title for number 7 in the season?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_23981882_1\" WHERE \"no_in_season\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_2002_specials\" (\n \"special\" text,\n \"original_airdate\" text,\n \"iron_chef\" text,\n \"challenger\" text,\n \"challenger_specialty\" text,\n \"theme_ingredient\" text,\n \"winner\" text\n);\n\nQuestion: What is the special when the challenger is dominique bouchet?" }, { "role": "assistant", "content": "SELECT \"special\" FROM \"2000_2002_specials\" WHERE \"challenger\"='Dominique Bouchet';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_2002_specials\" (\n \"special\" text,\n \"original_airdate\" text,\n \"iron_chef\" text,\n \"challenger\" text,\n \"challenger_specialty\" text,\n \"theme_ingredient\" text,\n \"winner\" text\n);\n\nQuestion: Who was the winner when the iron chef is hiroyuki sakai?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"2000_2002_specials\" WHERE \"iron_chef\"='Hiroyuki Sakai';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_2002_specials\" (\n \"special\" text,\n \"original_airdate\" text,\n \"iron_chef\" text,\n \"challenger\" text,\n \"challenger_specialty\" text,\n \"theme_ingredient\" text,\n \"winner\" text\n);\n\nQuestion: Who was the challenger when winner was kimio nonaga?" }, { "role": "assistant", "content": "SELECT \"challenger\" FROM \"2000_2002_specials\" WHERE \"winner\"='Kimio Nonaga';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_2002_specials\" (\n \"special\" text,\n \"original_airdate\" text,\n \"iron_chef\" text,\n \"challenger\" text,\n \"challenger_specialty\" text,\n \"theme_ingredient\" text,\n \"winner\" text\n);\n\nQuestion: Who was the winner for the original airdate is january 5, 2000 and challenger specialty is french?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"2000_2002_specials\" WHERE \"original_airdate\"='January 5, 2000' AND \"challenger_specialty\"='French';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1993\" (\n \"overall_episode_num\" real,\n \"original_airdate\" text,\n \"iron_chef\" text,\n \"challenger\" text,\n \"challenger_specialty\" text,\n \"theme_ingredient\" text,\n \"winner\" text\n);\n\nQuestion: How many episodes had Yutaka Ishinabe as the iron chef specializing in french cousin?" }, { "role": "assistant", "content": "SELECT COUNT(\"overall_episode_num\") FROM \"1993\" WHERE \"iron_chef\"='Yutaka Ishinabe' AND \"challenger_specialty\"='French';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1993\" (\n \"overall_episode_num\" real,\n \"original_airdate\" text,\n \"iron_chef\" text,\n \"challenger\" text,\n \"challenger_specialty\" text,\n \"theme_ingredient\" text,\n \"winner\" text\n);\n\nQuestion: What episode number originally aired on November 21, 1993?" }, { "role": "assistant", "content": "SELECT MAX(\"overall_episode_num\") FROM \"1993\" WHERE \"original_airdate\"='November 21, 1993';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1993\" (\n \"overall_episode_num\" real,\n \"original_airdate\" text,\n \"iron_chef\" text,\n \"challenger\" text,\n \"challenger_specialty\" text,\n \"theme_ingredient\" text,\n \"winner\" text\n);\n\nQuestion: Who was the challenger on Episode 5?" }, { "role": "assistant", "content": "SELECT \"challenger\" FROM \"1993\" WHERE \"overall_episode_num\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1993\" (\n \"overall_episode_num\" real,\n \"original_airdate\" text,\n \"iron_chef\" text,\n \"challenger\" text,\n \"challenger_specialty\" text,\n \"theme_ingredient\" text,\n \"winner\" text\n);\n\nQuestion: How many iron chefs were there when the challenge specialty was Japanese cuisine?" }, { "role": "assistant", "content": "SELECT COUNT(\"iron_chef\") FROM \"1993\" WHERE \"challenger_specialty\"='Japanese';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_qualification\" (\n \"confederation\" text,\n \"teams_started\" text,\n \"teams_that_have_secured_qualification\" text,\n \"teams_that_can_still_qualify\" text,\n \"teams_that_have_been_eliminated\" text,\n \"remaining_places_in_finals\" text,\n \"total_places_in_finals\" text,\n \"qualifying_start_date\" text,\n \"qualifying_end_date\" text\n);\n\nQuestion: What is the qualifying end date when the qualifying start date is qualifying start date?" }, { "role": "assistant", "content": "SELECT \"qualifying_end_date\" FROM \"summary_of_qualification\" WHERE \"qualifying_start_date\"='Qualifying start date';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_qualification\" (\n \"confederation\" text,\n \"teams_started\" text,\n \"teams_that_have_secured_qualification\" text,\n \"teams_that_can_still_qualify\" text,\n \"teams_that_have_been_eliminated\" text,\n \"remaining_places_in_finals\" text,\n \"total_places_in_finals\" text,\n \"qualifying_start_date\" text,\n \"qualifying_end_date\" text\n);\n\nQuestion: How many teams can still qualify when there are 0 teams that have secured qualification and 52 teams started?" }, { "role": "assistant", "content": "SELECT \"teams_that_can_still_qualify\" FROM \"summary_of_qualification\" WHERE \"teams_that_have_secured_qualification\"='0' AND \"teams_started\"='52';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_qualification\" (\n \"confederation\" text,\n \"teams_started\" text,\n \"teams_that_have_secured_qualification\" text,\n \"teams_that_can_still_qualify\" text,\n \"teams_that_have_been_eliminated\" text,\n \"remaining_places_in_finals\" text,\n \"total_places_in_finals\" text,\n \"qualifying_start_date\" text,\n \"qualifying_end_date\" text\n);\n\nQuestion: How many teams eliminated when 11 teams started?" }, { "role": "assistant", "content": "SELECT \"teams_that_have_been_eliminated\" FROM \"summary_of_qualification\" WHERE \"teams_started\"='11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_qualification\" (\n \"confederation\" text,\n \"teams_started\" text,\n \"teams_that_have_secured_qualification\" text,\n \"teams_that_can_still_qualify\" text,\n \"teams_that_have_been_eliminated\" text,\n \"remaining_places_in_finals\" text,\n \"total_places_in_finals\" text,\n \"qualifying_start_date\" text,\n \"qualifying_end_date\" text\n);\n\nQuestion: What is the confederation when there are 4 places remaining in the finals?" }, { "role": "assistant", "content": "SELECT \"confederation\" FROM \"summary_of_qualification\" WHERE \"remaining_places_in_finals\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_qualification\" (\n \"confederation\" text,\n \"teams_started\" text,\n \"teams_that_have_secured_qualification\" text,\n \"teams_that_can_still_qualify\" text,\n \"teams_that_have_been_eliminated\" text,\n \"remaining_places_in_finals\" text,\n \"total_places_in_finals\" text,\n \"qualifying_start_date\" text,\n \"qualifying_end_date\" text\n);\n\nQuestion: How many qualifying start dates for the Concacaf confederation?" }, { "role": "assistant", "content": "SELECT COUNT(\"qualifying_start_date\") FROM \"summary_of_qualification\" WHERE \"confederation\"='CONCACAF';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_qualification\" (\n \"confederation\" text,\n \"teams_started\" text,\n \"teams_that_have_secured_qualification\" text,\n \"teams_that_can_still_qualify\" text,\n \"teams_that_have_been_eliminated\" text,\n \"remaining_places_in_finals\" text,\n \"total_places_in_finals\" text,\n \"qualifying_start_date\" text,\n \"qualifying_end_date\" text\n);\n\nQuestion: How many remaining places in finals when 1 team can still qualify and 0 teams have secured qualification?" }, { "role": "assistant", "content": "SELECT \"remaining_places_in_finals\" FROM \"summary_of_qualification\" WHERE \"teams_that_can_still_qualify\"='1' AND \"teams_that_have_secured_qualification\"='0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"hicham_el_guerrouj_mar\" text,\n \"3_26_00\" text,\n \"rome_italy\" text,\n \"14_july_1998\" text\n);\n\nQuestion: What is the world record when 14 July 1998 is 13 August 1997?" }, { "role": "assistant", "content": "SELECT \"world_record\" FROM \"records\" WHERE \"14_july_1998\"='13 August 1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"hicham_el_guerrouj_mar\" text,\n \"3_26_00\" text,\n \"rome_italy\" text,\n \"14_july_1998\" text\n);\n\nQuestion: How many of 3:26.00 have a championship record?" }, { "role": "assistant", "content": "SELECT COUNT(\"3_26_00\") FROM \"records\" WHERE \"world_record\"='Championship record';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"hicham_el_guerrouj_mar\" text,\n \"3_26_00\" text,\n \"rome_italy\" text,\n \"14_july_1998\" text\n);\n\nQuestion: How many of 3:26.00 when hicham el guerrouj ( mar ) is hudson de souza ( bra )?" }, { "role": "assistant", "content": "SELECT COUNT(\"3_26_00\") FROM \"records\" WHERE \"hicham_el_guerrouj_mar\"='Hudson de Souza ( BRA )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"saif_saaeed_shaheen_qat\" text,\n \"7_53_63\" text,\n \"brussels_belgium\" text,\n \"3_september_2004\" text\n);\n\nQuestion: When saif saaeed shaheen (qat) is the saif saaeed shaheen ( qat ) what is the world record?" }, { "role": "assistant", "content": "SELECT \"world_record\" FROM \"records\" WHERE \"saif_saaeed_shaheen_qat\"='Saif Saaeed Shaheen ( QAT )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"saif_saaeed_shaheen_qat\" text,\n \"7_53_63\" text,\n \"brussels_belgium\" text,\n \"3_september_2004\" text\n);\n\nQuestion: When daniel lincoln ( usa ) is the saif saaeed shaheen ( qat ) What is the date for September 3rd, 2004?" }, { "role": "assistant", "content": "SELECT \"3_september_2004\" FROM \"records\" WHERE \"saif_saaeed_shaheen_qat\"='Daniel Lincoln ( USA )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"saif_saaeed_shaheen_qat\" text,\n \"7_53_63\" text,\n \"brussels_belgium\" text,\n \"3_september_2004\" text\n);\n\nQuestion: When saif saaeed shaheen ( qat ) is the saif saaeed shaheen ( qat ) what is the date on September 3rd, 2004?" }, { "role": "assistant", "content": "SELECT \"3_september_2004\" FROM \"records\" WHERE \"saif_saaeed_shaheen_qat\"='Saif Saaeed Shaheen ( QAT )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"jarmila_kratochv_lov_tch\" text,\n \"1_53_28\" text,\n \"munich_west_germany\" text,\n \"26_july_1983\" text\n);\n\nQuestion: What is the 26 July 1983 total number if Munich, West Germany is Beijing, China?" }, { "role": "assistant", "content": "SELECT COUNT(\"26_july_1983\") FROM \"records\" WHERE \"munich_west_germany\"='Beijing, China';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"jarmila_kratochv_lov_tch\" text,\n \"1_53_28\" text,\n \"munich_west_germany\" text,\n \"26_july_1983\" text\n);\n\nQuestion: If the world record is the African record, what is the 1:53.28 total number?" }, { "role": "assistant", "content": "SELECT COUNT(\"1_53_28\") FROM \"records\" WHERE \"world_record\"='African record';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"jarmila_kratochv_lov_tch\" text,\n \"1_53_28\" text,\n \"munich_west_germany\" text,\n \"26_july_1983\" text\n);\n\nQuestion: If 1:53.28 is 1:54.01, what is the world record?" }, { "role": "assistant", "content": "SELECT \"world_record\" FROM \"records\" WHERE \"1_53_28\"='1:54.01';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2400842_1\" (\n \"episode_num\" real,\n \"prod_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"originalairdate\" text,\n \"filmed\" text\n);\n\nQuestion: How many episodes have the title \"a perfect crime\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"episode_num\") FROM \"table1_2400842_1\" WHERE \"title\"='\\\"A Perfect Crime\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2400842_1\" (\n \"episode_num\" real,\n \"prod_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"originalairdate\" text,\n \"filmed\" text\n);\n\nQuestion: Who directed the epsiode with production number 109?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_2400842_1\" WHERE \"prod_num\"=109;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"finish\" real,\n \"start\" real,\n \"car_no\" real,\n \"driver\" text,\n \"owner_sponsor\" text,\n \"car_make\" text\n);\n\nQuestion: Name the least finish for larry dickson" }, { "role": "assistant", "content": "SELECT MIN(\"finish\") FROM \"statistics\" WHERE \"driver\"='Larry Dickson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"olimpiada_ivanova_rus\" text,\n \"1_25_41\" text,\n \"helsinki_finland\" text,\n \"7_august_2005\" text\n);\n\nQuestion: Name the 1:25 for 7 august 2005 being 19 november 2001" }, { "role": "assistant", "content": "SELECT \"1_25_41\" FROM \"records\" WHERE \"7_august_2005\"='19 November 2001';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"kenenisa_bekele_eth\" text,\n \"26_17_53\" text,\n \"bruxelles_belgium\" text,\n \"26_august_2005\" text\n);\n\nQuestion: Name the 26 august 2005 asian record" }, { "role": "assistant", "content": "SELECT \"26_august_2005\" FROM \"records\" WHERE \"world_record\"='Asian record';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"kenenisa_bekele_eth\" text,\n \"26_17_53\" text,\n \"bruxelles_belgium\" text,\n \"26_august_2005\" text\n);\n\nQuestion: Name the belgium for 26 august 2005 being 24 august 2003" }, { "role": "assistant", "content": "SELECT \"bruxelles_belgium\" FROM \"records\" WHERE \"26_august_2005\"='24 August 2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"kenenisa_bekele_eth\" text,\n \"26_17_53\" text,\n \"bruxelles_belgium\" text,\n \"26_august_2005\" text\n);\n\nQuestion: Name the total number of kenesia for african record" }, { "role": "assistant", "content": "SELECT COUNT(\"kenenisa_bekele_eth\") FROM \"records\" WHERE \"world_record\"='African record';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_5_winners\" (\n \"year\" real,\n \"putri_pariwisata_indonesia\" text,\n \"1st_runner_up\" text,\n \"2nd_runner_up\" text,\n \"3rd_runner_up\" text,\n \"4th_runner_up\" text\n);\n\nQuestion: List the number of runners up when albertina fransisca mailoa won the putri pariwisata contest?" }, { "role": "assistant", "content": "SELECT COUNT(\"3rd_runner_up\") FROM \"top_5_winners\" WHERE \"putri_pariwisata_indonesia\"='Albertina Fransisca Mailoa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_5_winners\" (\n \"year\" real,\n \"putri_pariwisata_indonesia\" text,\n \"1st_runner_up\" text,\n \"2nd_runner_up\" text,\n \"3rd_runner_up\" text,\n \"4th_runner_up\" text\n);\n\nQuestion: Who won 2nd place when ratna mariana won 3rd place?" }, { "role": "assistant", "content": "SELECT \"1st_runner_up\" FROM \"top_5_winners\" WHERE \"2nd_runner_up\"='Ratna Mariana';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_5_winners\" (\n \"year\" real,\n \"putri_pariwisata_indonesia\" text,\n \"1st_runner_up\" text,\n \"2nd_runner_up\" text,\n \"3rd_runner_up\" text,\n \"4th_runner_up\" text\n);\n\nQuestion: Who won 5th place when jean liatri augustine girsang won 4th place?" }, { "role": "assistant", "content": "SELECT \"4th_runner_up\" FROM \"top_5_winners\" WHERE \"3rd_runner_up\"='Jean Liatri Augustine Girsang';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_5_winners\" (\n \"year\" real,\n \"putri_pariwisata_indonesia\" text,\n \"1st_runner_up\" text,\n \"2nd_runner_up\" text,\n \"3rd_runner_up\" text,\n \"4th_runner_up\" text\n);\n\nQuestion: Who won 2nd place when albertina fransisca mailoa was the winner of the putri pariwisata contest?" }, { "role": "assistant", "content": "SELECT \"1st_runner_up\" FROM \"top_5_winners\" WHERE \"putri_pariwisata_indonesia\"='Albertina Fransisca Mailoa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_5_winners\" (\n \"year\" real,\n \"putri_pariwisata_indonesia\" text,\n \"1st_runner_up\" text,\n \"2nd_runner_up\" text,\n \"3rd_runner_up\" text,\n \"4th_runner_up\" text\n);\n\nQuestion: Who won 4th place when audrie adriana sanova won 3rd place?" }, { "role": "assistant", "content": "SELECT \"3rd_runner_up\" FROM \"top_5_winners\" WHERE \"2nd_runner_up\"='Audrie Adriana Sanova';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_5_winners\" (\n \"year\" real,\n \"putri_pariwisata_indonesia\" text,\n \"1st_runner_up\" text,\n \"2nd_runner_up\" text,\n \"3rd_runner_up\" text,\n \"4th_runner_up\" text\n);\n\nQuestion: Who won 5th place with olivia franciska won 4th place?" }, { "role": "assistant", "content": "SELECT \"4th_runner_up\" FROM \"top_5_winners\" WHERE \"3rd_runner_up\"='Olivia Franciska';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24018430_3\" (\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\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: what is the original air date for production code 216?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_24018430_3\" WHERE \"production_code\"=216;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24018430_3\" (\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\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: what is writtenand directed by shannon flynn?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_24018430_3\" WHERE \"directed_by\"='Shannon Flynn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24018430_3\" (\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\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: what number is us viewers in season 12?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_millions\" FROM \"table1_24018430_3\" WHERE \"no_in_season\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24027047_1\" (\n \"administrative_division\" text,\n \"area_km_2011\" text,\n \"population_2001_census_adjusted\" real,\n \"population_2011_census_adjusted\" real,\n \"population_density_km_2011\" text\n);\n\nQuestion: What was the population density in km2 for 2011 in the division where area in km2 was 684.37 in 2011? " }, { "role": "assistant", "content": "SELECT \"population_density_km_2011\" FROM \"table1_24027047_1\" WHERE \"area_km_2011\"='684.37';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24027047_1\" (\n \"administrative_division\" text,\n \"area_km_2011\" text,\n \"population_2001_census_adjusted\" real,\n \"population_2011_census_adjusted\" real,\n \"population_density_km_2011\" text\n);\n\nQuestion: What division had a population density of 8,552.4 km2 in 2011?" }, { "role": "assistant", "content": "SELECT \"administrative_division\" FROM \"table1_24027047_1\" WHERE \"population_density_km_2011\"='8,552.4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24027047_1\" (\n \"administrative_division\" text,\n \"area_km_2011\" text,\n \"population_2001_census_adjusted\" real,\n \"population_2011_census_adjusted\" real,\n \"population_density_km_2011\" text\n);\n\nQuestion: What was the area in km2 in 2011 for the Narsingdi District?" }, { "role": "assistant", "content": "SELECT \"area_km_2011\" FROM \"table1_24027047_1\" WHERE \"administrative_division\"='Narsingdi District';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24027047_1\" (\n \"administrative_division\" text,\n \"area_km_2011\" text,\n \"population_2001_census_adjusted\" real,\n \"population_2011_census_adjusted\" real,\n \"population_density_km_2011\" text\n);\n\nQuestion: In what division was there a population density in km2 of 1,604.3 in 2011?" }, { "role": "assistant", "content": "SELECT \"administrative_division\" FROM \"table1_24027047_1\" WHERE \"population_density_km_2011\"='1,604.3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24027047_1\" (\n \"administrative_division\" text,\n \"area_km_2011\" text,\n \"population_2001_census_adjusted\" real,\n \"population_2011_census_adjusted\" real,\n \"population_density_km_2011\" text\n);\n\nQuestion: In what division was there a population density in km2 of 4,491.8 in 2011? " }, { "role": "assistant", "content": "SELECT \"administrative_division\" FROM \"table1_24027047_1\" WHERE \"population_density_km_2011\"='4,491.8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"political\" (\n \"municipality\" text,\n \"no_of_barangays\" real,\n \"area_coordinator\" text,\n \"population_2010\" real,\n \"pop_density_per_km\" text\n);\n\nQuestion: What's the area coordinator for the municipality with 1715 people living in it in 2010?" }, { "role": "assistant", "content": "SELECT \"area_coordinator\" FROM \"political\" WHERE \"population_2010\"=1715;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"political\" (\n \"municipality\" text,\n \"no_of_barangays\" real,\n \"area_coordinator\" text,\n \"population_2010\" real,\n \"pop_density_per_km\" text\n);\n\nQuestion: How many different counts of tue number of Barangays are there for the municipality with 13824 citizens in 2010?" }, { "role": "assistant", "content": "SELECT COUNT(\"no_of_barangays\") FROM \"political\" WHERE \"population_2010\"=13824;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"political\" (\n \"municipality\" text,\n \"no_of_barangays\" real,\n \"area_coordinator\" text,\n \"population_2010\" real,\n \"pop_density_per_km\" text\n);\n\nQuestion: How many Barangays lived in the municipality with area coordinator of 110.95?" }, { "role": "assistant", "content": "SELECT \"no_of_barangays\" FROM \"political\" WHERE \"area_coordinator\"='110.95';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24037660_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"lmp_winning_team\" text,\n \"lmpc_winning_team\" text,\n \"gt_winning_team\" text,\n \"gtc_winning_team\" text,\n \"results\" text\n);\n\nQuestion: What circuit had rnd 3?" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"table1_24037660_2\" WHERE \"rnd\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24037660_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"lmp_winning_team\" text,\n \"lmpc_winning_team\" text,\n \"gt_winning_team\" text,\n \"gtc_winning_team\" text,\n \"results\" text\n);\n\nQuestion: How many circuits had a winning team of #1 patr\u00f3n highcroft racing ang gtc winning team #81 alex job racing ?" }, { "role": "assistant", "content": "SELECT COUNT(\"circuit\") FROM \"table1_24037660_2\" WHERE \"lmp_winning_team\"='#1 Patr\u00f3n Highcroft Racing' AND \"gtc_winning_team\"='#81 Alex Job Racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24037660_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"lmp_winning_team\" text,\n \"lmpc_winning_team\" text,\n \"gt_winning_team\" text,\n \"gtc_winning_team\" text,\n \"results\" text\n);\n\nQuestion: What was the winning team lmpc in rnd 3?" }, { "role": "assistant", "content": "SELECT \"lmpc_winning_team\" FROM \"table1_24037660_2\" WHERE \"rnd\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24037660_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"lmp_winning_team\" text,\n \"lmpc_winning_team\" text,\n \"gt_winning_team\" text,\n \"gtc_winning_team\" text,\n \"results\" text\n);\n\nQuestion: What was the gtc winning team when lmp winning team was #8 drayson racing?" }, { "role": "assistant", "content": "SELECT \"gtc_winning_team\" FROM \"table1_24037660_2\" WHERE \"lmp_winning_team\"='#8 Drayson Racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_summaries\" (\n \"team\" text,\n \"location\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"manager\" text,\n \"captain\" text\n);\n\nQuestion: Who is the captain in Chaguaramas?" }, { "role": "assistant", "content": "SELECT \"captain\" FROM \"team_summaries\" WHERE \"location\"='Chaguaramas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_summaries\" (\n \"team\" text,\n \"location\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"manager\" text,\n \"captain\" text\n);\n\nQuestion: What is the minimum capacity for Sangre Grande Ground?" }, { "role": "assistant", "content": "SELECT MIN(\"capacity\") FROM \"team_summaries\" WHERE \"stadium\"='Sangre Grande Ground';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_summaries\" (\n \"team\" text,\n \"location\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"manager\" text,\n \"captain\" text\n);\n\nQuestion: What is the capacity for Sangre Grande Ground, home of the North East Stars?" }, { "role": "assistant", "content": "SELECT COUNT(\"capacity\") FROM \"team_summaries\" WHERE \"team\"='North East Stars';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_summaries\" (\n \"team\" text,\n \"location\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"manager\" text,\n \"captain\" text\n);\n\nQuestion: San Juan Jabloteh calls which stadium home?" }, { "role": "assistant", "content": "SELECT \"stadium\" FROM \"team_summaries\" WHERE \"team\"='San Juan Jabloteh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_test_career_wicketkee\" (\n \"rank\" real,\n \"dismissals\" real,\n \"player\" text,\n \"caught\" real,\n \"stumped\" real,\n \"matches\" real,\n \"innings\" real\n);\n\nQuestion: What was the innings when caught was 20?" }, { "role": "assistant", "content": "SELECT \"innings\" FROM \"most_dismissals_in_test_career_wicketkee\" WHERE \"caught\"=20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_test_career_wicketkee\" (\n \"rank\" real,\n \"dismissals\" real,\n \"player\" text,\n \"caught\" real,\n \"stumped\" real,\n \"matches\" real,\n \"innings\" real\n);\n\nQuestion: What ist he matches where the player is ms dhoni?" }, { "role": "assistant", "content": "SELECT \"matches\" FROM \"most_dismissals_in_test_career_wicketkee\" WHERE \"player\"='MS Dhoni';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_test_career_wicketkee\" (\n \"rank\" real,\n \"dismissals\" real,\n \"player\" text,\n \"caught\" real,\n \"stumped\" real,\n \"matches\" real,\n \"innings\" real\n);\n\nQuestion: What is stumped when inning is 143?" }, { "role": "assistant", "content": "SELECT \"stumped\" FROM \"most_dismissals_in_test_career_wicketkee\" WHERE \"innings\"=143;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_test_career_wicketkee\" (\n \"rank\" real,\n \"dismissals\" real,\n \"player\" text,\n \"caught\" real,\n \"stumped\" real,\n \"matches\" real,\n \"innings\" real\n);\n\nQuestion: How many matches were 44?" }, { "role": "assistant", "content": "SELECT COUNT(\"dismissals\") FROM \"most_dismissals_in_test_career_wicketkee\" WHERE \"matches\"=44;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_test_career_wicketkee\" (\n \"rank\" real,\n \"dismissals\" real,\n \"player\" text,\n \"caught\" real,\n \"stumped\" real,\n \"matches\" real,\n \"innings\" real\n);\n\nQuestion: What is stumped when matches is 14?" }, { "role": "assistant", "content": "SELECT MIN(\"stumped\") FROM \"most_dismissals_in_test_career_wicketkee\" WHERE \"matches\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"capetian_associate_kings\" (\n \"co_king\" text,\n \"relationship_to_monarch\" text,\n \"crowned\" text,\n \"co_kingship_ceased\" text,\n \"reason\" text,\n \"monarch\" text\n);\n\nQuestion: Name the crownded for 17 september 1025" }, { "role": "assistant", "content": "SELECT \"crowned\" FROM \"capetian_associate_kings\" WHERE \"co_kingship_ceased\"='17 September 1025';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"capetian_associate_kings\" (\n \"co_king\" text,\n \"relationship_to_monarch\" text,\n \"crowned\" text,\n \"co_kingship_ceased\" text,\n \"reason\" text,\n \"monarch\" text\n);\n\nQuestion: Name the total number of monarchs for 23 may 1059 crowned" }, { "role": "assistant", "content": "SELECT COUNT(\"monarch\") FROM \"capetian_associate_kings\" WHERE \"crowned\"='23 May 1059';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"capetian_associate_kings\" (\n \"co_king\" text,\n \"relationship_to_monarch\" text,\n \"crowned\" text,\n \"co_kingship_ceased\" text,\n \"reason\" text,\n \"monarch\" text\n);\n\nQuestion: Name the reason for 20 july 1031" }, { "role": "assistant", "content": "SELECT \"reason\" FROM \"capetian_associate_kings\" WHERE \"co_kingship_ceased\"='20 July 1031';" } ]