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 \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What is the first year of the European Championships competition?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"competition\"='european championships';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: Which position has a venue of Helsinki, Finland?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"achievements\" WHERE \"venue\"='helsinki, finland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_war_ii\" (\n \"estimate\" text,\n \"name\" text,\n \"nat\" text,\n \"ship_type\" text,\n \"where_sunk\" text,\n \"date\" text\n);\n\nQuestion: What is the date that a hell ship sunk in the East China Sea?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"world_war_ii\" WHERE \"where_sunk\"='east china sea' AND \"ship_type\"='hell ship';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_war_ii\" (\n \"estimate\" text,\n \"name\" text,\n \"nat\" text,\n \"ship_type\" text,\n \"where_sunk\" text,\n \"date\" text\n);\n\nQuestion: Which nation had a battlecruiser with an estimate of 513?" }, { "role": "assistant", "content": "SELECT \"nat\" FROM \"world_war_ii\" WHERE \"ship_type\"='battlecruiser' AND \"estimate\"='513';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_war_ii\" (\n \"estimate\" text,\n \"name\" text,\n \"nat\" text,\n \"ship_type\" text,\n \"where_sunk\" text,\n \"date\" text\n);\n\nQuestion: What is the date that a ship sank in the South Atlantic?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"world_war_ii\" WHERE \"where_sunk\"='south atlantic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_war_ii\" (\n \"estimate\" text,\n \"name\" text,\n \"nat\" text,\n \"ship_type\" text,\n \"where_sunk\" text,\n \"date\" text\n);\n\nQuestion: What type of ship was the Shinano?" }, { "role": "assistant", "content": "SELECT \"ship_type\" FROM \"world_war_ii\" WHERE \"name\"='shinano';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_war_ii\" (\n \"estimate\" text,\n \"name\" text,\n \"nat\" text,\n \"ship_type\" text,\n \"where_sunk\" text,\n \"date\" text\n);\n\nQuestion: What nation had a ship named Roma?" }, { "role": "assistant", "content": "SELECT \"nat\" FROM \"world_war_ii\" WHERE \"name\"='roma';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was score of the Blue Jays' game versus the Indians when their record was 21-19?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='indians' AND \"record\"='21-19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"division\" text,\n \"team\" text,\n \"city\" text,\n \"home_arena\" text,\n \"capacity\" real,\n \"joined_nt_et\" text\n);\n\nQuestion: What city has a team in south division with a home arena with a greater capacity than 6,900 and named cloetta center?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"list\" WHERE \"capacity\">'6,900' AND \"division\"='south' AND \"home_arena\"='cloetta center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: During what years did the tallest building, located at 211 Union Street, have less than 31 floors?" }, { "role": "assistant", "content": "SELECT \"years_as_tallest\" FROM \"timeline_of_tallest_buildings\" WHERE \"floors\"<31 AND \"street_address\"='211 union street';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: What is the average number of floors at 170 Fourth Avenue North?" }, { "role": "assistant", "content": "SELECT AVG(\"floors\") FROM \"timeline_of_tallest_buildings\" WHERE \"street_address\"='170 fourth avenue north';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: What is the address of the Life & Casualty Tower?" }, { "role": "assistant", "content": "SELECT \"street_address\" FROM \"timeline_of_tallest_buildings\" WHERE \"name\"='life & casualty tower';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"southern_section\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is listed as the Tie no for Home team of Gillingham?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"southern_section\" WHERE \"home_team\"='gillingham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"southern_section\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Tie no listed for the Away team of Barnet?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"southern_section\" WHERE \"away_team\"='barnet';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"southern_section\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is listed for the Attendance that has a Tie no of 5?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"southern_section\" WHERE \"tie_no\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"southern_section\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Which Away team has a Tie no of 4?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"southern_section\" WHERE \"tie_no\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"southern_section\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Which Home Team has an Attendance of 1,859?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"southern_section\" WHERE \"attendance\"='1,859';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"southern_section\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is listed as the Away team for the Home team of the Bristol Rovers?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"southern_section\" WHERE \"home_team\"='bristol rovers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"team\" text,\n \"city\" text,\n \"founded\" real,\n \"first_season_in_segunda_divisi_n\" real,\n \"first_season_of_current_spell_in_segunda_divisi_n\" real,\n \"stadium\" text,\n \"capacity\" real,\n \"field\" text,\n \"top_division_titles\" real,\n \"last_top_division_title\" text\n);\n\nQuestion: What is the total of the first season in Segunda Divisi\u00f3n that has a City of ca\u00f1ete?" }, { "role": "assistant", "content": "SELECT SUM(\"first_season_of_current_spell_in_segunda_divisi_n\") FROM \"clubs\" WHERE \"city\"='ca\u00f1ete';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"team\" text,\n \"city\" text,\n \"founded\" real,\n \"first_season_in_segunda_divisi_n\" real,\n \"first_season_of_current_spell_in_segunda_divisi_n\" real,\n \"stadium\" text,\n \"capacity\" real,\n \"field\" text,\n \"top_division_titles\" real,\n \"last_top_division_title\" text\n);\n\nQuestion: Which team has Top division titles larger than 0, a Founded larger than 1927, and a Stadium of miguel grau?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"clubs\" WHERE \"top_division_titles\">0 AND \"founded\">1927 AND \"stadium\"='miguel grau';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"team\" text,\n \"city\" text,\n \"founded\" real,\n \"first_season_in_segunda_divisi_n\" real,\n \"first_season_of_current_spell_in_segunda_divisi_n\" real,\n \"stadium\" text,\n \"capacity\" real,\n \"field\" text,\n \"top_division_titles\" real,\n \"last_top_division_title\" text\n);\n\nQuestion: Which city has a First season of current spell in Segunda Divisi\u00f3n smaller than 2013?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"clubs\" WHERE \"first_season_of_current_spell_in_segunda_divisi_n\"<2013;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"team\" text,\n \"city\" text,\n \"founded\" real,\n \"first_season_in_segunda_divisi_n\" real,\n \"first_season_of_current_spell_in_segunda_divisi_n\" real,\n \"stadium\" text,\n \"capacity\" real,\n \"field\" text,\n \"top_division_titles\" real,\n \"last_top_division_title\" text\n);\n\nQuestion: What is the smallest capacity for a First season in Segunda Divisi\u00f3n of 2013, and Top division titles larger than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"capacity\") FROM \"clubs\" WHERE \"first_season_in_segunda_divisi_n\"=2013 AND \"top_division_titles\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r_seau_du_sport_tudiant_du_qu_bec_dunsmo\" (\n \"institution\" text,\n \"team\" text,\n \"city\" text,\n \"province\" text,\n \"first_season\" real,\n \"head_coach\" text,\n \"enrollment\" real,\n \"football_stadium\" text,\n \"capacity\" real\n);\n\nQuestion: What's the total enrollment ofr Mcgill University that has a capacity less than 25,012?" }, { "role": "assistant", "content": "SELECT COUNT(\"enrollment\") FROM \"r_seau_du_sport_tudiant_du_qu_bec_dunsmo\" WHERE \"institution\"='mcgill university' AND \"capacity\"<'25,012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r_seau_du_sport_tudiant_du_qu_bec_dunsmo\" (\n \"institution\" text,\n \"team\" text,\n \"city\" text,\n \"province\" text,\n \"first_season\" real,\n \"head_coach\" text,\n \"enrollment\" real,\n \"football_stadium\" text,\n \"capacity\" real\n);\n\nQuestion: What's the smallest season for Montreal that's greater than 5,100 for capacity?" }, { "role": "assistant", "content": "SELECT MIN(\"first_season\") FROM \"r_seau_du_sport_tudiant_du_qu_bec_dunsmo\" WHERE \"city\"='montreal' AND \"capacity\">'5,100';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r_seau_du_sport_tudiant_du_qu_bec_dunsmo\" (\n \"institution\" text,\n \"team\" text,\n \"city\" text,\n \"province\" text,\n \"first_season\" real,\n \"head_coach\" text,\n \"enrollment\" real,\n \"football_stadium\" text,\n \"capacity\" real\n);\n\nQuestion: What's the name of the city whose first season was in 1996?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"r_seau_du_sport_tudiant_du_qu_bec_dunsmo\" WHERE \"first_season\"=1996;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r_seau_du_sport_tudiant_du_qu_bec_dunsmo\" (\n \"institution\" text,\n \"team\" text,\n \"city\" text,\n \"province\" text,\n \"first_season\" real,\n \"head_coach\" text,\n \"enrollment\" real,\n \"football_stadium\" text,\n \"capacity\" real\n);\n\nQuestion: What's the name of the school that had an enrollment greater than 37,591 with the concordia stadium?" }, { "role": "assistant", "content": "SELECT \"institution\" FROM \"r_seau_du_sport_tudiant_du_qu_bec_dunsmo\" WHERE \"enrollment\">'37,591' AND \"football_stadium\"='concordia stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r_seau_du_sport_tudiant_du_qu_bec_dunsmo\" (\n \"institution\" text,\n \"team\" text,\n \"city\" text,\n \"province\" text,\n \"first_season\" real,\n \"head_coach\" text,\n \"enrollment\" real,\n \"football_stadium\" text,\n \"capacity\" real\n);\n\nQuestion: What's the name of the carabins stadium?" }, { "role": "assistant", "content": "SELECT \"football_stadium\" FROM \"r_seau_du_sport_tudiant_du_qu_bec_dunsmo\" WHERE \"team\"='carabins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: what team has the qual 2 of 1:44.050?" }, { "role": "assistant", "content": "SELECT \"best\" FROM \"qualifying_results\" WHERE \"qual_2\"='1:44.050';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: what name goes along with the team of forsythe racing, and a Qual 2 of 1:47.132?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"qualifying_results\" WHERE \"team\"='forsythe racing' AND \"qual_2\"='1:47.132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: what team had the 1:44.027 qual 2?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"qual_2\"='1:44.027';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: what is the qual 1 for alex tagliani?" }, { "role": "assistant", "content": "SELECT \"qual_1\" FROM \"qualifying_results\" WHERE \"name\"='alex tagliani';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: what is the team with the best of 1:43.134?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"best\"='1:43.134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What Women's Doubles team played after 2004 and where Line Isberg played Women's Singles?" }, { "role": "assistant", "content": "SELECT \"women_s_doubles\" FROM \"winners\" WHERE \"year\">2004 AND \"women_s_singles\"='line isberg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: After 1999, who played Men's Doubles when Kasper Ipsen played Men's Singles?" }, { "role": "assistant", "content": "SELECT \"men_s_doubles\" FROM \"winners\" WHERE \"year\">1999 AND \"men_s_singles\"='kasper ipsen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: In 2010, who was the Women's Singles player?" }, { "role": "assistant", "content": "SELECT \"women_s_singles\" FROM \"winners\" WHERE \"year\"=2010;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1994\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: Who was the visiting team at the matchup at the RCA Dome?" }, { "role": "assistant", "content": "SELECT \"visiting_team\" FROM \"1994\" WHERE \"stadium\"='rca dome';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1994\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the final score in the game in which the Detroit Lions were the home team?" }, { "role": "assistant", "content": "SELECT \"final_score\" FROM \"1994\" WHERE \"host_team\"='detroit lions';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1994\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: Which stadium hosted the November 20 game?" }, { "role": "assistant", "content": "SELECT \"stadium\" FROM \"1994\" WHERE \"date\"='november 20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1994\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: Who was the visiting team against the Minnesota Vikings?" }, { "role": "assistant", "content": "SELECT \"visiting_team\" FROM \"1994\" WHERE \"host_team\"='minnesota vikings';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1994\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: Who was the host team at Candlestick Park?" }, { "role": "assistant", "content": "SELECT \"host_team\" FROM \"1994\" WHERE \"stadium\"='candlestick park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1994\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: Which date had a final score of 20-27?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"1994\" WHERE \"final_score\"='20-27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: How many years have had the position of 2nd?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"achievements\" WHERE \"position\"='2nd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What position had notes of 20km and a year earlier than 2002?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"achievements\" WHERE \"notes\"='20km' AND \"year\"<2002;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What was the venue before 2006, with the position of 10th?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"achievements\" WHERE \"year\"<2006 AND \"position\"='10th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What were the notes when the Venue was Turin, Italy?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"achievements\" WHERE \"venue\"='turin, italy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"code_name\" text,\n \"function_figure\" text,\n \"real_name\" text,\n \"birthplace\" text,\n \"serial_number\" text,\n \"primary_military_speciality\" text,\n \"secondary_military_speciality\" text,\n \"equipment\" text\n);\n\nQuestion: What is Gareth Morgan's Secondary Military Specialty?" }, { "role": "assistant", "content": "SELECT \"secondary_military_speciality\" FROM \"characters\" WHERE \"real_name\"='gareth morgan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"code_name\" text,\n \"function_figure\" text,\n \"real_name\" text,\n \"birthplace\" text,\n \"serial_number\" text,\n \"primary_military_speciality\" text,\n \"secondary_military_speciality\" text,\n \"equipment\" text\n);\n\nQuestion: What is the Code Name of the figure born in Hawaii?" }, { "role": "assistant", "content": "SELECT \"code_name\" FROM \"characters\" WHERE \"birthplace\"='hawaii';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_teams\" (\n \"club\" text,\n \"district\" text,\n \"area_province\" text,\n \"stadium\" text,\n \"first_season\" text,\n \"last_title\" text\n);\n\nQuestion: Name the last title for greater buenos aires and first season of 1920" }, { "role": "assistant", "content": "SELECT \"last_title\" FROM \"current_teams\" WHERE \"area_province\"='greater buenos aires' AND \"first_season\"='1920';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_teams\" (\n \"club\" text,\n \"district\" text,\n \"area_province\" text,\n \"stadium\" text,\n \"first_season\" text,\n \"last_title\" text\n);\n\nQuestion: Name the area for District of c\u00f3rdoba" }, { "role": "assistant", "content": "SELECT \"area_province\" FROM \"current_teams\" WHERE \"district\"='c\u00f3rdoba';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_teams\" (\n \"club\" text,\n \"district\" text,\n \"area_province\" text,\n \"stadium\" text,\n \"first_season\" text,\n \"last_title\" text\n);\n\nQuestion: Name the last title for club of quilmes" }, { "role": "assistant", "content": "SELECT \"last_title\" FROM \"current_teams\" WHERE \"club\"='quilmes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_teams\" (\n \"club\" text,\n \"district\" text,\n \"area_province\" text,\n \"stadium\" text,\n \"first_season\" text,\n \"last_title\" text\n);\n\nQuestion: Name the last time for club of newell's old boys" }, { "role": "assistant", "content": "SELECT \"last_title\" FROM \"current_teams\" WHERE \"club\"='newell''s old boys';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_career\" (\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"scored\" real,\n \"competition\" text\n);\n\nQuestion: Name the averag scored for 2011 long teng cup and 2 october 2011" }, { "role": "assistant", "content": "SELECT AVG(\"scored\") FROM \"international_career\" WHERE \"competition\"='2011 long teng cup' AND \"date\"='2 october 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"le_series_models\" (\n \"colt_model_no\" text,\n \"stock\" text,\n \"fire_control\" text,\n \"rear_sight\" text,\n \"forward_assist\" text,\n \"barrel_length\" text,\n \"barrel_profile\" text,\n \"barrel_twist\" text,\n \"hand_guards\" text,\n \"bayonet_lug\" text,\n \"muzzle_device\" text\n);\n\nQuestion: Can you tell me the Barrel twist that has the Barrel lenght of 11.5 in.?" }, { "role": "assistant", "content": "SELECT \"barrel_twist\" FROM \"le_series_models\" WHERE \"barrel_length\"='11.5 in.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"region_total\" real,\n \"goondiwindi\" real,\n \"waggamba\" real,\n \"inglewood\" real\n);\n\nQuestion: What is the region total before 1986 with a Waggamba of 2,732, and a Goondiwindi less than 3,576?" }, { "role": "assistant", "content": "SELECT SUM(\"region_total\") FROM \"population\" WHERE \"year\"<1986 AND \"waggamba\"='2,732' AND \"goondiwindi\"<'3,576';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"region_total\" real,\n \"goondiwindi\" real,\n \"waggamba\" real,\n \"inglewood\" real\n);\n\nQuestion: What is the average year that had a value less than 2,575 in Inglewood?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"population\" WHERE \"inglewood\"<'2,575';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"region_total\" real,\n \"goondiwindi\" real,\n \"waggamba\" real,\n \"inglewood\" real\n);\n\nQuestion: What is the highest value in Waggamba were Inglewwod had 2,771, but Goondiwindi had less than 4,374?" }, { "role": "assistant", "content": "SELECT MAX(\"waggamba\") FROM \"population\" WHERE \"inglewood\"='2,771' AND \"goondiwindi\"<'4,374';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"region_total\" real,\n \"goondiwindi\" real,\n \"waggamba\" real,\n \"inglewood\" real\n);\n\nQuestion: What is the lost amount in Goondiwindi after 2001, and Inglewood had more than 2,586?" }, { "role": "assistant", "content": "SELECT MIN(\"goondiwindi\") FROM \"population\" WHERE \"inglewood\">'2,586' AND \"year\">2001;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"region_total\" real,\n \"goondiwindi\" real,\n \"waggamba\" real,\n \"inglewood\" real\n);\n\nQuestion: In 1996, what was the value for Inglewood when Goondiwindi had more than 4,374, and there is a region total higher than 9,114?" }, { "role": "assistant", "content": "SELECT AVG(\"inglewood\") FROM \"population\" WHERE \"region_total\">'9,114' AND \"year\"=1996 AND \"goondiwindi\">'4,374';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"region_total\" real,\n \"goondiwindi\" real,\n \"waggamba\" real,\n \"inglewood\" real\n);\n\nQuestion: What is the region total after 2001 when Goondiwindi had more than 4,103 and Inglewood was at 2,613?" }, { "role": "assistant", "content": "SELECT COUNT(\"region_total\") FROM \"population\" WHERE \"goondiwindi\">'4,103' AND \"inglewood\"='2,613' AND \"year\">2001;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"location\" text,\n \"nature_of_incident\" text,\n \"circumstances\" text,\n \"casualties\" text\n);\n\nQuestion: What is the nature of the incident in Kabul on 2004-01-28?" }, { "role": "assistant", "content": "SELECT \"nature_of_incident\" FROM \"2004\" WHERE \"location\"='kabul' AND \"date\"='2004-01-28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"location\" text,\n \"nature_of_incident\" text,\n \"circumstances\" text,\n \"casualties\" text\n);\n\nQuestion: What is the nature of the incident that's a bomb attack?" }, { "role": "assistant", "content": "SELECT \"nature_of_incident\" FROM \"2004\" WHERE \"circumstances\"='bomb attack';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"location\" text,\n \"nature_of_incident\" text,\n \"circumstances\" text,\n \"casualties\" text\n);\n\nQuestion: What is the nature of the incident with Casualties of 3 wia, and Circumstances of ied?" }, { "role": "assistant", "content": "SELECT \"nature_of_incident\" FROM \"2004\" WHERE \"casualties\"='3 wia' AND \"circumstances\"='ied';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"location\" text,\n \"nature_of_incident\" text,\n \"circumstances\" text,\n \"casualties\" text\n);\n\nQuestion: Which Casualties have a Location of kunduz, and Circumstances of suicide?" }, { "role": "assistant", "content": "SELECT \"casualties\" FROM \"2004\" WHERE \"location\"='kunduz' AND \"circumstances\"='suicide';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"location\" text,\n \"nature_of_incident\" text,\n \"circumstances\" text,\n \"casualties\" text\n);\n\nQuestion: Which Casualties have a hostile Nature of incident and Circumstances of mortar attack?" }, { "role": "assistant", "content": "SELECT \"casualties\" FROM \"2004\" WHERE \"nature_of_incident\"='hostile' AND \"circumstances\"='mortar attack';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"district\" text,\n \"party\" text,\n \"religion\" text,\n \"former_experience\" text,\n \"assumed_office\" real,\n \"born_in\" real\n);\n\nQuestion: When was the delegate who has previous experience as a commissioner of health born?" }, { "role": "assistant", "content": "SELECT \"born_in\" FROM \"delegates\" WHERE \"former_experience\"='commissioner of health';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the name of the airport in the city of Kota Kinabalu?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"see_also\" WHERE \"city\"='kota kinabalu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the IATA for the city of Amsterdam?" }, { "role": "assistant", "content": "SELECT \"iata\" FROM \"see_also\" WHERE \"city\"='amsterdam';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which country has an IATA of JFK?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"see_also\" WHERE \"iata\"='jfk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which city has an IATA of AUH?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"see_also\" WHERE \"iata\"='auh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which airport has an IATA of AMS?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"see_also\" WHERE \"iata\"='ams';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which city has an ICAO of Kiah?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"see_also\" WHERE \"icao\"='kiah';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"actor\" (\n \"original_title\" text,\n \"title_in_english\" text,\n \"genre\" text,\n \"role\" text,\n \"directed_by\" text\n);\n\nQuestion: What Genre did S\u00e1ndor Sim\u00f3 direct?" }, { "role": "assistant", "content": "SELECT \"genre\" FROM \"actor\" WHERE \"directed_by\"='s\u00e1ndor sim\u00f3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"actor\" (\n \"original_title\" text,\n \"title_in_english\" text,\n \"genre\" text,\n \"role\" text,\n \"directed_by\" text\n);\n\nQuestion: What is the Genre for Malina (ger.-aus.-fr.), an Original Title?" }, { "role": "assistant", "content": "SELECT \"genre\" FROM \"actor\" WHERE \"original_title\"='malina (ger.-aus.-fr.)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"actor\" (\n \"original_title\" text,\n \"title_in_english\" text,\n \"genre\" text,\n \"role\" text,\n \"directed_by\" text\n);\n\nQuestion: The Last Metro refers to which Original Title?" }, { "role": "assistant", "content": "SELECT \"original_title\" FROM \"actor\" WHERE \"title_in_english\"='the last metro';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"actor\" (\n \"original_title\" text,\n \"title_in_english\" text,\n \"genre\" text,\n \"role\" text,\n \"directed_by\" text\n);\n\nQuestion: What original title, Franciska Vas\u00e1rnapjai (hungarian), had an Episode Actor role which was Directed by G\u00e9za Berem\u00e9nyi?" }, { "role": "assistant", "content": "SELECT \"genre\" FROM \"actor\" WHERE \"role\"='episode actor' AND \"original_title\"='franciska vas\u00e1rnapjai (hungarian)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"actor\" (\n \"original_title\" text,\n \"title_in_english\" text,\n \"genre\" text,\n \"role\" text,\n \"directed_by\" text\n);\n\nQuestion: What is the Original title for an Episode Actor role which was Directed by G\u00e9za Berem\u00e9nyi?" }, { "role": "assistant", "content": "SELECT \"original_title\" FROM \"actor\" WHERE \"role\"='episode actor' AND \"directed_by\"='g\u00e9za berem\u00e9nyi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"june_draft\" (\n \"round\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text,\n \"signed\" text\n);\n\nQuestion: What is the round for bob randall?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"june_draft\" WHERE \"name\"='bob randall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"june_draft\" (\n \"round\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text,\n \"signed\" text\n);\n\nQuestion: what is the position when signed is yes, round is less than 24 and name is charlie hough?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"june_draft\" WHERE \"signed\"='yes' AND \"round\"<24 AND \"name\"='charlie hough';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"june_draft\" (\n \"round\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text,\n \"signed\" text\n);\n\nQuestion: what is the school when signed is no and round is 50?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"june_draft\" WHERE \"signed\"='no' AND \"round\"=50;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"june_draft\" (\n \"round\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text,\n \"signed\" text\n);\n\nQuestion: what is the school for round 8?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"june_draft\" WHERE \"round\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"june_draft\" (\n \"round\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text,\n \"signed\" text\n);\n\nQuestion: what is the position for robert johnson?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"june_draft\" WHERE \"name\"='robert johnson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"june_draft\" (\n \"round\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text,\n \"signed\" text\n);\n\nQuestion: Was position ss from carson city high school signed?" }, { "role": "assistant", "content": "SELECT \"signed\" FROM \"june_draft\" WHERE \"position\"='ss' AND \"school\"='carson city high school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"year\" text,\n \"class\" text,\n \"games\" real,\n \"starts\" real,\n \"comp\" real,\n \"yards\" real\n);\n\nQuestion: What was the average number of yards Michael Henig had in a year when he had more than 12 starts/" }, { "role": "assistant", "content": "SELECT AVG(\"yards\") FROM \"statistics\" WHERE \"starts\">12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"year\" text,\n \"class\" text,\n \"games\" real,\n \"starts\" real,\n \"comp\" real,\n \"yards\" real\n);\n\nQuestion: What was the average number of starts Michael Henig had in a year when he had more than 1201 yards?" }, { "role": "assistant", "content": "SELECT AVG(\"starts\") FROM \"statistics\" WHERE \"yards\">1201;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Name the airport with IATA of cxb" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"list\" WHERE \"iata\"='cxb';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Name the airport with IATA of dmk" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"list\" WHERE \"iata\"='dmk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Name the city that has singapore changi airport" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"list\" WHERE \"airport\"='singapore changi airport';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Name the ICAO for when IATA is zyl" }, { "role": "assistant", "content": "SELECT \"icao\" FROM \"list\" WHERE \"iata\"='zyl';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Name the ICAO for IATA of rgn" }, { "role": "assistant", "content": "SELECT \"icao\" FROM \"list\" WHERE \"iata\"='rgn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Name the ICAO for IATA of ccu" }, { "role": "assistant", "content": "SELECT \"icao\" FROM \"list\" WHERE \"iata\"='ccu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the largest gold with a Total larger than 16?" }, { "role": "assistant", "content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"total\">16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the largest silver with a Total smaller than 2, a Bronze smaller than 1, and a Nation of yugoslavia?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medal_table\" WHERE \"total\"<2 AND \"bronze\"<1 AND \"nation\"='yugoslavia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest bronze with a Nation of west germany, and a Gold larger than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='west germany' AND \"gold\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the record on July 2?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='july 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the largest silver with less than 0 gold?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medal_table\" WHERE \"gold\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_1\" (\n \"episode_no\" real,\n \"airdate\" text,\n \"total_viewers\" real,\n \"share\" text,\n \"bbc_one_weekly_ranking\" text\n);\n\nQuestion: What's the average total viewers that has 17.6% Share?" }, { "role": "assistant", "content": "SELECT AVG(\"total_viewers\") FROM \"series_1\" WHERE \"share\"='17.6%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_1\" (\n \"episode_no\" real,\n \"airdate\" text,\n \"total_viewers\" real,\n \"share\" text,\n \"bbc_one_weekly_ranking\" text\n);\n\nQuestion: What's the share of Episode 1?" }, { "role": "assistant", "content": "SELECT \"share\" FROM \"series_1\" WHERE \"episode_no\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dublin_and_south_eastern_railway_1854_19\" (\n \"type\" text,\n \"fleet_numbers\" text,\n \"quantity_made\" real,\n \"date_made\" text,\n \"gsr_class\" text,\n \"gsr_nos\" text,\n \"withdrawn\" text\n);\n\nQuestion: How many locomotives were made that were withdrawn in 1913?" }, { "role": "assistant", "content": "SELECT \"quantity_made\" FROM \"dublin_and_south_eastern_railway_1854_19\" WHERE \"withdrawn\"='1913';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dublin_and_south_eastern_railway_1854_19\" (\n \"type\" text,\n \"fleet_numbers\" text,\n \"quantity_made\" real,\n \"date_made\" text,\n \"gsr_class\" text,\n \"gsr_nos\" text,\n \"withdrawn\" text\n);\n\nQuestion: What is the date of creation for the locomotive having a type of 0-4-2" }, { "role": "assistant", "content": "SELECT \"date_made\" FROM \"dublin_and_south_eastern_railway_1854_19\" WHERE \"type\"='0-4-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dublin_and_south_eastern_railway_1854_19\" (\n \"type\" text,\n \"fleet_numbers\" text,\n \"quantity_made\" real,\n \"date_made\" text,\n \"gsr_class\" text,\n \"gsr_nos\" text,\n \"withdrawn\" text\n);\n\nQuestion: What is the date of creation of the locomotive of type 0-6-0 and GSR class of 441?" }, { "role": "assistant", "content": "SELECT \"date_made\" FROM \"dublin_and_south_eastern_railway_1854_19\" WHERE \"type\"='0-6-0' AND \"gsr_class\"='441';" } ]