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 \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What week #(s featured sara bareilles as the original artist?" }, { "role": "assistant", "content": "SELECT \"week_num\" FROM \"performances_results\" WHERE \"original_artist\"='Sara Bareilles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What week # featured first solo as the theme?" }, { "role": "assistant", "content": "SELECT \"week_num\" FROM \"performances_results\" WHERE \"theme\"='First Solo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: How many weeks featured duffy as the original artist?" }, { "role": "assistant", "content": "SELECT COUNT(\"theme\") FROM \"performances_results\" WHERE \"original_artist\"='Duffy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: Who was the originally artist when Jasmine Murray was selected?" }, { "role": "assistant", "content": "SELECT \"original_artist\" FROM \"performances_results\" WHERE \"result\"='Selected';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: With theme the Year They Were Born, what is the song of choice?" }, { "role": "assistant", "content": "SELECT \"song_choice\" FROM \"performances_results\" WHERE \"theme\"='Year They Were Born';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: With order number 7 and the theme is Motown, who were the original artists?" }, { "role": "assistant", "content": "SELECT \"original_artist\" FROM \"performances_results\" WHERE \"order_num\"='7' AND \"theme\"='Motown';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: With an original artist names Bette Midler, what is the order number?" }, { "role": "assistant", "content": "SELECT COUNT(\"order_num\") FROM \"performances_results\" WHERE \"original_artist\"='Bette Midler';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: With original artist of Tina Turner, what is the week number?" }, { "role": "assistant", "content": "SELECT \"week_num\" FROM \"performances_results\" WHERE \"original_artist\"='Tina Turner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: Who is the original artist with a theme of N/A?" }, { "role": "assistant", "content": "SELECT \"original_artist\" FROM \"performances_results\" WHERE \"theme\"='N/A';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2150776_1\" (\n \"year\" text,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text,\n \"report\" text\n);\n\nQuestion: Name the team for june 16 jeff gordon" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"table1_2150776_1\" WHERE \"date\"='June 16' AND \"driver\"='Jeff Gordon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2150776_1\" (\n \"year\" text,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text,\n \"report\" text\n);\n\nQuestion: Name the driver for 200 laps 1997" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"table1_2150776_1\" WHERE \"laps\"='200' AND \"year\"='1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2150776_1\" (\n \"year\" text,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text,\n \"report\" text\n);\n\nQuestion: Name the team for ricky rudd" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"table1_2150776_1\" WHERE \"driver\"='Ricky Rudd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_robin\" (\n \"team_name\" text,\n \"races\" real,\n \"won\" real,\n \"rr1_pts\" real,\n \"rr2_pts\" real,\n \"rr3_pts\" real,\n \"total_pts\" real,\n \"ranking\" real\n);\n\nQuestion: What is the rank when RR2 has 4 points?" }, { "role": "assistant", "content": "SELECT \"ranking\" FROM \"round_robin\" WHERE \"rr2_pts\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_robin\" (\n \"team_name\" text,\n \"races\" real,\n \"won\" real,\n \"rr1_pts\" real,\n \"rr2_pts\" real,\n \"rr3_pts\" real,\n \"total_pts\" real,\n \"ranking\" real\n);\n\nQuestion: How many points does Swedish America's Cup Challenge have for rr1?" }, { "role": "assistant", "content": "SELECT COUNT(\"rr1_pts\") FROM \"round_robin\" WHERE \"team_name\"='Swedish America''s Cup Challenge';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"political_party_strength\" (\n \"state\" text,\n \"governor\" text,\n \"senior_u_s_senator\" text,\n \"junior_u_s_senator\" text,\n \"u_s_house_delegation\" text,\n \"upper_house_majority\" text,\n \"lower_house_majority\" text\n);\n\nQuestion: Who was the senior US senator in the state whose governor was D. Patrick?" }, { "role": "assistant", "content": "SELECT \"senior_u_s_senator\" FROM \"political_party_strength\" WHERE \"governor\"='D. Patrick';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"political_party_strength\" (\n \"state\" text,\n \"governor\" text,\n \"senior_u_s_senator\" text,\n \"junior_u_s_senator\" text,\n \"u_s_house_delegation\" text,\n \"upper_house_majority\" text,\n \"lower_house_majority\" text\n);\n\nQuestion: What's the lower house majority in the state whose Senior senator is J. Shaheen?" }, { "role": "assistant", "content": "SELECT \"lower_house_majority\" FROM \"political_party_strength\" WHERE \"senior_u_s_senator\"='J. Shaheen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"day\" text,\n \"stage\" text,\n \"time_cet\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"time\" text,\n \"avg_spd\" text,\n \"rally_leader\" text\n);\n\nQuestion: Who is every name for time(cet) of 09:58?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"special_stages\" WHERE \"time_cet\"='09:58';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"day\" text,\n \"stage\" text,\n \"time_cet\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"time\" text,\n \"avg_spd\" text,\n \"rally_leader\" text\n);\n\nQuestion: What is every time(cet) for the name of Lillehammer 2?" }, { "role": "assistant", "content": "SELECT \"time_cet\" FROM \"special_stages\" WHERE \"name\"='Lillehammer 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"day\" text,\n \"stage\" text,\n \"time_cet\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"time\" text,\n \"avg_spd\" text,\n \"rally_leader\" text\n);\n\nQuestion: Who is every name for time(cet) of 09:03?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"special_stages\" WHERE \"time_cet\"='09:03';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"day\" text,\n \"stage\" text,\n \"time_cet\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"time\" text,\n \"avg_spd\" text,\n \"rally_leader\" text\n);\n\nQuestion: Which days have a stage of ss11?" }, { "role": "assistant", "content": "SELECT \"day\" FROM \"special_stages\" WHERE \"stage\"='SS11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"day\" text,\n \"stage\" text,\n \"time_cet\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"time\" text,\n \"avg_spd\" text,\n \"rally_leader\" text\n);\n\nQuestion: What is every time(cet) for a time of 5:04.8?" }, { "role": "assistant", "content": "SELECT \"time_cet\" FROM \"special_stages\" WHERE \"time\"='5:04.8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"euronorm_standard_for_security_glazing\" (\n \"class\" text,\n \"weapon\" text,\n \"caliber\" text,\n \"type\" text,\n \"weight_g\" text,\n \"range_m\" text,\n \"velocity_m_s\" text,\n \"impact_energy\" text,\n \"shots\" real\n);\n\nQuestion: How many calibers require the type LB/RN?" }, { "role": "assistant", "content": "SELECT COUNT(\"caliber\") FROM \"euronorm_standard_for_security_glazing\" WHERE \"type\"='LB/RN';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"euronorm_standard_for_security_glazing\" (\n \"class\" text,\n \"weapon\" text,\n \"caliber\" text,\n \"type\" text,\n \"weight_g\" text,\n \"range_m\" text,\n \"velocity_m_s\" text,\n \"impact_energy\" text,\n \"shots\" real\n);\n\nQuestion: Type FJ/RN/SC is associated with what class?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"euronorm_standard_for_security_glazing\" WHERE \"type\"='FJ/RN/SC';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"euronorm_standard_for_security_glazing\" (\n \"class\" text,\n \"weapon\" text,\n \"caliber\" text,\n \"type\" text,\n \"weight_g\" text,\n \"range_m\" text,\n \"velocity_m_s\" text,\n \"impact_energy\" text,\n \"shots\" real\n);\n\nQuestion: What type of glazing will stop a .44 magnum?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"euronorm_standard_for_security_glazing\" WHERE \"caliber\"='.44 Magnum';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"euronorm_standard_for_security_glazing\" (\n \"class\" text,\n \"weapon\" text,\n \"caliber\" text,\n \"type\" text,\n \"weight_g\" text,\n \"range_m\" text,\n \"velocity_m_s\" text,\n \"impact_energy\" text,\n \"shots\" real\n);\n\nQuestion: What is the fewest shots a glazing can handle?" }, { "role": "assistant", "content": "SELECT MIN(\"shots\") FROM \"euronorm_standard_for_security_glazing\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"euronorm_standard_for_security_glazing\" (\n \"class\" text,\n \"weapon\" text,\n \"caliber\" text,\n \"type\" text,\n \"weight_g\" text,\n \"range_m\" text,\n \"velocity_m_s\" text,\n \"impact_energy\" text,\n \"shots\" real\n);\n\nQuestion: What range does type FJ/PB/SCP work at?" }, { "role": "assistant", "content": "SELECT \"range_m\" FROM \"euronorm_standard_for_security_glazing\" WHERE \"type\"='FJ/PB/SCP';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21530474_1\" (\n \"chassis_code\" text,\n \"model_no\" text,\n \"production_years\" text,\n \"drivetrain\" text,\n \"transmission\" text,\n \"engine_type\" text,\n \"engine_code\" text,\n \"region_s\" text\n);\n\nQuestion: Name the drivetrain for 2ur-fse" }, { "role": "assistant", "content": "SELECT \"drivetrain\" FROM \"table1_21530474_1\" WHERE \"engine_code\"='2UR-FSE';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21530474_1\" (\n \"chassis_code\" text,\n \"model_no\" text,\n \"production_years\" text,\n \"drivetrain\" text,\n \"transmission\" text,\n \"engine_type\" text,\n \"engine_code\" text,\n \"region_s\" text\n);\n\nQuestion: Name the regions for usf45" }, { "role": "assistant", "content": "SELECT \"region_s\" FROM \"table1_21530474_1\" WHERE \"chassis_code\"='USF45';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21530474_1\" (\n \"chassis_code\" text,\n \"model_no\" text,\n \"production_years\" text,\n \"drivetrain\" text,\n \"transmission\" text,\n \"engine_type\" text,\n \"engine_code\" text,\n \"region_s\" text\n);\n\nQuestion: Name the model number for usf46" }, { "role": "assistant", "content": "SELECT \"model_no\" FROM \"table1_21530474_1\" WHERE \"chassis_code\"='USF46';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21530474_1\" (\n \"chassis_code\" text,\n \"model_no\" text,\n \"production_years\" text,\n \"drivetrain\" text,\n \"transmission\" text,\n \"engine_type\" text,\n \"engine_code\" text,\n \"region_s\" text\n);\n\nQuestion: Name the drivetrain for 1ur-fse for usf41" }, { "role": "assistant", "content": "SELECT \"drivetrain\" FROM \"table1_21530474_1\" WHERE \"engine_code\"='1UR-FSE' AND \"chassis_code\"='USF41';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"unemployment_rates_in_new_england\" (\n \"employment_area\" text,\n \"october_2010\" text,\n \"october_2011\" text,\n \"october_2012\" text,\n \"net_change\" text\n);\n\nQuestion: For the area which was 9.1 in October 2010, what is the figure for October 2012?" }, { "role": "assistant", "content": "SELECT \"october_2012\" FROM \"unemployment_rates_in_new_england\" WHERE \"october_2010\"='9.1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"unemployment_rates_in_new_england\" (\n \"employment_area\" text,\n \"october_2010\" text,\n \"october_2011\" text,\n \"october_2012\" text,\n \"net_change\" text\n);\n\nQuestion: Where is the rate 5.7 in October 2010?" }, { "role": "assistant", "content": "SELECT \"employment_area\" FROM \"unemployment_rates_in_new_england\" WHERE \"october_2010\"='5.7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21550870_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Name the original air date for 9.16 viewers" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_21550870_1\" WHERE \"u_s_viewers_million\"='9.16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21550870_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Name the total number of production code for episode by steve cohen & andrew dettman" }, { "role": "assistant", "content": "SELECT COUNT(\"production_code\") FROM \"table1_21550870_1\" WHERE \"written_by\"='Steve Cohen & Andrew Dettman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"country\" text,\n \"area_km\" text,\n \"population_millions_2011\" text,\n \"gdp_ppp_usd_per_capita\" real,\n \"gdp_nominal_billions_usd\" text,\n \"hdi_2011\" text\n);\n\nQuestion: What is the population in millions for 2011 where the HDI for 2011 is 0.453 (low)?" }, { "role": "assistant", "content": "SELECT \"population_millions_2011\" FROM \"members\" WHERE \"hdi_2011\"='0.453 (low)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"country\" text,\n \"area_km\" text,\n \"population_millions_2011\" text,\n \"gdp_ppp_usd_per_capita\" real,\n \"gdp_nominal_billions_usd\" text,\n \"hdi_2011\" text\n);\n\nQuestion: What is the population in millions for 2011 where the GDP (nominal) (billions USD) is 4? " }, { "role": "assistant", "content": "SELECT \"population_millions_2011\" FROM \"members\" WHERE \"gdp_nominal_billions_usd\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"country\" text,\n \"area_km\" text,\n \"population_millions_2011\" text,\n \"gdp_ppp_usd_per_capita\" real,\n \"gdp_nominal_billions_usd\" text,\n \"hdi_2011\" text\n);\n\nQuestion: What is the HDI for 2011 in Tunisia? " }, { "role": "assistant", "content": "SELECT \"hdi_2011\" FROM \"members\" WHERE \"country\"='Tunisia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"country\" text,\n \"area_km\" text,\n \"population_millions_2011\" text,\n \"gdp_ppp_usd_per_capita\" real,\n \"gdp_nominal_billions_usd\" text,\n \"hdi_2011\" text\n);\n\nQuestion: What is the area (km2) where the population in millions for 2011 is 37.1? " }, { "role": "assistant", "content": "SELECT \"area_km\" FROM \"members\" WHERE \"population_millions_2011\"='37.1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"country\" text,\n \"area_km\" text,\n \"population_millions_2011\" text,\n \"gdp_ppp_usd_per_capita\" real,\n \"gdp_nominal_billions_usd\" text,\n \"hdi_2011\" text\n);\n\nQuestion: What is the GDP (PPP) (USD, per capita) for Algeria? " }, { "role": "assistant", "content": "SELECT MIN(\"gdp_ppp_usd_per_capita\") FROM \"members\" WHERE \"country\"='Algeria';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"country\" text,\n \"area_km\" text,\n \"population_millions_2011\" text,\n \"gdp_ppp_usd_per_capita\" real,\n \"gdp_nominal_billions_usd\" text,\n \"hdi_2011\" text\n);\n\nQuestion: What is the GDP (nominal) (billions USD) where the population in millions for 2011 is 3.4? " }, { "role": "assistant", "content": "SELECT \"gdp_nominal_billions_usd\" FROM \"members\" WHERE \"population_millions_2011\"='3.4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2155350_2\" (\n \"category\" text,\n \"sub_category\" text,\n \"cab_size\" text,\n \"drive_wheels\" text,\n \"capacity_litres\" text\n);\n\nQuestion: Name the number of cab size for 4 medium tanker" }, { "role": "assistant", "content": "SELECT COUNT(\"cab_size\") FROM \"table1_2155350_2\" WHERE \"category\"='4 Medium tanker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2155350_2\" (\n \"category\" text,\n \"sub_category\" text,\n \"cab_size\" text,\n \"drive_wheels\" text,\n \"capacity_litres\" text\n);\n\nQuestion: Name the category for cab size crew and super tanker" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"table1_2155350_2\" WHERE \"cab_size\"='Crew' AND \"sub_category\"='Super tanker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2155350_2\" (\n \"category\" text,\n \"sub_category\" text,\n \"cab_size\" text,\n \"drive_wheels\" text,\n \"capacity_litres\" text\n);\n\nQuestion: Name the capacity for single cab size 2 medium tanker" }, { "role": "assistant", "content": "SELECT \"capacity_litres\" FROM \"table1_2155350_2\" WHERE \"cab_size\"='Single' AND \"category\"='2 Medium tanker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"school\" text,\n \"location\" text,\n \"catchment\" text,\n \"roll\" real,\n \"gender\" text,\n \"external_link\" text\n);\n\nQuestion: What school is in Brechin?" }, { "role": "assistant", "content": "SELECT \"external_link\" FROM \"external_links\" WHERE \"location\"='Brechin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"school\" text,\n \"location\" text,\n \"catchment\" text,\n \"roll\" real,\n \"gender\" text,\n \"external_link\" text\n);\n\nQuestion: How many kids go to Brechin High School?" }, { "role": "assistant", "content": "SELECT MAX(\"roll\") FROM \"external_links\" WHERE \"school\"='Brechin High School';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_teams\" (\n \"team\" text,\n \"sport\" text,\n \"league\" text,\n \"established\" real,\n \"began_in_st_louis\" real,\n \"venue\" text,\n \"championships_in_st_louis\" text,\n \"left_st_louis\" real\n);\n\nQuestion: What year did Negro American League join?" }, { "role": "assistant", "content": "SELECT MIN(\"began_in_st_louis\") FROM \"former_teams\" WHERE \"league\"='Negro American League';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_teams\" (\n \"team\" text,\n \"sport\" text,\n \"league\" text,\n \"established\" real,\n \"began_in_st_louis\" real,\n \"venue\" text,\n \"championships_in_st_louis\" text,\n \"left_st_louis\" real\n);\n\nQuestion: What year did the team who played at the Scottrade Center leave the city?" }, { "role": "assistant", "content": "SELECT MIN(\"left_st_louis\") FROM \"former_teams\" WHERE \"venue\"='Scottrade Center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_teams\" (\n \"team\" text,\n \"sport\" text,\n \"league\" text,\n \"established\" real,\n \"began_in_st_louis\" real,\n \"venue\" text,\n \"championships_in_st_louis\" text,\n \"left_st_louis\" real\n);\n\nQuestion: How may championships were won by the team that started in 1950?" }, { "role": "assistant", "content": "SELECT \"championships_in_st_louis\" FROM \"former_teams\" WHERE \"began_in_st_louis\"=1950;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_teams\" (\n \"team\" text,\n \"sport\" text,\n \"league\" text,\n \"established\" real,\n \"began_in_st_louis\" real,\n \"venue\" text,\n \"championships_in_st_louis\" text,\n \"left_st_louis\" real\n);\n\nQuestion: How many championships were won for arena football?" }, { "role": "assistant", "content": "SELECT \"championships_in_st_louis\" FROM \"former_teams\" WHERE \"sport\"='Arena Football';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"asian_rider_classification\" text,\n \"team_classification\" text,\n \"asian_team_classification\" text\n);\n\nQuestion: When samai amari is the asian rider classification how many asian team classifications are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"asian_team_classification\") FROM \"classification_leadership\" WHERE \"asian_rider_classification\"='Samai Amari';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"asian_rider_classification\" text,\n \"team_classification\" text,\n \"asian_team_classification\" text\n);\n\nQuestion: When 4 is the stage who is the general classification?" }, { "role": "assistant", "content": "SELECT \"general_classification\" FROM \"classification_leadership\" WHERE \"stage\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2156758_4\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What is the number in season for the episode written by Chris Mitchell and Erik Wiese?" }, { "role": "assistant", "content": "SELECT \"no_in_season\" FROM \"table1_2156758_4\" WHERE \"written_by\"='Chris Mitchell and Erik Wiese';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2156758_4\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What is the title for episode number in series of 28?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_2156758_4\" WHERE \"no_in_series\"='28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2156758_4\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: Who directed the episode titled \"Jack and the Zombies\"?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_2156758_4\" WHERE \"title\"='\\\"Jack and the Zombies\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2156758_4\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: How many titles were written by Don Shank and Genndy Tartakovsky?" }, { "role": "assistant", "content": "SELECT COUNT(\"title\") FROM \"table1_2156758_4\" WHERE \"written_by\"='Don Shank and Genndy Tartakovsky';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_finishes\" (\n \"season\" text,\n \"mens_1st_xi\" text,\n \"mens_2nd_xi\" text,\n \"mens_3rd_xi\" text,\n \"ladies_1st_xi\" text\n);\n\nQuestion: When 3rd, sedgemoor division 1 is the ladies 1st xi what is the mens 3rd xi?" }, { "role": "assistant", "content": "SELECT \"mens_3rd_xi\" FROM \"league_finishes\" WHERE \"ladies_1st_xi\"='3rd, Sedgemoor Division 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_finishes\" (\n \"season\" text,\n \"mens_1st_xi\" text,\n \"mens_2nd_xi\" text,\n \"mens_3rd_xi\" text,\n \"ladies_1st_xi\" text\n);\n\nQuestion: When 10th, south west district 1 is the mens 2nd xi what is the ladies 1st xi?" }, { "role": "assistant", "content": "SELECT \"ladies_1st_xi\" FROM \"league_finishes\" WHERE \"mens_2nd_xi\"='10th, South West District 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_finishes\" (\n \"season\" text,\n \"mens_1st_xi\" text,\n \"mens_2nd_xi\" text,\n \"mens_3rd_xi\" text,\n \"ladies_1st_xi\" text\n);\n\nQuestion: When 5th, south western district 2 is the mens 2nd xi what is the season?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"league_finishes\" WHERE \"mens_2nd_xi\"='5th, South Western District 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_finishes\" (\n \"season\" text,\n \"mens_1st_xi\" text,\n \"mens_2nd_xi\" text,\n \"mens_3rd_xi\" text,\n \"ladies_1st_xi\" text\n);\n\nQuestion: When 6th, south division 2 is the mens 1st xi what is the mens 2nd xi?" }, { "role": "assistant", "content": "SELECT \"mens_2nd_xi\" FROM \"league_finishes\" WHERE \"mens_1st_xi\"='6th, South Division 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"day\" text,\n \"stage\" text,\n \"time_eet\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"time\" text,\n \"avg_spd\" text,\n \"rally_leader\" text\n);\n\nQuestion: Which stage has kourdali as the name?" }, { "role": "assistant", "content": "SELECT \"stage\" FROM \"special_stages\" WHERE \"name\"='Kourdali';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"day\" text,\n \"stage\" text,\n \"time_eet\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"time\" text,\n \"avg_spd\" text,\n \"rally_leader\" text\n);\n\nQuestion: Which stage has 15:17 as time?" }, { "role": "assistant", "content": "SELECT \"stage\" FROM \"special_stages\" WHERE \"time_eet\"='15:17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"day\" text,\n \"stage\" text,\n \"time_eet\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"time\" text,\n \"avg_spd\" text,\n \"rally_leader\" text\n);\n\nQuestion: What is the time when time is 10:46?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"special_stages\" WHERE \"time_eet\"='10:46';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"day\" text,\n \"stage\" text,\n \"time_eet\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"time\" text,\n \"avg_spd\" text,\n \"rally_leader\" text\n);\n\nQuestion: What is the time when ss12 is stage?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"special_stages\" WHERE \"stage\"='SS12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2159506_3\" (\n \"state_class\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_of_successors_formal_installation\" text\n);\n\nQuestion: Name the state class for resigned november 3, 1964" }, { "role": "assistant", "content": "SELECT \"state_class\" FROM \"table1_2159506_3\" WHERE \"reason_for_change\"='Resigned November 3, 1964';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21584646_10\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: How many champions are shown for the runner-up of stefan edberg?" }, { "role": "assistant", "content": "SELECT COUNT(\"champion\") FROM \"table1_21584646_10\" WHERE \"runner_up\"='Stefan Edberg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21584646_10\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: What week was stefan edberg anders j\u00e4rryd was semifinalist and champion is john mcenroe 7\u20136, 6\u20133?" }, { "role": "assistant", "content": "SELECT \"week_of\" FROM \"table1_21584646_10\" WHERE \"semifinalists\"='Stefan Edberg Anders J\u00e4rryd' AND \"champion\"='John McEnroe 7\u20136, 6\u20133';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21584646_10\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: Who is the runner up for the champion of john mcenroe 6\u20132, 6\u20133?" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"table1_21584646_10\" WHERE \"champion\"='John McEnroe 6\u20132, 6\u20133';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21584646_10\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: Who were the quarterfinalists for the runner-ups of mike de palmer gary donnelly?" }, { "role": "assistant", "content": "SELECT \"quarterfinalists\" FROM \"table1_21584646_10\" WHERE \"runner_up\"='Mike De Palmer Gary Donnelly';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21584646_10\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: Who are the quarterfinalists for runner-up jimmy connors?" }, { "role": "assistant", "content": "SELECT \"quarterfinalists\" FROM \"table1_21584646_10\" WHERE \"runner_up\"='Jimmy Connors';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21584646_10\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: How many weeks are shown for the champion of john mcenroe 6\u20132, 6\u20133?" }, { "role": "assistant", "content": "SELECT COUNT(\"week_of\") FROM \"table1_21584646_10\" WHERE \"champion\"='John McEnroe 6\u20132, 6\u20133';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2159571_1\" (\n \"state_class\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_of_successors_formal_installation\" text\n);\n\nQuestion: What is every reason for change for the date of successors installation is March 16, 1960?" }, { "role": "assistant", "content": "SELECT \"reason_for_change\" FROM \"table1_2159571_1\" WHERE \"date_of_successors_formal_installation\"='March 16, 1960';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2159571_1\" (\n \"state_class\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_of_successors_formal_installation\" text\n);\n\nQuestion: Who is every vacator if date of successors formal installation is August 8, 1960?" }, { "role": "assistant", "content": "SELECT \"vacator\" FROM \"table1_2159571_1\" WHERE \"date_of_successors_formal_installation\"='August 8, 1960';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2159571_2\" (\n \"district\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_successor_seated\" text\n);\n\nQuestion: Who is every successor for the Washington 3rd District?" }, { "role": "assistant", "content": "SELECT \"successor\" FROM \"table1_2159571_2\" WHERE \"district\"='Washington 3rd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2159571_2\" (\n \"district\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_successor_seated\" text\n);\n\nQuestion: What is every reason for change for the Washington 3rd District?" }, { "role": "assistant", "content": "SELECT \"reason_for_change\" FROM \"table1_2159571_2\" WHERE \"district\"='Washington 3rd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2159571_2\" (\n \"district\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_successor_seated\" text\n);\n\nQuestion: Who is every vacator with reason for change as resigned December 31, 1959?" }, { "role": "assistant", "content": "SELECT \"vacator\" FROM \"table1_2159571_2\" WHERE \"reason_for_change\"='Resigned December 31, 1959';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2159537_3\" (\n \"district\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_successor_seated\" text\n);\n\nQuestion: In what district was the successor seated August 31, 1943?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"table1_2159537_3\" WHERE \"date_successor_seated\"='August 31, 1943';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2159537_3\" (\n \"district\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_successor_seated\" text\n);\n\nQuestion: Who was the successor for the reason for change being \"died January 16, 1944?" }, { "role": "assistant", "content": "SELECT \"successor\" FROM \"table1_2159537_3\" WHERE \"reason_for_change\"='Died January 16, 1944';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2159537_3\" (\n \"district\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_successor_seated\" text\n);\n\nQuestion: Who was the successor in New York 11th district?" }, { "role": "assistant", "content": "SELECT \"successor\" FROM \"table1_2159537_3\" WHERE \"district\"='New York 11th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2159547_3\" (\n \"district\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_successor_seated\" text\n);\n\nQuestion: On what date was James P. Buchanan (d)'s successor seated?" }, { "role": "assistant", "content": "SELECT \"date_successor_seated\" FROM \"table1_2159547_3\" WHERE \"vacator\"='James P. Buchanan (D)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2159547_3\" (\n \"district\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_successor_seated\" text\n);\n\nQuestion: How many people vacated to successor Dave E. Satterfield, Jr. (d)?" }, { "role": "assistant", "content": "SELECT COUNT(\"vacator\") FROM \"table1_2159547_3\" WHERE \"successor\"='Dave E. Satterfield, Jr. (D)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2159547_3\" (\n \"district\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_successor_seated\" text\n);\n\nQuestion: Why did Robert L. Bacon (r) vacate?" }, { "role": "assistant", "content": "SELECT \"reason_for_change\" FROM \"table1_2159547_3\" WHERE \"vacator\"='Robert L. Bacon (R)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_cast\" (\n \"character\" text,\n \"original_japanese\" text,\n \"english_streamline\" text,\n \"english_manga_uk\" text,\n \"english_pioneer_geneon\" text\n);\n\nQuestion: Makio Inoue dubbed on which character?" }, { "role": "assistant", "content": "SELECT \"character\" FROM \"full_cast\" WHERE \"original_japanese\"='Makio Inoue';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_cast\" (\n \"character\" text,\n \"original_japanese\" text,\n \"english_streamline\" text,\n \"english_manga_uk\" text,\n \"english_pioneer_geneon\" text\n);\n\nQuestion: Who was the cast on the English (Manga UK) version if K\u014d Nishimura acted on the original Japanese?" }, { "role": "assistant", "content": "SELECT \"english_manga_uk\" FROM \"full_cast\" WHERE \"original_japanese\"='K\u014d Nishimura';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_cast\" (\n \"character\" text,\n \"original_japanese\" text,\n \"english_streamline\" text,\n \"english_manga_uk\" text,\n \"english_pioneer_geneon\" text\n);\n\nQuestion: Who was the original Japanese cast if Sean Barrett acted on the English (Manga UK) version?" }, { "role": "assistant", "content": "SELECT \"original_japanese\" FROM \"full_cast\" WHERE \"english_manga_uk\"='Sean Barrett';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2160008_4\" (\n \"district\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_successor_seated\" text\n);\n\nQuestion: Name the district for reason for change being died july 4, 1939" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"table1_2160008_4\" WHERE \"reason_for_change\"='Died July 4, 1939';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2160008_4\" (\n \"district\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_successor_seated\" text\n);\n\nQuestion: Name the number of reason for change on may 11, 1939" }, { "role": "assistant", "content": "SELECT COUNT(\"reason_for_change\") FROM \"table1_2160008_4\" WHERE \"date_successor_seated\"='May 11, 1939';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"practice_times_leaderboard_superbike_sen\" (\n \"rank\" real,\n \"rider\" text,\n \"mon_1_june\" text,\n \"tue_2_june\" text,\n \"wed_3_june\" text,\n \"thurs_4_june\" text,\n \"fri_5_june\" text\n);\n\nQuestion: What were the time and speed for the rider ranked in 12 on Wed, June 3?" }, { "role": "assistant", "content": "SELECT \"wed_3_june\" FROM \"practice_times_leaderboard_superbike_sen\" WHERE \"rank\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2161859_1\" (\n \"series_num\" real,\n \"title\" text,\n \"story_num\" real,\n \"artist\" text,\n \"strip_numbers\" text,\n \"number_of_strips\" text,\n \"dates_of_original_publication_of_strip\" text\n);\n\nQuestion: What is the series number for the Golden Frog?" }, { "role": "assistant", "content": "SELECT \"series_num\" FROM \"table1_2161859_1\" WHERE \"title\"='The Golden Frog';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2161859_1\" (\n \"series_num\" real,\n \"title\" text,\n \"story_num\" real,\n \"artist\" text,\n \"strip_numbers\" text,\n \"number_of_strips\" text,\n \"dates_of_original_publication_of_strip\" text\n);\n\nQuestion: Who is the artist for strip numbers 3932-4031a?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"table1_2161859_1\" WHERE \"strip_numbers\"='3932-4031A';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_list\" (\n \"regional\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_place\" text\n);\n\nQuestion: who got the first position when Ehime Shimanami got the third position?" }, { "role": "assistant", "content": "SELECT \"champions\" FROM \"champions_list\" WHERE \"third_place\"='Ehime Shimanami';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_list\" (\n \"regional\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_place\" text\n);\n\nQuestion: who got the third position when laranja kyoto got the second position?" }, { "role": "assistant", "content": "SELECT \"third_place\" FROM \"champions_list\" WHERE \"runners_up\"='Laranja Kyoto';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_list\" (\n \"regional\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_place\" text\n);\n\nQuestion: how many persons got the third position whan sanyo electric tokushima got the fourth position?" }, { "role": "assistant", "content": "SELECT COUNT(\"third_place\") FROM \"champions_list\" WHERE \"fourth_place\"='Sanyo Electric Tokushima';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_list\" (\n \"regional\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_place\" text\n);\n\nQuestion: how many persons got the fourth position when the regional was shikoku?" }, { "role": "assistant", "content": "SELECT COUNT(\"fourth_place\") FROM \"champions_list\" WHERE \"regional\"='Shikoku';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_list\" (\n \"regional\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_place\" text\n);\n\nQuestion: who got the first place when the Japanese Regional Leagues was in hokushinetsu?" }, { "role": "assistant", "content": "SELECT \"champions\" FROM \"champions_list\" WHERE \"regional\"='Hokushinetsu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_list\" (\n \"regional\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_place\" text\n);\n\nQuestion: who got the first position when fujieda city government got the fourth position?" }, { "role": "assistant", "content": "SELECT \"champions\" FROM \"champions_list\" WHERE \"fourth_place\"='Fujieda City Government';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21636599_2\" (\n \"period\" real,\n \"civilians\" text,\n \"security_forces\" text,\n \"insurgents\" text,\n \"total_per_period\" real\n);\n\nQuestion: What are the civilian total when the security force total is 36?" }, { "role": "assistant", "content": "SELECT \"civilians\" FROM \"table1_21636599_2\" WHERE \"security_forces\"='36';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21636599_2\" (\n \"period\" real,\n \"civilians\" text,\n \"security_forces\" text,\n \"insurgents\" text,\n \"total_per_period\" real\n);\n\nQuestion: What are the security forces when the civilians are 202?" }, { "role": "assistant", "content": "SELECT \"security_forces\" FROM \"table1_21636599_2\" WHERE \"civilians\"='202';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21636599_2\" (\n \"period\" real,\n \"civilians\" text,\n \"security_forces\" text,\n \"insurgents\" text,\n \"total_per_period\" real\n);\n\nQuestion: How many figures are named for security forces in 1998?" }, { "role": "assistant", "content": "SELECT COUNT(\"security_forces\") FROM \"table1_21636599_2\" WHERE \"period\"=1998;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21636599_2\" (\n \"period\" real,\n \"civilians\" text,\n \"security_forces\" text,\n \"insurgents\" text,\n \"total_per_period\" real\n);\n\nQuestion: How many insurgents are there when the total per period is 156?" }, { "role": "assistant", "content": "SELECT \"insurgents\" FROM \"table1_21636599_2\" WHERE \"total_per_period\"=156;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_21634403_2\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many U.S. viewers watched the episode directed by Frank Waldeck?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_millions\" FROM \"table1_21634403_2\" WHERE \"directed_by\"='Frank Waldeck';" } ]