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 \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"de_sus\" text,\n \"zares\" text,\n \"nlpd\" text\n);\n\nQuestion: What is the source for Zares at 8.6%?" }, { "role": "assistant", "content": "SELECT \"source\" FROM \"opinion_polls\" WHERE \"zares\"='8.6%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"de_sus\" text,\n \"zares\" text,\n \"nlpd\" text\n);\n\nQuestion: What is the source corresponding to a date of May 25\u201327?" }, { "role": "assistant", "content": "SELECT \"source\" FROM \"opinion_polls\" WHERE \"date\"='may 25\u201327';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" real,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What song is done by Terence Trent D'Arby?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"see_also\" WHERE \"artist\"='terence trent d''arby';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What was the Result on October 27, 2002?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='october 27, 2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: in riyadh, saudi arabia, what is the score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"venue\"='riyadh, saudi arabia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_people\" (\n \"ethnic_group\" text,\n \"totora_municipality_pct\" real,\n \"pojo_municipality_pct\" real,\n \"pocona_municipality_pct\" real,\n \"chimor_municipality_pct\" real,\n \"puerto_villarroel_municipality_pct\" real,\n \"entre_r_os_municipality_pct\" real\n);\n\nQuestion: Which Pocona Municipality (%) is the lowest one that has a Puerto Villarroel Municipality (%) smaller than 14.6, and a Chimor\u00e9 Municipality (%) of 5.1, and an Entre R\u00edos Municipality (%) smaller than 0.9?" }, { "role": "assistant", "content": "SELECT MIN(\"pocona_municipality_pct\") FROM \"the_people\" WHERE \"puerto_villarroel_municipality_pct\"<14.6 AND \"chimor_municipality_pct\"=5.1 AND \"entre_r_os_municipality_pct\"<0.9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_people\" (\n \"ethnic_group\" text,\n \"totora_municipality_pct\" real,\n \"pojo_municipality_pct\" real,\n \"pocona_municipality_pct\" real,\n \"chimor_municipality_pct\" real,\n \"puerto_villarroel_municipality_pct\" real,\n \"entre_r_os_municipality_pct\" real\n);\n\nQuestion: Which Puerto Villarroel Municipality (%) is the lowest one that has an Ethnic group of not indigenous, and a Totora Municipality (%) smaller than 4.4?" }, { "role": "assistant", "content": "SELECT MIN(\"puerto_villarroel_municipality_pct\") FROM \"the_people\" WHERE \"ethnic_group\"='not indigenous' AND \"totora_municipality_pct\"<4.4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_people\" (\n \"ethnic_group\" text,\n \"totora_municipality_pct\" real,\n \"pojo_municipality_pct\" real,\n \"pocona_municipality_pct\" real,\n \"chimor_municipality_pct\" real,\n \"puerto_villarroel_municipality_pct\" real,\n \"entre_r_os_municipality_pct\" real\n);\n\nQuestion: Which Pocona Municipality (%) has a Puerto Villarroel Municipality (%) larger than 14.6, and a Pojo Municipality (%) smaller than 88.5?" }, { "role": "assistant", "content": "SELECT SUM(\"pocona_municipality_pct\") FROM \"the_people\" WHERE \"puerto_villarroel_municipality_pct\">14.6 AND \"pojo_municipality_pct\"<88.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_people\" (\n \"ethnic_group\" text,\n \"totora_municipality_pct\" real,\n \"pojo_municipality_pct\" real,\n \"pocona_municipality_pct\" real,\n \"chimor_municipality_pct\" real,\n \"puerto_villarroel_municipality_pct\" real,\n \"entre_r_os_municipality_pct\" real\n);\n\nQuestion: Which Totora Municipality (%) is the highest one that has a Chimor\u00e9 Municipality (%) of 5.1, and a Pocona Municipality (%) smaller than 0.2?" }, { "role": "assistant", "content": "SELECT MAX(\"totora_municipality_pct\") FROM \"the_people\" WHERE \"chimor_municipality_pct\"=5.1 AND \"pocona_municipality_pct\"<0.2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"camping_world_200\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Pos has a Car # smaller than 18, and a Driver of mike skinner?" }, { "role": "assistant", "content": "SELECT AVG(\"pos\") FROM \"camping_world_200\" WHERE \"car_num\"<18 AND \"driver\"='mike skinner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"camping_world_200\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Team has a Pos larger than 3, and a Make of toyota, and a Car # smaller than 59, and a Driver of mike skinner?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"camping_world_200\" WHERE \"pos\">3 AND \"make\"='toyota' AND \"car_num\"<59 AND \"driver\"='mike skinner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"camping_world_200\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Pos has a Team of roush fenway racing, and a Car # of 99?" }, { "role": "assistant", "content": "SELECT SUM(\"pos\") FROM \"camping_world_200\" WHERE \"team\"='roush fenway racing' AND \"car_num\"=99;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"camping_world_200\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Car # has a Make of toyota, and a Pos of 7?" }, { "role": "assistant", "content": "SELECT AVG(\"car_num\") FROM \"camping_world_200\" WHERE \"make\"='toyota' AND \"pos\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"camping_world_200\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Pos has a Team of germian racing?" }, { "role": "assistant", "content": "SELECT \"pos\" FROM \"camping_world_200\" WHERE \"team\"='germian racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: Which Opponent has a Score of 2\u20136?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"playoffs\" WHERE \"score\"='2\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: Which Game has a Series of flyers win 3\u20130? Question 3" }, { "role": "assistant", "content": "SELECT MAX(\"game\") FROM \"playoffs\" WHERE \"series\"='flyers win 3\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: Which Series is on april 18?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"playoffs\" WHERE \"date\"='april 18';" } ]
[ { "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: Name the date with score of 9-2" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='9-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"liberec\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Which Points is the highest one that has a Nationality of aut, and a Name of thomas morgenstern?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"liberec\" WHERE \"nationality\"='aut' AND \"name\"='thomas morgenstern';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"liberec\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Which Name has a 2nd (m) larger than 128.5, and Points of 260.8?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"liberec\" WHERE \"2nd_m\">128.5 AND \"points\"=260.8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"completed_onshore_wind_farms\" (\n \"wind_farm\" text,\n \"capacity_mw\" real,\n \"turbines\" real,\n \"turbine_vendor\" text,\n \"size_mw\" text,\n \"county\" text\n);\n\nQuestion: What is the sum of the capacities for Carrigh wind warm that has a size of 0.85 MW and more than 3 turbines?" }, { "role": "assistant", "content": "SELECT SUM(\"capacity_mw\") FROM \"completed_onshore_wind_farms\" WHERE \"size_mw\"='0.85' AND \"wind_farm\"='carrigh' AND \"turbines\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"completed_onshore_wind_farms\" (\n \"wind_farm\" text,\n \"capacity_mw\" real,\n \"turbines\" real,\n \"turbine_vendor\" text,\n \"size_mw\" text,\n \"county\" text\n);\n\nQuestion: What is the size of the windfarm in wexford that has more than 19 turbines and a vendor of Enercon?" }, { "role": "assistant", "content": "SELECT \"size_mw\" FROM \"completed_onshore_wind_farms\" WHERE \"turbines\">19 AND \"turbine_vendor\"='enercon' AND \"county\"='wexford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"completed_onshore_wind_farms\" (\n \"wind_farm\" text,\n \"capacity_mw\" real,\n \"turbines\" real,\n \"turbine_vendor\" text,\n \"size_mw\" text,\n \"county\" text\n);\n\nQuestion: Who is the turbine vendor for Meenadreen in Donegal county with less than 6 turbines with a size of 0.85 MW?" }, { "role": "assistant", "content": "SELECT \"turbine_vendor\" FROM \"completed_onshore_wind_farms\" WHERE \"turbines\"<6 AND \"county\"='donegal' AND \"size_mw\"='0.85' AND \"wind_farm\"='meenadreen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_mexico_places_ranked_by_per_capita_i\" (\n \"rank\" real,\n \"place\" text,\n \"county\" text,\n \"per_capita_income\" text,\n \"median_house_hold_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the population where the rank is higher than 51 and the Median House-hold income is $25,250?" }, { "role": "assistant", "content": "SELECT SUM(\"population\") FROM \"new_mexico_places_ranked_by_per_capita_i\" WHERE \"rank\">51 AND \"median_house_hold_income\"='$25,250';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_mexico_places_ranked_by_per_capita_i\" (\n \"rank\" real,\n \"place\" text,\n \"county\" text,\n \"per_capita_income\" text,\n \"median_house_hold_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the Population where the Median House-hold Income is $25,016?" }, { "role": "assistant", "content": "SELECT MIN(\"population\") FROM \"new_mexico_places_ranked_by_per_capita_i\" WHERE \"median_house_hold_income\"='$25,016';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_mexico_places_ranked_by_per_capita_i\" (\n \"rank\" real,\n \"place\" text,\n \"county\" text,\n \"per_capita_income\" text,\n \"median_house_hold_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the Number of Households that have a Per Capita Income of $21,345?" }, { "role": "assistant", "content": "SELECT AVG(\"number_of_households\") FROM \"new_mexico_places_ranked_by_per_capita_i\" WHERE \"per_capita_income\"='$21,345';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_mexico_places_ranked_by_per_capita_i\" (\n \"rank\" real,\n \"place\" text,\n \"county\" text,\n \"per_capita_income\" text,\n \"median_house_hold_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What County has a Median Family Income of $79,331?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"new_mexico_places_ranked_by_per_capita_i\" WHERE \"median_family_income\"='$79,331';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_total_medals\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: The United States, with a total medal count of less than 171, and a bronze medal count less than 9, has how many gold medals?" }, { "role": "assistant", "content": "SELECT MAX(\"gold\") FROM \"world_championships_total_medals\" WHERE \"total\"<171 AND \"nation\"='united states' AND \"bronze\"<9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_total_medals\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many total gold medals did Australia receive?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"world_championships_total_medals\" WHERE \"nation\"='australia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_total_medals\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many total bronze medals did Canada receive?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"world_championships_total_medals\" WHERE \"nation\"='canada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_total_medals\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many total gold medals did India receive?" }, { "role": "assistant", "content": "SELECT \"gold\" FROM \"world_championships_total_medals\" WHERE \"nation\"='india';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles\" (\n \"tournament\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"career_w_l\" text\n);\n\nQuestion: Which 1997's accompanying 1991 was a when the tournament was the australian open?" }, { "role": "assistant", "content": "SELECT \"1997\" FROM \"mixed_doubles\" WHERE \"1991\"='a' AND \"tournament\"='australian open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles\" (\n \"tournament\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"career_w_l\" text\n);\n\nQuestion: Which 1997's 1992 was 1r when 1994 was a?" }, { "role": "assistant", "content": "SELECT \"1997\" FROM \"mixed_doubles\" WHERE \"1992\"='1r' AND \"1994\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles\" (\n \"tournament\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"career_w_l\" text\n);\n\nQuestion: Which 1995's tournament was the French Open?" }, { "role": "assistant", "content": "SELECT \"1995\" FROM \"mixed_doubles\" WHERE \"tournament\"='french open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles\" (\n \"tournament\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"career_w_l\" text\n);\n\nQuestion: Which 1989's 1991 and 1994 stats were 1r?" }, { "role": "assistant", "content": "SELECT \"1989\" FROM \"mixed_doubles\" WHERE \"1991\"='1r' AND \"1994\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles\" (\n \"tournament\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"career_w_l\" text\n);\n\nQuestion: Which 1990s 1992 was 3r?" }, { "role": "assistant", "content": "SELECT \"1990\" FROM \"mixed_doubles\" WHERE \"1992\"='3r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"instruments_played_by_band_members\" (\n \"paul_mc_cartney\" text,\n \"stuart\" text,\n \"mc_intosh\" text,\n \"whitten\" text,\n \"linda_mc_cartney\" text\n);\n\nQuestion: Which Linda McCartney has a Stuart of electric guitar?" }, { "role": "assistant", "content": "SELECT \"linda_mc_cartney\" FROM \"instruments_played_by_band_members\" WHERE \"stuart\"='electric guitar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"instruments_played_by_band_members\" (\n \"paul_mc_cartney\" text,\n \"stuart\" text,\n \"mc_intosh\" text,\n \"whitten\" text,\n \"linda_mc_cartney\" text\n);\n\nQuestion: Which Whitten has a Stuart of bass, and a Paul McCartney of electric guitar?" }, { "role": "assistant", "content": "SELECT \"whitten\" FROM \"instruments_played_by_band_members\" WHERE \"stuart\"='bass' AND \"paul_mc_cartney\"='electric guitar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"instruments_played_by_band_members\" (\n \"paul_mc_cartney\" text,\n \"stuart\" text,\n \"mc_intosh\" text,\n \"whitten\" text,\n \"linda_mc_cartney\" text\n);\n\nQuestion: Which McIntosh has a Whitten of drums, and a Stuart of bass, and a Paul McCartney of electric guitar?" }, { "role": "assistant", "content": "SELECT \"mc_intosh\" FROM \"instruments_played_by_band_members\" WHERE \"whitten\"='drums' AND \"stuart\"='bass' AND \"paul_mc_cartney\"='electric guitar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"instruments_played_by_band_members\" (\n \"paul_mc_cartney\" text,\n \"stuart\" text,\n \"mc_intosh\" text,\n \"whitten\" text,\n \"linda_mc_cartney\" text\n);\n\nQuestion: Which Paul McCartney has a Linda McCartney of keyboards?" }, { "role": "assistant", "content": "SELECT \"paul_mc_cartney\" FROM \"instruments_played_by_band_members\" WHERE \"linda_mc_cartney\"='keyboards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"instruments_played_by_band_members\" (\n \"paul_mc_cartney\" text,\n \"stuart\" text,\n \"mc_intosh\" text,\n \"whitten\" text,\n \"linda_mc_cartney\" text\n);\n\nQuestion: Which McIntosh has a Stuart of bass, and a Linda McCartney of keyboards or drum?" }, { "role": "assistant", "content": "SELECT \"mc_intosh\" FROM \"instruments_played_by_band_members\" WHERE \"stuart\"='bass' AND \"linda_mc_cartney\"='keyboards or drum';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"instruments_played_by_band_members\" (\n \"paul_mc_cartney\" text,\n \"stuart\" text,\n \"mc_intosh\" text,\n \"whitten\" text,\n \"linda_mc_cartney\" text\n);\n\nQuestion: Which Paul McCartney has a Linda McCartney of keyboards or drum?" }, { "role": "assistant", "content": "SELECT \"paul_mc_cartney\" FROM \"instruments_played_by_band_members\" WHERE \"linda_mc_cartney\"='keyboards or drum';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the largest Grid that has a Bike of honda cbr1000rr, and a Time of +20.848, and a Lap greater than 24?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"superbike_race_2_classification\" WHERE \"bike\"='honda cbr1000rr' AND \"time\"='+20.848' AND \"laps\">24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_casting\" (\n \"role\" text,\n \"d_oyly_carte_1920_tour\" text,\n \"d_oyly_carte_1930_tour\" text,\n \"d_oyly_carte_1939_tour\" text,\n \"d_oyly_carte_1945_tour\" text,\n \"d_oyly_carte_1950_tour\" text\n);\n\nQuestion: D'Oyly Carte 1920 Tour of hugh enes blackmore is what D'Oyly Carte 1930 Tour?" }, { "role": "assistant", "content": "SELECT \"d_oyly_carte_1930_tour\" FROM \"historical_casting\" WHERE \"d_oyly_carte_1920_tour\"='hugh enes blackmore';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_casting\" (\n \"role\" text,\n \"d_oyly_carte_1920_tour\" text,\n \"d_oyly_carte_1930_tour\" text,\n \"d_oyly_carte_1939_tour\" text,\n \"d_oyly_carte_1945_tour\" text,\n \"d_oyly_carte_1950_tour\" text\n);\n\nQuestion: D'Oyly Carte 1939 Tour of richard walker involves what D'Oyly Carte 1945 Tour?" }, { "role": "assistant", "content": "SELECT \"d_oyly_carte_1945_tour\" FROM \"historical_casting\" WHERE \"d_oyly_carte_1939_tour\"='richard walker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_casting\" (\n \"role\" text,\n \"d_oyly_carte_1920_tour\" text,\n \"d_oyly_carte_1930_tour\" text,\n \"d_oyly_carte_1939_tour\" text,\n \"d_oyly_carte_1945_tour\" text,\n \"d_oyly_carte_1950_tour\" text\n);\n\nQuestion: D'Oyly Carte 1920 Tour of james turnbull is what D'Oyly Carte 1945 Tour?" }, { "role": "assistant", "content": "SELECT \"d_oyly_carte_1945_tour\" FROM \"historical_casting\" WHERE \"d_oyly_carte_1920_tour\"='james turnbull';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_casting\" (\n \"role\" text,\n \"d_oyly_carte_1920_tour\" text,\n \"d_oyly_carte_1930_tour\" text,\n \"d_oyly_carte_1939_tour\" text,\n \"d_oyly_carte_1945_tour\" text,\n \"d_oyly_carte_1950_tour\" text\n);\n\nQuestion: Role of wilfred is what D'Oyly Carte 1945 Tour?" }, { "role": "assistant", "content": "SELECT \"d_oyly_carte_1945_tour\" FROM \"historical_casting\" WHERE \"role\"='wilfred';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_casting\" (\n \"role\" text,\n \"d_oyly_carte_1920_tour\" text,\n \"d_oyly_carte_1930_tour\" text,\n \"d_oyly_carte_1939_tour\" text,\n \"d_oyly_carte_1945_tour\" text,\n \"d_oyly_carte_1950_tour\" text\n);\n\nQuestion: D'Oyly Carte 1939 Tour of sydney granville had what D'Oyly Carte 1950 Tour" }, { "role": "assistant", "content": "SELECT \"d_oyly_carte_1950_tour\" FROM \"historical_casting\" WHERE \"d_oyly_carte_1939_tour\"='sydney granville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_casting\" (\n \"role\" text,\n \"d_oyly_carte_1920_tour\" text,\n \"d_oyly_carte_1930_tour\" text,\n \"d_oyly_carte_1939_tour\" text,\n \"d_oyly_carte_1945_tour\" text,\n \"d_oyly_carte_1950_tour\" text\n);\n\nQuestion: D'Oyly Carte 1930 Tour of john dean involved what D'Oyly Carte 1945 Tour?" }, { "role": "assistant", "content": "SELECT \"d_oyly_carte_1945_tour\" FROM \"historical_casting\" WHERE \"d_oyly_carte_1930_tour\"='john dean';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: The nation of denmark has what average total nad more than 0 gold?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"nation\"='denmark' AND \"gold\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Switzerland has how many gold and less than 0 silver?" }, { "role": "assistant", "content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"nation\"='switzerland' AND \"silver\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: How many wins does the player ranked lower than 3 with earnings of $3,315,502 have?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"leaders\" WHERE \"rank\">3 AND \"earnings\">'3,315,502';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the highest number of wins of the player with less than $4,976,980 in earnings and a rank lower than 4?" }, { "role": "assistant", "content": "SELECT MAX(\"wins\") FROM \"leaders\" WHERE \"earnings\"<'4,976,980' AND \"rank\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_lancashire_totals\" (\n \"score\" text,\n \"opposition\" text,\n \"venue\" text,\n \"city\" text,\n \"year\" real\n);\n\nQuestion: How many years had a score of 734-5d?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"highest_lancashire_totals\" WHERE \"score\"='734-5d';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_lancashire_totals\" (\n \"score\" text,\n \"opposition\" text,\n \"venue\" text,\n \"city\" text,\n \"year\" real\n);\n\nQuestion: Which venue had a city of Manchester before 2003?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"highest_lancashire_totals\" WHERE \"city\"='manchester' AND \"year\"<2003;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_lancashire_totals\" (\n \"score\" text,\n \"opposition\" text,\n \"venue\" text,\n \"city\" text,\n \"year\" real\n);\n\nQuestion: Which venue had a city of Manchester in 2003?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"highest_lancashire_totals\" WHERE \"city\"='manchester' AND \"year\"=2003;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_lancashire_totals\" (\n \"score\" text,\n \"opposition\" text,\n \"venue\" text,\n \"city\" text,\n \"year\" real\n);\n\nQuestion: Which venue had a score of 734-5d?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"highest_lancashire_totals\" WHERE \"score\"='734-5d';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average number of top-5s for the major with 5 top-10s and fewer than 12 cuts made?" }, { "role": "assistant", "content": "SELECT AVG(\"top_5\") FROM \"summary\" WHERE \"top_10\"=5 AND \"cuts_made\"<12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average number of top-10s for the major with 2 top-25s and fewer than 10 cuts made?" }, { "role": "assistant", "content": "SELECT AVG(\"top_10\") FROM \"summary\" WHERE \"top_25\"=2 AND \"cuts_made\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the total number of top-25s for the major that has 11 top-10s?" }, { "role": "assistant", "content": "SELECT COUNT(\"top_25\") FROM \"summary\" WHERE \"top_10\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: How many total events have cuts made over 12, more than 2 top-5s, and more than 11 top-10s?" }, { "role": "assistant", "content": "SELECT SUM(\"events\") FROM \"summary\" WHERE \"cuts_made\">12 AND \"top_5\">2 AND \"top_10\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: How many total wins are associated with events with 1 top-10?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"summary\" WHERE \"top_10\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average number of cuts made in events with fewer than 1 win and exactly 11 top-10s?" }, { "role": "assistant", "content": "SELECT AVG(\"cuts_made\") FROM \"summary\" WHERE \"top_10\"=11 AND \"wins\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What week did they have a bye?" }, { "role": "assistant", "content": "SELECT \"week\" FROM \"schedule\" WHERE \"date\"='bye';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What tournament in 2006 had a score of 0-0?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"2006\"='0-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_63_oberlin_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: What was the highest number of extra points scored by Albert Herrnstein, when he scored more than 15 points total?" }, { "role": "assistant", "content": "SELECT MAX(\"extra_points\") FROM \"michigan_63_oberlin_0\" WHERE \"player\"='albert herrnstein' AND \"points\">15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_63_oberlin_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many touchdowns were scored by William Cole?" }, { "role": "assistant", "content": "SELECT \"touchdowns\" FROM \"michigan_63_oberlin_0\" WHERE \"player\"='william cole';" } ]
[ { "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\" text,\n \"record\" text\n);\n\nQuestion: For the game with 26,236 attendance, what was the record?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"attendance\"='26,236';" } ]
[ { "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\" text,\n \"record\" text\n);\n\nQuestion: What's the record for the game with an attendance of 49,222?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"attendance\"='49,222';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: Who had the most rebounds and how many did he have during the game on June 11?" }, { "role": "assistant", "content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"date\"='june 11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: Who was the leading scorer and how many did he score for the game on June 13?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"date\"='june 13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nhl_amateur_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What College/Junior/Club Team has Pick 50 before Round 8?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team\" FROM \"nhl_amateur_draft\" WHERE \"round\"<8 AND \"pick\"=50;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_standings\" (\n \"season\" real,\n \"overall\" real,\n \"slalom\" text,\n \"giant_slalom\" real,\n \"super_g\" real,\n \"downhill\" text,\n \"combined\" text\n);\n\nQuestion: What is the highest overall prior to 1996 with a slalom of 39?" }, { "role": "assistant", "content": "SELECT MAX(\"overall\") FROM \"season_standings\" WHERE \"slalom\"='39' AND \"season\"<1996;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_standings\" (\n \"season\" real,\n \"overall\" real,\n \"slalom\" text,\n \"giant_slalom\" real,\n \"super_g\" real,\n \"downhill\" text,\n \"combined\" text\n);\n\nQuestion: What is the lowest overall score prior to 1992 with a downhill score of 1?" }, { "role": "assistant", "content": "SELECT MIN(\"overall\") FROM \"season_standings\" WHERE \"downhill\"='1' AND \"season\"<1992;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_standings\" (\n \"season\" real,\n \"overall\" real,\n \"slalom\" text,\n \"giant_slalom\" real,\n \"super_g\" real,\n \"downhill\" text,\n \"combined\" text\n);\n\nQuestion: What was her Giant Slalom score when her Overall was greater than 3 and her Super G score was 12?" }, { "role": "assistant", "content": "SELECT \"giant_slalom\" FROM \"season_standings\" WHERE \"overall\">3 AND \"super_g\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_standings\" (\n \"season\" real,\n \"overall\" real,\n \"slalom\" text,\n \"giant_slalom\" real,\n \"super_g\" real,\n \"downhill\" text,\n \"combined\" text\n);\n\nQuestion: What was her highest Super G score with a Slalom score of 58 and an Overall larger than 2?" }, { "role": "assistant", "content": "SELECT MAX(\"super_g\") FROM \"season_standings\" WHERE \"slalom\"='58' AND \"overall\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_interchanges_and_features\" (\n \"name\" text,\n \"dist_from_origin\" text,\n \"dist_from_terminus\" text,\n \"speed_limit\" text,\n \"location_all_in_nagano\" text\n);\n\nQuestion: What location has the name of Sakakita BS?" }, { "role": "assistant", "content": "SELECT \"location_all_in_nagano\" FROM \"list_of_interchanges_and_features\" WHERE \"name\"='sakakita bs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_interchanges_and_features\" (\n \"name\" text,\n \"dist_from_origin\" text,\n \"dist_from_terminus\" text,\n \"speed_limit\" text,\n \"location_all_in_nagano\" text\n);\n\nQuestion: Which location includes Sakakita BS?" }, { "role": "assistant", "content": "SELECT \"location_all_in_nagano\" FROM \"list_of_interchanges_and_features\" WHERE \"name\"='sakakita bs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_interchanges_and_features\" (\n \"name\" text,\n \"dist_from_origin\" text,\n \"dist_from_terminus\" text,\n \"speed_limit\" text,\n \"location_all_in_nagano\" text\n);\n\nQuestion: What is the distance from origin in Azumino including Toyoshina IC?" }, { "role": "assistant", "content": "SELECT \"dist_from_origin\" FROM \"list_of_interchanges_and_features\" WHERE \"location_all_in_nagano\"='azumino' AND \"name\"='toyoshina ic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"district\" text,\n \"name\" text,\n \"party\" text,\n \"hometown\" text,\n \"first_elected\" real,\n \"towns_represented\" text\n);\n\nQuestion: Which district had first elected earlier than 2006 for representation of Broken Arrow, Tulsa?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"senate\" WHERE \"first_elected\"<2006 AND \"towns_represented\"='broken arrow, tulsa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"district\" text,\n \"name\" text,\n \"party\" text,\n \"hometown\" text,\n \"first_elected\" real,\n \"towns_represented\" text\n);\n\nQuestion: How many values of first elected are for district 16?" }, { "role": "assistant", "content": "SELECT COUNT(\"first_elected\") FROM \"senate\" WHERE \"district\"='16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"district\" text,\n \"name\" text,\n \"party\" text,\n \"hometown\" text,\n \"first_elected\" real,\n \"towns_represented\" text\n);\n\nQuestion: Which towns are represented in district 31?" }, { "role": "assistant", "content": "SELECT \"towns_represented\" FROM \"senate\" WHERE \"district\"='31';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"financial_comparisons_between_top_10_ban\" (\n \"bank\" text,\n \"asset\" real,\n \"loans\" real,\n \"npl_net\" text,\n \"deposits\" real,\n \"net_interest_income\" real,\n \"non_interest_income\" real,\n \"net_profit\" real,\n \"no_of_employees\" text,\n \"no_of_branches_offices\" real,\n \"no_of_at_ms\" text\n);\n\nQuestion: How many deposits had a Non-Interest Income of 0.9500000000000001 and number of branch/offices less than 17?" }, { "role": "assistant", "content": "SELECT COUNT(\"deposits\") FROM \"financial_comparisons_between_top_10_ban\" WHERE \"non_interest_income\"=0.9500000000000001 AND \"no_of_branches_offices\"<17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"financial_comparisons_between_top_10_ban\" (\n \"bank\" text,\n \"asset\" real,\n \"loans\" real,\n \"npl_net\" text,\n \"deposits\" real,\n \"net_interest_income\" real,\n \"non_interest_income\" real,\n \"net_profit\" real,\n \"no_of_employees\" text,\n \"no_of_branches_offices\" real,\n \"no_of_at_ms\" text\n);\n\nQuestion: Which NPL net's bank was citibank?" }, { "role": "assistant", "content": "SELECT \"npl_net\" FROM \"financial_comparisons_between_top_10_ban\" WHERE \"bank\"='citibank';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"54_holes\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which championship has a winning score of (77-76-74-73=300)?" }, { "role": "assistant", "content": "SELECT \"championship\" FROM \"wins_5\" WHERE \"winning_score\"='(77-76-74-73=300)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"54_holes\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which championship has a margin of 8 strokes?" }, { "role": "assistant", "content": "SELECT \"championship\" FROM \"wins_5\" WHERE \"margin\"='8 strokes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"54_holes\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which championship has a 5 shot lead for 54 holes?" }, { "role": "assistant", "content": "SELECT \"championship\" FROM \"wins_5\" WHERE \"54_holes\"='5 shot lead';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"54_holes\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the 54 holes for The Open Championship (4)?" }, { "role": "assistant", "content": "SELECT \"54_holes\" FROM \"wins_5\" WHERE \"championship\"='the open championship (4)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Which Tournament has a 2007 of wta premier 5 tournaments?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles_performance_timeline\" WHERE \"2007\"='wta premier 5 tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Which Tournament was played in NH in 2011?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles_performance_timeline\" WHERE \"2011\"='nh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Which Tournament has a 2010 of 2r, and a 2011 of 1r?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles_performance_timeline\" WHERE \"2010\"='2r' AND \"2011\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"banknotes\" (\n \"value\" text,\n \"color\" text,\n \"obverse\" text,\n \"reverse\" text,\n \"first_issued\" real\n);\n\nQuestion: When was Color of green first issued?" }, { "role": "assistant", "content": "SELECT MIN(\"first_issued\") FROM \"banknotes\" WHERE \"color\"='green';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"banknotes\" (\n \"value\" text,\n \"color\" text,\n \"obverse\" text,\n \"reverse\" text,\n \"first_issued\" real\n);\n\nQuestion: When was Color of green last issued?" }, { "role": "assistant", "content": "SELECT MAX(\"first_issued\") FROM \"banknotes\" WHERE \"color\"='green';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"banknotes\" (\n \"value\" text,\n \"color\" text,\n \"obverse\" text,\n \"reverse\" text,\n \"first_issued\" real\n);\n\nQuestion: What reverse has a color of green?" }, { "role": "assistant", "content": "SELECT \"reverse\" FROM \"banknotes\" WHERE \"color\"='green';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"banknotes\" (\n \"value\" text,\n \"color\" text,\n \"obverse\" text,\n \"reverse\" text,\n \"first_issued\" real\n);\n\nQuestion: How much was a Reverse of guitar of agust\u00edn p\u00edo barrios before 1998?" }, { "role": "assistant", "content": "SELECT \"value\" FROM \"banknotes\" WHERE \"first_issued\"<1998 AND \"reverse\"='guitar of agust\u00edn p\u00edo barrios';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is BYU's lowest pick?" }, { "role": "assistant", "content": "SELECT MIN(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"college\"='byu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which cornerback round has a pick number lower than 26 and an overall higher than 41?" }, { "role": "assistant", "content": "SELECT SUM(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\"<26 AND \"position\"='cornerback' AND \"overall\">41;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the overall number for the College of Wyoming?" }, { "role": "assistant", "content": "SELECT COUNT(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"college\"='wyoming';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the total round for a wide receiver with an overall of more than 145?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"position\"='wide receiver' AND \"overall\">145;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is College of Ohio State's pick number with an overall lower than 145?" }, { "role": "assistant", "content": "SELECT \"pick_num\" FROM \"atlanta_falcons_draft_history\" WHERE \"overall\"<145 AND \"college\"='ohio state';" } ]