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 \"wta_tier_i_19_finals_13_titles_6_runner_\" (\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 championship for hard surface 7\u20135, 6\u20134 " }, { "role": "assistant", "content": "SELECT \"championship\" FROM \"wta_tier_i_19_finals_13_titles_6_runner_\" WHERE \"score\"='7\u20135, 6\u20134' AND \"surface\"='Hard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wta_tier_i_19_finals_13_titles_6_runner_\" (\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 surface for nathalie tauziat" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"wta_tier_i_19_finals_13_titles_6_runner_\" WHERE \"partner\"='Nathalie Tauziat';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" real,\n \"scoring_average\" text\n);\n\nQuestion: Name the most year for money list rank is 74" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"lpga_tour_career_summary\" WHERE \"money_list_rank\"=74;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: Name the team for avg start being 20.5" }, { "role": "assistant", "content": "SELECT \"team_s\" FROM \"nationwide_series\" WHERE \"avg_start\"='20.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: Name the team for wins being 0 and top 5 is 0 and poles is 0 and avg start is 37.0" }, { "role": "assistant", "content": "SELECT \"team_s\" FROM \"nationwide_series\" WHERE \"wins\"=0 AND \"top_5\"=0 AND \"poles\"=0 AND \"avg_start\"='37.0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: Name the winnings for 23rd position" }, { "role": "assistant", "content": "SELECT \"winnings\" FROM \"nationwide_series\" WHERE \"position\"='23rd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: Name the winnings for 2004" }, { "role": "assistant", "content": "SELECT \"winnings\" FROM \"nationwide_series\" WHERE \"year\"=2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: Name the total number of top 10 for avg start being 37.3" }, { "role": "assistant", "content": "SELECT COUNT(\"top_10\") FROM \"nationwide_series\" WHERE \"avg_start\"='37.3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"eliminated\" real,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"method_of_elimination\" text,\n \"time\" text\n);\n\nQuestion: What was the method of elimination in the chamber with a time of 24:02? " }, { "role": "assistant", "content": "SELECT \"method_of_elimination\" FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"time\"='24:02';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"eliminated\" real,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"method_of_elimination\" text,\n \"time\" text\n);\n\nQuestion: what is the maximum number that entered when the eliminator was Triple H? " }, { "role": "assistant", "content": "SELECT MAX(\"entered\") FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"eliminated_by\"='Triple H';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"eliminated\" real,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"method_of_elimination\" text,\n \"time\" text\n);\n\nQuestion: How many wrestlers are recorded for the chamber that's method of elimination was pinned after being hit by a lead pipe? " }, { "role": "assistant", "content": "SELECT COUNT(\"wrestler\") FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"method_of_elimination\"='Pinned after being hit by a lead pipe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"eliminated\" real,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"method_of_elimination\" text,\n \"time\" text\n);\n\nQuestion: What was the method of elimination for Kofi Kingston/ " }, { "role": "assistant", "content": "SELECT \"method_of_elimination\" FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"wrestler\"='Kofi Kingston';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slams_11_finals_9_titles_2_runner_\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What championships were played on clay and the opponent was virginia ruano pascual paola su\u00e1rez?" }, { "role": "assistant", "content": "SELECT \"championship\" FROM \"grand_slams_11_finals_9_titles_2_runner_\" WHERE \"surface\"='Clay' AND \"opponent\"='Virginia Ruano Pascual Paola Su\u00e1rez';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slams_11_finals_9_titles_2_runner_\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What championships had a match where Natasha Zvereva played as partner?" }, { "role": "assistant", "content": "SELECT \"championship\" FROM \"grand_slams_11_finals_9_titles_2_runner_\" WHERE \"partner\"='Natasha Zvereva';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"conroe_merom_65_nm\" (\n \"processor\" text,\n \"brand_name\" text,\n \"model_list\" text,\n \"cores\" real,\n \"l2_cache\" text,\n \"socket\" text,\n \"tdp\" text\n);\n\nQuestion: What is the value for model if processor is Kentsfield and brand name is Xeon?" }, { "role": "assistant", "content": "SELECT \"model_list\" FROM \"conroe_merom_65_nm\" WHERE \"processor\"='Kentsfield' AND \"brand_name\"='Xeon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"conroe_merom_65_nm\" (\n \"processor\" text,\n \"brand_name\" text,\n \"model_list\" text,\n \"cores\" real,\n \"l2_cache\" text,\n \"socket\" text,\n \"tdp\" text\n);\n\nQuestion: What is every value for TDP if model is x53xx?" }, { "role": "assistant", "content": "SELECT \"tdp\" FROM \"conroe_merom_65_nm\" WHERE \"model_list\"='X53xx';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"conroe_merom_65_nm\" (\n \"processor\" text,\n \"brand_name\" text,\n \"model_list\" text,\n \"cores\" real,\n \"l2_cache\" text,\n \"socket\" text,\n \"tdp\" text\n);\n\nQuestion: What is every value for cores if TDP is 17 W?" }, { "role": "assistant", "content": "SELECT \"cores\" FROM \"conroe_merom_65_nm\" WHERE \"tdp\"='17 W';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"episode\" real,\n \"first_air_date\" text,\n \"rating_18_49\" text,\n \"share_18_49\" real,\n \"viewers_millions\" text,\n \"rank_timeslot\" text,\n \"rank_night\" text\n);\n\nQuestion: How many records for number of viewers is listed for episode number 8? " }, { "role": "assistant", "content": "SELECT COUNT(\"viewers_millions\") FROM \"u_s_nielsen_ratings\" WHERE \"episode\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"episode\" real,\n \"first_air_date\" text,\n \"rating_18_49\" text,\n \"share_18_49\" real,\n \"viewers_millions\" text,\n \"rank_timeslot\" text,\n \"rank_night\" text\n);\n\nQuestion: What was the 18 to 49 rating when 9.50 million watched?" }, { "role": "assistant", "content": "SELECT \"rating_18_49\" FROM \"u_s_nielsen_ratings\" WHERE \"viewers_millions\"='9.50';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"episode\" real,\n \"first_air_date\" text,\n \"rating_18_49\" text,\n \"share_18_49\" real,\n \"viewers_millions\" text,\n \"rank_timeslot\" text,\n \"rank_night\" text\n);\n\nQuestion: what episode number had 11.73 million viewers? " }, { "role": "assistant", "content": "SELECT \"episode\" FROM \"u_s_nielsen_ratings\" WHERE \"viewers_millions\"='11.73';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"episode\" real,\n \"first_air_date\" text,\n \"rating_18_49\" text,\n \"share_18_49\" real,\n \"viewers_millions\" text,\n \"rank_timeslot\" text,\n \"rank_night\" text\n);\n\nQuestion: How many episodes had 11.47 million viewers? " }, { "role": "assistant", "content": "SELECT COUNT(\"episode\") FROM \"u_s_nielsen_ratings\" WHERE \"viewers_millions\"='11.47';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2468961_4\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Who wrote the episode that originally aired April 29, 1994?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_2468961_4\" WHERE \"original_air_date\"='April 29, 1994';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2468961_4\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What was the production code for the episode that debuted October 1, 1993?" }, { "role": "assistant", "content": "SELECT MAX(\"production_code\") FROM \"table1_2468961_4\" WHERE \"original_air_date\"='October 1, 1993';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2468961_4\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Who wrote the episode \"Sister Act\"?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_2468961_4\" WHERE \"title\"='\\\"Sister Act\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2468961_4\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What was the title of series number 56?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_2468961_4\" WHERE \"no_in_series\"=56;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2468961_4\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What was the title of the episode written by Julia Newton in series 48?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_2468961_4\" WHERE \"written_by\"='Julia Newton' AND \"no_in_series\"=48;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ptv_stations_nationwide\" (\n \"branding\" text,\n \"callsign\" text,\n \"ch_num\" text,\n \"power_k_w\" text,\n \"station_type\" text,\n \"location_transmitter_site\" text\n);\n\nQuestion: What is the callsign that has a station type of relay and a channel number of TV-2?" }, { "role": "assistant", "content": "SELECT \"callsign\" FROM \"ptv_stations_nationwide\" WHERE \"station_type\"='Relay' AND \"ch_num\"='TV-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ptv_stations_nationwide\" (\n \"branding\" text,\n \"callsign\" text,\n \"ch_num\" text,\n \"power_k_w\" text,\n \"station_type\" text,\n \"location_transmitter_site\" text\n);\n\nQuestion: What is the station type of DWZM-TV?" }, { "role": "assistant", "content": "SELECT \"station_type\" FROM \"ptv_stations_nationwide\" WHERE \"callsign\"='DWZM-TV';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ptv_stations_nationwide\" (\n \"branding\" text,\n \"callsign\" text,\n \"ch_num\" text,\n \"power_k_w\" text,\n \"station_type\" text,\n \"location_transmitter_site\" text\n);\n\nQuestion: What is the power in kilowatts of TV-12?" }, { "role": "assistant", "content": "SELECT \"power_k_w\" FROM \"ptv_stations_nationwide\" WHERE \"ch_num\"='TV-12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ptv_stations_nationwide\" (\n \"branding\" text,\n \"callsign\" text,\n \"ch_num\" text,\n \"power_k_w\" text,\n \"station_type\" text,\n \"location_transmitter_site\" text\n);\n\nQuestion: What is the power in KW of the transmitter situated in Borongan?" }, { "role": "assistant", "content": "SELECT \"power_k_w\" FROM \"ptv_stations_nationwide\" WHERE \"location_transmitter_site\"='Borongan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ptv_stations_nationwide\" (\n \"branding\" text,\n \"callsign\" text,\n \"ch_num\" text,\n \"power_k_w\" text,\n \"station_type\" text,\n \"location_transmitter_site\" text\n);\n\nQuestion: What is the channel number that has a branding of PTV 4 Laoag?" }, { "role": "assistant", "content": "SELECT \"ch_num\" FROM \"ptv_stations_nationwide\" WHERE \"branding\"='PTV 4 Laoag';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ptv_stations_nationwide\" (\n \"branding\" text,\n \"callsign\" text,\n \"ch_num\" text,\n \"power_k_w\" text,\n \"station_type\" text,\n \"location_transmitter_site\" text\n);\n\nQuestion: What is the power in KW that has a station type of relay and a callsign of DXCL-TV?" }, { "role": "assistant", "content": "SELECT \"power_k_w\" FROM \"ptv_stations_nationwide\" WHERE \"station_type\"='Relay' AND \"callsign\"='DXCL-TV';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2468961_7\" (\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);\n\nQuestion: When 15 is the number in season what is the highest number in series?" }, { "role": "assistant", "content": "SELECT MAX(\"no_in_series\") FROM \"table1_2468961_7\" WHERE \"no_in_season\"=15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2468961_7\" (\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);\n\nQuestion: When 123 is the number in series who is the director?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_2468961_7\" WHERE \"no_in_series\"=123;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2468961_7\" (\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);\n\nQuestion: When \"the kissing game\" is the title who is the director?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_2468961_7\" WHERE \"title\"='\\\"The Kissing Game\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2468961_7\" (\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);\n\nQuestion: When 120 is the number in series who is the writer?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_2468961_7\" WHERE \"no_in_series\"=120;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2468961_7\" (\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);\n\nQuestion: When 137 is the number in series what is the production code?" }, { "role": "assistant", "content": "SELECT \"production_code\" FROM \"table1_2468961_7\" WHERE \"no_in_series\"=137;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24706337_1\" (\n \"name_of_the_war\" text,\n \"ottoman_sultan\" text,\n \"persian_shah\" text,\n \"treaty_at_the_end_of_the_war\" text,\n \"victor\" text\n);\n\nQuestion: How many victors where there in the War of 1730\u20131736 , first stage?" }, { "role": "assistant", "content": "SELECT COUNT(\"victor\") FROM \"table1_24706337_1\" WHERE \"name_of_the_war\"='War of 1730\u20131736 , first stage';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24706337_1\" (\n \"name_of_the_war\" text,\n \"ottoman_sultan\" text,\n \"persian_shah\" text,\n \"treaty_at_the_end_of_the_war\" text,\n \"victor\" text\n);\n\nQuestion: Who was the Ottoman Sultan where the treaty at the end of the war was the Treaty of Constantinople (1590)?" }, { "role": "assistant", "content": "SELECT \"ottoman_sultan\" FROM \"table1_24706337_1\" WHERE \"treaty_at_the_end_of_the_war\"='Treaty of Constantinople (1590)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24706337_1\" (\n \"name_of_the_war\" text,\n \"ottoman_sultan\" text,\n \"persian_shah\" text,\n \"treaty_at_the_end_of_the_war\" text,\n \"victor\" text\n);\n\nQuestion: What is the name of the war where the Ottoman sultan was Selim I?" }, { "role": "assistant", "content": "SELECT \"name_of_the_war\" FROM \"table1_24706337_1\" WHERE \"ottoman_sultan\"='Selim I';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2468961_6\" (\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);\n\nQuestion: When \"baby come back\" is the title what is the air date?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_2468961_6\" WHERE \"title\"='\\\"Baby Come Back\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2468961_6\" (\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);\n\nQuestion: When 102 is the number in series who is the director?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_2468961_6\" WHERE \"no_in_series\"=102;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2468961_6\" (\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);\n\nQuestion: When \"we're going to disney world (part 1)\" is the title what is the air date?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_2468961_6\" WHERE \"title\"='\\\"We''re Going to Disney World (Part 1)\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2468961_8\" (\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);\n\nQuestion: Name who wrote the episode directed by patrick duffy airing on november 7, 1997" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_2468961_8\" WHERE \"directed_by\"='Patrick Duffy' AND \"original_air_date\"='November 7, 1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_attendance\" (\n \"team\" text,\n \"hosted\" real,\n \"average\" real,\n \"highest\" real,\n \"lowest\" real,\n \"total\" real,\n \"last_year\" real,\n \"up_down\" text\n);\n\nQuestion: What is the last year total for the team with a lowest of 23578?" }, { "role": "assistant", "content": "SELECT MAX(\"last_year\") FROM \"match_attendance\" WHERE \"lowest\"=23578;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_attendance\" (\n \"team\" text,\n \"hosted\" real,\n \"average\" real,\n \"highest\" real,\n \"lowest\" real,\n \"total\" real,\n \"last_year\" real,\n \"up_down\" text\n);\n\nQuestion: How many highest figures for the team with lowest of 16415?" }, { "role": "assistant", "content": "SELECT COUNT(\"highest\") FROM \"match_attendance\" WHERE \"lowest\"=16415;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_attendance\" (\n \"team\" text,\n \"hosted\" real,\n \"average\" real,\n \"highest\" real,\n \"lowest\" real,\n \"total\" real,\n \"last_year\" real,\n \"up_down\" text\n);\n\nQuestion: Which team has an up/down of + 3479?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"match_attendance\" WHERE \"up_down\"='+ 3479';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_attendance\" (\n \"team\" text,\n \"hosted\" real,\n \"average\" real,\n \"highest\" real,\n \"lowest\" real,\n \"total\" real,\n \"last_year\" real,\n \"up_down\" text\n);\n\nQuestion: What is the average of the team where the total is 243017?" }, { "role": "assistant", "content": "SELECT \"average\" FROM \"match_attendance\" WHERE \"total\"=243017;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24725951_1\" (\n \"episode\" real,\n \"stage\" text,\n \"celebrities\" text,\n \"directed_and_produced_by\" text,\n \"original_airdate\" text,\n \"viewers_overnight_estimates\" text\n);\n\nQuestion: How many episodes had celebrity guest stars Frank Skinner and Lee Mack?" }, { "role": "assistant", "content": "SELECT COUNT(\"episode\") FROM \"table1_24725951_1\" WHERE \"celebrities\"='Frank Skinner and Lee Mack';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24725951_1\" (\n \"episode\" real,\n \"stage\" text,\n \"celebrities\" text,\n \"directed_and_produced_by\" text,\n \"original_airdate\" text,\n \"viewers_overnight_estimates\" text\n);\n\nQuestion: List episode directed and produced by Karen Selway?" }, { "role": "assistant", "content": "SELECT \"episode\" FROM \"table1_24725951_1\" WHERE \"directed_and_produced_by\"='Karen Selway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24725951_1\" (\n \"episode\" real,\n \"stage\" text,\n \"celebrities\" text,\n \"directed_and_produced_by\" text,\n \"original_airdate\" text,\n \"viewers_overnight_estimates\" text\n);\n\nQuestion: Which episode had celebrities Nick Hewer and Saira Khan in them?" }, { "role": "assistant", "content": "SELECT \"episode\" FROM \"table1_24725951_1\" WHERE \"celebrities\"='Nick Hewer and Saira Khan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24725951_1\" (\n \"episode\" real,\n \"stage\" text,\n \"celebrities\" text,\n \"directed_and_produced_by\" text,\n \"original_airdate\" text,\n \"viewers_overnight_estimates\" text\n);\n\nQuestion: List the director and producer when Nick Hewer and Saira Khan were starring." }, { "role": "assistant", "content": "SELECT \"directed_and_produced_by\" FROM \"table1_24725951_1\" WHERE \"celebrities\"='Nick Hewer and Saira Khan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24725951_1\" (\n \"episode\" real,\n \"stage\" text,\n \"celebrities\" text,\n \"directed_and_produced_by\" text,\n \"original_airdate\" text,\n \"viewers_overnight_estimates\" text\n);\n\nQuestion: List directors and producers when the celebrities involved were Bill Turnbull and Louise Minchin." }, { "role": "assistant", "content": "SELECT \"directed_and_produced_by\" FROM \"table1_24725951_1\" WHERE \"celebrities\"='Bill Turnbull and Louise Minchin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"981\" (\n \"year\" real,\n \"engine\" text,\n \"power\" text,\n \"torque\" text,\n \"transmission\" text,\n \"0_100km_h_60mph\" text,\n \"top_speed\" text,\n \"co2\" text\n);\n\nQuestion: when 0\u2013100km/h (60mph) is 5.8 seconds (5.5), what is the torque?" }, { "role": "assistant", "content": "SELECT \"torque\" FROM \"981\" WHERE \"0_100km_h_60mph\"='5.8 seconds (5.5)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"981\" (\n \"year\" real,\n \"engine\" text,\n \"power\" text,\n \"torque\" text,\n \"transmission\" text,\n \"0_100km_h_60mph\" text,\n \"top_speed\" text,\n \"co2\" text\n);\n\nQuestion: whe, co2 is 206g/km, what is the torque?" }, { "role": "assistant", "content": "SELECT \"torque\" FROM \"981\" WHERE \"co2\"='206g/km';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"981\" (\n \"year\" real,\n \"engine\" text,\n \"power\" text,\n \"torque\" text,\n \"transmission\" text,\n \"0_100km_h_60mph\" text,\n \"top_speed\" text,\n \"co2\" text\n);\n\nQuestion: when co2 is 192g/km, what is the power?" }, { "role": "assistant", "content": "SELECT \"power\" FROM \"981\" WHERE \"co2\"='192g/km';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"981\" (\n \"year\" real,\n \"engine\" text,\n \"power\" text,\n \"torque\" text,\n \"transmission\" text,\n \"0_100km_h_60mph\" text,\n \"top_speed\" text,\n \"co2\" text\n);\n\nQuestion: when co2 is 192g/km, what is the power?" }, { "role": "assistant", "content": "SELECT \"power\" FROM \"981\" WHERE \"co2\"='192g/km';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"981\" (\n \"year\" real,\n \"engine\" text,\n \"power\" text,\n \"torque\" text,\n \"transmission\" text,\n \"0_100km_h_60mph\" text,\n \"top_speed\" text,\n \"co2\" text\n);\n\nQuestion: when 0\u2013100km/h (60mph) is 5.8 seconds (5.5), what is the engine?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"981\" WHERE \"0_100km_h_60mph\"='5.8 seconds (5.5)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"981\" (\n \"year\" real,\n \"engine\" text,\n \"power\" text,\n \"torque\" text,\n \"transmission\" text,\n \"0_100km_h_60mph\" text,\n \"top_speed\" text,\n \"co2\" text\n);\n\nQuestion: when0\u2013100km/h (60mph) is 5.5 seconds (5.2), whats is the top speed?" }, { "role": "assistant", "content": "SELECT \"top_speed\" FROM \"981\" WHERE \"0_100km_h_60mph\"='5.5 seconds (5.2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: What is the circuit of round 5?" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"race_calendar_and_results\" WHERE \"round\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: What date did Mike Rockenfeller have the fastest lap?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"race_calendar_and_results\" WHERE \"fastest_lap\"='Mike Rockenfeller';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_name\" (\n \"name\" text,\n \"nation\" text,\n \"seasons\" text,\n \"championship_titles\" text,\n \"races_starts\" text,\n \"poles\" real,\n \"wins\" real,\n \"podiums\" real,\n \"fastest_laps\" real,\n \"points\" text\n);\n\nQuestion: How many points for the driver who raced in seasons 2006 \u2013 2007 , 2009?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"by_name\" WHERE \"seasons\"='2006 \u2013 2007 , 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"rank\" text,\n \"player\" text,\n \"nationality\" text,\n \"team\" text,\n \"opponent\" text,\n \"score\" text,\n \"competition\" text,\n \"vote_percentage\" text\n);\n\nQuestion: What's the name of the competition where the nationality is Brazil and the voting percentage is n/a?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"2010\" WHERE \"vote_percentage\"='N/A' AND \"nationality\"='Brazil';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"rank\" text,\n \"player\" text,\n \"nationality\" text,\n \"team\" text,\n \"opponent\" text,\n \"score\" text,\n \"competition\" text,\n \"vote_percentage\" text\n);\n\nQuestion: What's the player's name whose nationality and team are Netherlands?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"2010\" WHERE \"nationality\"='Netherlands' AND \"team\"='Netherlands';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"rank\" text,\n \"player\" text,\n \"nationality\" text,\n \"team\" text,\n \"opponent\" text,\n \"score\" text,\n \"competition\" text,\n \"vote_percentage\" text\n);\n\nQuestion: What was the score for the game in which Samir Nasri played?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"2010\" WHERE \"player\"='Samir Nasri';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"rank\" text,\n \"player\" text,\n \"nationality\" text,\n \"team\" text,\n \"opponent\" text,\n \"score\" text,\n \"competition\" text,\n \"vote_percentage\" text\n);\n\nQuestion: Who is the player that played in the UEFA Euro 2012 qualifying Group A competition?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"2010\" WHERE \"competition\"='UEFA Euro 2012 qualifying Group A';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"rank\" text,\n \"player\" text,\n \"nationality\" text,\n \"team\" text,\n \"opponent\" text,\n \"score\" text,\n \"competition\" text,\n \"vote_percentage\" text\n);\n\nQuestion: What is the ranking of the UEFA Euro 2012 qualifying Group A competition?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"2010\" WHERE \"competition\"='UEFA Euro 2012 qualifying Group A';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"alpina_previous_models_petrol_engines\" (\n \"alpina_model\" text,\n \"bmw_donor_model\" text,\n \"alpina_engine\" text,\n \"power\" text,\n \"torque\" text,\n \"production\" text\n);\n\nQuestion: Name the production for alpina model being b10 4,6" }, { "role": "assistant", "content": "SELECT \"production\" FROM \"alpina_previous_models_petrol_engines\" WHERE \"alpina_model\"='B10 4,6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24776075_2\" (\n \"week\" real,\n \"date\" text,\n \"kickoff\" text,\n \"opponent\" text,\n \"final_score\" text,\n \"team_record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: How many final score datas are there on Sunday, May 12?" }, { "role": "assistant", "content": "SELECT COUNT(\"final_score\") FROM \"table1_24776075_2\" WHERE \"date\"='Sunday, May 12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24776075_2\" (\n \"week\" real,\n \"date\" text,\n \"kickoff\" text,\n \"opponent\" text,\n \"final_score\" text,\n \"team_record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: The game on Saturday, May 25 took place on which week?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"table1_24776075_2\" WHERE \"date\"='Saturday, May 25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24776075_2\" (\n \"week\" real,\n \"date\" text,\n \"kickoff\" text,\n \"opponent\" text,\n \"final_score\" text,\n \"team_record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What was the final score on Saturday, May 25?" }, { "role": "assistant", "content": "SELECT \"final_score\" FROM \"table1_24776075_2\" WHERE \"date\"='Saturday, May 25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24781886_2\" (\n \"num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"viewers\" text,\n \"air_date\" text,\n \"production_code\" real\n);\n\nQuestion: When 10 is the number who is the writer?" }, { "role": "assistant", "content": "SELECT \"writer_s\" FROM \"table1_24781886_2\" WHERE \"num\"=10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24781886_2\" (\n \"num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"viewers\" text,\n \"air_date\" text,\n \"production_code\" real\n);\n\nQuestion: When 6.66 is the amount of viewers what is the lowest production code?" }, { "role": "assistant", "content": "SELECT MIN(\"production_code\") FROM \"table1_24781886_2\" WHERE \"viewers\"='6.66';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24781886_2\" (\n \"num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"viewers\" text,\n \"air_date\" text,\n \"production_code\" real\n);\n\nQuestion: When 7.55 is the amount of viewers what is the lowest number?" }, { "role": "assistant", "content": "SELECT MIN(\"num\") FROM \"table1_24781886_2\" WHERE \"viewers\"='7.55';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"polling_firm\" text,\n \"date_of_polling\" text,\n \"link\" text,\n \"progressive_conservative\" real,\n \"liberal\" real,\n \"new_democratic\" real\n);\n\nQuestion: How many figures are given for the New Democratic for the polling range May 11\u201331, 2010?" }, { "role": "assistant", "content": "SELECT COUNT(\"new_democratic\") FROM \"opinion_polls\" WHERE \"date_of_polling\"='May 11\u201331, 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"polling_firm\" text,\n \"date_of_polling\" text,\n \"link\" text,\n \"progressive_conservative\" real,\n \"liberal\" real,\n \"new_democratic\" real\n);\n\nQuestion: What format is the link for the polling data for February 10\u201328, 2011?" }, { "role": "assistant", "content": "SELECT \"link\" FROM \"opinion_polls\" WHERE \"date_of_polling\"='February 10\u201328, 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24781886_3\" (\n \"total\" real,\n \"num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"viewers\" text,\n \"air_date\" text,\n \"production_code\" real\n);\n\nQuestion: When \"gary is a boat guy\" is the title how many sets of viewers are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"viewers\") FROM \"table1_24781886_3\" WHERE \"title\"='\\\"Gary Is A Boat Guy\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24781886_3\" (\n \"total\" real,\n \"num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"viewers\" text,\n \"air_date\" text,\n \"production_code\" real\n);\n\nQuestion: When 9 is the number what is the title?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_24781886_3\" WHERE \"num\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24781886_3\" (\n \"total\" real,\n \"num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"viewers\" text,\n \"air_date\" text,\n \"production_code\" real\n);\n\nQuestion: When 3 is the number what is the highest total?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"table1_24781886_3\" WHERE \"num\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24781886_3\" (\n \"total\" real,\n \"num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"viewers\" text,\n \"air_date\" text,\n \"production_code\" real\n);\n\nQuestion: When 7.08 is the amount of viewers what is the air date?" }, { "role": "assistant", "content": "SELECT \"air_date\" FROM \"table1_24781886_3\" WHERE \"viewers\"='7.08';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24781886_3\" (\n \"total\" real,\n \"num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"viewers\" text,\n \"air_date\" text,\n \"production_code\" real\n);\n\nQuestion: When 7.08 is the amount of viewers how many directors are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"director\") FROM \"table1_24781886_3\" WHERE \"viewers\"='7.08';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24798489_2\" (\n \"episode_number\" real,\n \"location\" text,\n \"original_airdate\" text,\n \"challenge_winner\" text,\n \"challenge\" text\n);\n\nQuestion: What location did the episode that aired originally on August 26, 2009 take place at?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"table1_24798489_2\" WHERE \"original_airdate\"='August 26, 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24798489_2\" (\n \"episode_number\" real,\n \"location\" text,\n \"original_airdate\" text,\n \"challenge_winner\" text,\n \"challenge\" text\n);\n\nQuestion: How many dates originally aired episodes located in Philadelphia, pennsylvania?" }, { "role": "assistant", "content": "SELECT COUNT(\"original_airdate\") FROM \"table1_24798489_2\" WHERE \"location\"='Philadelphia, Pennsylvania';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24798489_2\" (\n \"episode_number\" real,\n \"location\" text,\n \"original_airdate\" text,\n \"challenge_winner\" text,\n \"challenge\" text\n);\n\nQuestion: What was the challenge for episode 28?" }, { "role": "assistant", "content": "SELECT \"challenge\" FROM \"table1_24798489_2\" WHERE \"episode_number\"=28;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_24798489_2\" (\n \"episode_number\" real,\n \"location\" text,\n \"original_airdate\" text,\n \"challenge_winner\" text,\n \"challenge\" text\n);\n\nQuestion: How many original air dates were there for episode 22?" }, { "role": "assistant", "content": "SELECT COUNT(\"original_airdate\") FROM \"table1_24798489_2\" WHERE \"episode_number\"=22;" } ]
[ { "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 \"assists\" real\n);\n\nQuestion: What was the lowest goals ever achieved?" }, { "role": "assistant", "content": "SELECT MIN(\"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 \"language_program\" (\n \"afghan\" text,\n \"albanian\" text,\n \"arabic\" text,\n \"bangladeshi\" text,\n \"bosnian\" text,\n \"chinese\" text,\n \"colombian\" text,\n \"cook_islands\" text\n);\n\nQuestion: how many arabic scottish is afghan" }, { "role": "assistant", "content": "SELECT \"afghan\" FROM \"language_program\" WHERE \"arabic\"='Scottish';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language_program\" (\n \"afghan\" text,\n \"albanian\" text,\n \"arabic\" text,\n \"bangladeshi\" text,\n \"bosnian\" text,\n \"chinese\" text,\n \"colombian\" text,\n \"cook_islands\" text\n);\n\nQuestion: how many bosnian in cook islands is macedonian" }, { "role": "assistant", "content": "SELECT COUNT(\"cook_islands\") FROM \"language_program\" WHERE \"bosnian\"='Macedonian';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language_program\" (\n \"afghan\" text,\n \"albanian\" text,\n \"arabic\" text,\n \"bangladeshi\" text,\n \"bosnian\" text,\n \"chinese\" text,\n \"colombian\" text,\n \"cook_islands\" text\n);\n\nQuestion: how many colombia in bangladesh is serbian" }, { "role": "assistant", "content": "SELECT \"colombian\" FROM \"language_program\" WHERE \"bangladeshi\"='Serbian';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language_program\" (\n \"afghan\" text,\n \"albanian\" text,\n \"arabic\" text,\n \"bangladeshi\" text,\n \"bosnian\" text,\n \"chinese\" text,\n \"colombian\" text,\n \"cook_islands\" text\n);\n\nQuestion: how many arabic in colobians is finnish" }, { "role": "assistant", "content": "SELECT \"arabic\" FROM \"language_program\" WHERE \"colombian\"='Finnish';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language_program\" (\n \"afghan\" text,\n \"albanian\" text,\n \"arabic\" text,\n \"bangladeshi\" text,\n \"bosnian\" text,\n \"chinese\" text,\n \"colombian\" text,\n \"cook_islands\" text\n);\n\nQuestion: how many bosnian in cook islands is sri lankan" }, { "role": "assistant", "content": "SELECT \"bosnian\" FROM \"language_program\" WHERE \"cook_islands\"='Sri Lankan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language_program\" (\n \"afghan\" text,\n \"albanian\" text,\n \"arabic\" text,\n \"bangladeshi\" text,\n \"bosnian\" text,\n \"chinese\" text,\n \"colombian\" text,\n \"cook_islands\" text\n);\n\nQuestion: how many afghan in banglash is hungarian" }, { "role": "assistant", "content": "SELECT \"afghan\" FROM \"language_program\" WHERE \"bangladeshi\"='Hungarian';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_statistics\" (\n \"name\" text,\n \"nationality\" text,\n \"position\" text,\n \"sky_blue_fc_career\" text,\n \"appearances\" real,\n \"starts\" real,\n \"minutes\" real,\n \"goals\" real,\n \"assists\" real\n);\n\nQuestion: What is the name if the appearance is 2 and the position is FW?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"all_time_statistics\" WHERE \"position\"='FW' AND \"appearances\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_statistics\" (\n \"name\" text,\n \"nationality\" text,\n \"position\" text,\n \"sky_blue_fc_career\" text,\n \"appearances\" real,\n \"starts\" real,\n \"minutes\" real,\n \"goals\" real,\n \"assists\" real\n);\n\nQuestion: What is the assists total number if the minutes is 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"assists\") FROM \"all_time_statistics\" WHERE \"minutes\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_statistics\" (\n \"name\" text,\n \"nationality\" text,\n \"position\" text,\n \"sky_blue_fc_career\" text,\n \"appearances\" real,\n \"starts\" real,\n \"minutes\" real,\n \"goals\" real,\n \"assists\" real\n);\n\nQuestion: What is the appearance maximum if the starts is 18?" }, { "role": "assistant", "content": "SELECT MAX(\"appearances\") FROM \"all_time_statistics\" WHERE \"starts\"=18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2482547_5\" (\n \"name\" text,\n \"team_s\" text,\n \"matches\" real,\n \"balls_bowled\" real,\n \"wickets_taken\" real,\n \"average\" text\n);\n\nQuestion: What are the names of all the players with an average of 15.89?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"table1_2482547_5\" WHERE \"average\"='15.89';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2482547_5\" (\n \"name\" text,\n \"team_s\" text,\n \"matches\" real,\n \"balls_bowled\" real,\n \"wickets_taken\" real,\n \"average\" text\n);\n\nQuestion: What's the maximum wickets taken by players named Bill Lockwood?" }, { "role": "assistant", "content": "SELECT MAX(\"wickets_taken\") FROM \"table1_2482547_5\" WHERE \"name\"='Bill Lockwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2482547_5\" (\n \"name\" text,\n \"team_s\" text,\n \"matches\" real,\n \"balls_bowled\" real,\n \"wickets_taken\" real,\n \"average\" text\n);\n\nQuestion: What are all the teams with an average of 15.89?" }, { "role": "assistant", "content": "SELECT \"team_s\" FROM \"table1_2482547_5\" WHERE \"average\"='15.89';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2482547_5\" (\n \"name\" text,\n \"team_s\" text,\n \"matches\" real,\n \"balls_bowled\" real,\n \"wickets_taken\" real,\n \"average\" text\n);\n\nQuestion: Who are all the players who've bowled more than 4969 balls?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"table1_2482547_5\" WHERE \"balls_bowled\"=4969;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2482547_5\" (\n \"name\" text,\n \"team_s\" text,\n \"matches\" real,\n \"balls_bowled\" real,\n \"wickets_taken\" real,\n \"average\" text\n);\n\nQuestion: What are the averages for games with 212 wickets taken?" }, { "role": "assistant", "content": "SELECT \"average\" FROM \"table1_2482547_5\" WHERE \"wickets_taken\"=212;" } ]