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 \"volleyball_at_the_2008_summer_olympics_m\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What was the weight for the player in Zhejiang in 2008?" }, { "role": "assistant", "content": "SELECT \"weight\" FROM \"volleyball_at_the_2008_summer_olympics_m\" WHERE \"2008_club\"='zhejiang';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"prevalence_by_state\" (\n \"state_and_district_of_columbia\" text,\n \"obese_adults\" text,\n \"overweight_incl_obese_adults\" text,\n \"obese_children_and_adolescents\" text,\n \"obesity_rank\" real\n);\n\nQuestion: What's the count for obese children and adolescents ranked 48?" }, { "role": "assistant", "content": "SELECT \"obese_children_and_adolescents\" FROM \"prevalence_by_state\" WHERE \"obesity_rank\"=48;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"prevalence_by_state\" (\n \"state_and_district_of_columbia\" text,\n \"obese_adults\" text,\n \"overweight_incl_obese_adults\" text,\n \"obese_children_and_adolescents\" text,\n \"obesity_rank\" real\n);\n\nQuestion: What's the rank when the obese children and adolescent count is 14.2%?" }, { "role": "assistant", "content": "SELECT SUM(\"obesity_rank\") FROM \"prevalence_by_state\" WHERE \"obese_children_and_adolescents\"='14.2%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"prevalence_by_state\" (\n \"state_and_district_of_columbia\" text,\n \"obese_adults\" text,\n \"overweight_incl_obese_adults\" text,\n \"obese_children_and_adolescents\" text,\n \"obesity_rank\" real\n);\n\nQuestion: What's the rank in West Virginia when the overweight adult was 66.8%?" }, { "role": "assistant", "content": "SELECT \"obesity_rank\" FROM \"prevalence_by_state\" WHERE \"overweight_incl_obese_adults\"='66.8%' AND \"state_and_district_of_columbia\"='west virginia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is reserved for Jawad?" }, { "role": "assistant", "content": "SELECT \"reserved_for_sc_st_none\" FROM \"assembly_segments\" WHERE \"name\"='jawad';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is reserved for the constituency of 228?" }, { "role": "assistant", "content": "SELECT \"reserved_for_sc_st_none\" FROM \"assembly_segments\" WHERE \"constituency_number\"='228';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"mascot\" text,\n \"location\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: Which Mascot has a Location of evansville, and an Enrollment larger than 1,392, and a School of evansville harrison?" }, { "role": "assistant", "content": "SELECT \"mascot\" FROM \"indiana_high_school_athletics_conference\" WHERE \"location\"='evansville' AND \"enrollment\">'1,392' AND \"school\"='evansville harrison';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"mascot\" text,\n \"location\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: Which County has an IHSAA Class of aaa, and an Enrollment smaller than 799?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_class\"='aaa' AND \"enrollment\"<799;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"mascot\" text,\n \"location\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: Which Location has a Mascot of tigers?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"indiana_high_school_athletics_conference\" WHERE \"mascot\"='tigers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"siena_college_research_institute_survey\" (\n \"seq\" text,\n \"name\" text,\n \"background\" real,\n \"party_leadership\" real,\n \"communication_ability\" real,\n \"relations_with_congress\" real,\n \"court_appointments\" real,\n \"handling_of_economy\" real,\n \"luck\" real,\n \"ability_to_compromise\" real,\n \"willing_to_take_risks\" real,\n \"executive_appointments\" real,\n \"overall_ability\" real,\n \"imagination\" real,\n \"domestic_accomplishments\" real,\n \"integrity\" real,\n \"executive_ability\" real,\n \"foreign_policy_accomplishments\" real,\n \"leadership_ability\" real,\n \"intelligence\" real,\n \"avoid_crucial_mistakes\" real,\n \"expert_s_view\" real,\n \"overall\" real\n);\n\nQuestion: What's the least Expert's View when willing to take risks is more than 27, communication ability is 30, ability to compromise is less than 26, and imagination is more than 14?" }, { "role": "assistant", "content": "SELECT MIN(\"expert_s_view\") FROM \"siena_college_research_institute_survey\" WHERE \"ability_to_compromise\"<26 AND \"imagination\">14 AND \"willing_to_take_risks\">27 AND \"communication_ability\"<30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"siena_college_research_institute_survey\" (\n \"seq\" text,\n \"name\" text,\n \"background\" real,\n \"party_leadership\" real,\n \"communication_ability\" real,\n \"relations_with_congress\" real,\n \"court_appointments\" real,\n \"handling_of_economy\" real,\n \"luck\" real,\n \"ability_to_compromise\" real,\n \"willing_to_take_risks\" real,\n \"executive_appointments\" real,\n \"overall_ability\" real,\n \"imagination\" real,\n \"domestic_accomplishments\" real,\n \"integrity\" real,\n \"executive_ability\" real,\n \"foreign_policy_accomplishments\" real,\n \"leadership_ability\" real,\n \"intelligence\" real,\n \"avoid_crucial_mistakes\" real,\n \"expert_s_view\" real,\n \"overall\" real\n);\n\nQuestion: What's the most overall when the executive appointments were 28 and the background was smaller than 37?" }, { "role": "assistant", "content": "SELECT MAX(\"overall\") FROM \"siena_college_research_institute_survey\" WHERE \"executive_appointments\"=28 AND \"background\"<37;" } ]
[ { "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 \"score\" text,\n \"record\" text\n);\n\nQuestion: What was the record at the game with a score of 21-16?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule\" WHERE \"score\"='21-16';" } ]
[ { "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 \"score\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent at the game with a score of 42-28 after week 4?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\">4 AND \"score\"='42-28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_of_cad_cam_cae_file_viewers\" (\n \"latest_stable_release\" text,\n \"developer\" text,\n \"3_d_support\" text,\n \"runs_on_posix_style_systems\" text,\n \"runs_on_windows\" text,\n \"user_interface_language_s\" text\n);\n\nQuestion: Which Runs on POSIX style systems has a Developer of and\u00e9or?" }, { "role": "assistant", "content": "SELECT \"runs_on_posix_style_systems\" FROM \"comparison_of_cad_cam_cae_file_viewers\" WHERE \"developer\"='and\u00e9or';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_of_cad_cam_cae_file_viewers\" (\n \"latest_stable_release\" text,\n \"developer\" text,\n \"3_d_support\" text,\n \"runs_on_posix_style_systems\" text,\n \"runs_on_windows\" text,\n \"user_interface_language_s\" text\n);\n\nQuestion: Which User Interface Language(s) has Runs on POSIX style systems of no and sescoi?" }, { "role": "assistant", "content": "SELECT \"user_interface_language_s\" FROM \"comparison_of_cad_cam_cae_file_viewers\" WHERE \"runs_on_posix_style_systems\"='no' AND \"developer\"='sescoi';" } ]
[ { "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 \"attendance\" real\n);\n\nQuestion: what is the result when the opponent is at dallas cowboys?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"opponent\"='at dallas cowboys';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"num_county\" text,\n \"year_joined\" real\n);\n\nQuestion: what is the enrollement for the year joined 1958 in clarksville?" }, { "role": "assistant", "content": "SELECT SUM(\"enrollment\") FROM \"membership\" WHERE \"year_joined\"=1958 AND \"location\"='clarksville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"num_county\" text,\n \"year_joined\" real\n);\n\nQuestion: what is the #/county that is ihsaa class aaa, has enrollment higher than 611 and the dragons is the mascot?" }, { "role": "assistant", "content": "SELECT \"num_county\" FROM \"membership\" WHERE \"ihsaa_class\"='aaa' AND \"enrollment\">611 AND \"mascot\"='dragons';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"l_ps_c_ds\" (\n \"title\" text,\n \"label\" text,\n \"year_of_release\" real,\n \"country_of_release\" text,\n \"peaches\" text\n);\n\nQuestion: What's the Peaches: that was released in USA with 2 hot as a Title?" }, { "role": "assistant", "content": "SELECT \"peaches\" FROM \"l_ps_c_ds\" WHERE \"country_of_release\"='usa' AND \"title\"='2 hot';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"l_ps_c_ds\" (\n \"title\" text,\n \"label\" text,\n \"year_of_release\" real,\n \"country_of_release\" text,\n \"peaches\" text\n);\n\nQuestion: What's the Peaches: for Sayin' Something?" }, { "role": "assistant", "content": "SELECT \"peaches\" FROM \"l_ps_c_ds\" WHERE \"title\"='sayin'' something';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"l_ps_c_ds\" (\n \"title\" text,\n \"label\" text,\n \"year_of_release\" real,\n \"country_of_release\" text,\n \"peaches\" text\n);\n\nQuestion: Where was the title released in 1977?" }, { "role": "assistant", "content": "SELECT \"country_of_release\" FROM \"l_ps_c_ds\" WHERE \"year_of_release\"=1977;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"l_ps_c_ds\" (\n \"title\" text,\n \"label\" text,\n \"year_of_release\" real,\n \"country_of_release\" text,\n \"peaches\" text\n);\n\nQuestion: What was the last year MCA had a Release?" }, { "role": "assistant", "content": "SELECT MAX(\"year_of_release\") FROM \"l_ps_c_ds\" WHERE \"label\"='mca';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nineteenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the lowest pick for the Buffalo Bills?" }, { "role": "assistant", "content": "SELECT MIN(\"pick\") FROM \"nineteenth_round\" WHERE \"team\"='buffalo bills';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nineteenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which player played for the Boston Patriots?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"nineteenth_round\" WHERE \"team\"='boston patriots';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"round\" real,\n \"date\" text,\n \"home\" text,\n \"result\" text,\n \"visitor\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: How much Attendance has a Result of 2\u20134, and a Visitor of bryn\u00e4s if?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"result\"='2\u20134' AND \"visitor\"='bryn\u00e4s if';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"round\" real,\n \"date\" text,\n \"home\" text,\n \"result\" text,\n \"visitor\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: Which Result has a Round larger than 17?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"game_log\" WHERE \"round\">17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wards\" (\n \"name\" text,\n \"labour\" real,\n \"conservative\" real,\n \"political_party\" text,\n \"electorate\" real,\n \"constituency\" text\n);\n\nQuestion: What is the smallest electorate for the Conservative party in South West Devon constituency, with over 2 conservatives and a name of Plymstock Radford?" }, { "role": "assistant", "content": "SELECT MIN(\"electorate\") FROM \"wards\" WHERE \"political_party\"='conservative' AND \"constituency\"='south west devon' AND \"conservative\">2 AND \"name\"='plymstock radford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_populous_cities\" (\n \"rank\" real,\n \"city\" text,\n \"population\" real,\n \"year_of_census_or_estimate\" real,\n \"country\" text\n);\n\nQuestion: In what Year of Census or Estimate is the Toronto Population larger than 1,556,396?" }, { "role": "assistant", "content": "SELECT SUM(\"year_of_census_or_estimate\") FROM \"most_populous_cities\" WHERE \"population\">'1,556,396' AND \"city\"='toronto';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"athletics\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: What event was in a year later than 2007 and in the 88th position?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"athletics\" WHERE \"year\">2007 AND \"position\"='88th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"athletics\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: What are the notes for 2005?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"athletics\" WHERE \"year\"=2005;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio_stations\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: Who is the owner of CKLF-FM?" }, { "role": "assistant", "content": "SELECT \"owner\" FROM \"radio_stations\" WHERE \"call_sign\"='cklf-fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio_stations\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What frequency is First Nations Community?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"radio_stations\" WHERE \"format\"='first nations community';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio_stations\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What format is CBC Radio 2?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"radio_stations\" WHERE \"branding\"='cbc radio 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio_stations\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: Who owns CKSB-8-FM?" }, { "role": "assistant", "content": "SELECT \"owner\" FROM \"radio_stations\" WHERE \"call_sign\"='cksb-8-fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio_stations\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What format is Premi\u00e8re Cha\u00eene?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"radio_stations\" WHERE \"branding\"='premi\u00e8re cha\u00eene';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaching_titles\" (\n \"year\" real,\n \"championship\" text,\n \"event\" text,\n \"nation\" text,\n \"result\" text\n);\n\nQuestion: What year was olympics, Canada and the Men's Eight Event ended with a silver medal?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"coaching_titles\" WHERE \"championship\"='olympics' AND \"event\"='men''s eight' AND \"nation\"='canada' AND \"result\"='silver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaching_titles\" (\n \"year\" real,\n \"championship\" text,\n \"event\" text,\n \"nation\" text,\n \"result\" text\n);\n\nQuestion: What event was in 2006?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"coaching_titles\" WHERE \"year\"=2006;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaching_titles\" (\n \"year\" real,\n \"championship\" text,\n \"event\" text,\n \"nation\" text,\n \"result\" text\n);\n\nQuestion: What championship was in the USA after 1994, and resulted in 5th place?" }, { "role": "assistant", "content": "SELECT \"championship\" FROM \"coaching_titles\" WHERE \"nation\"='usa' AND \"year\">1994 AND \"result\"='5th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaching_titles\" (\n \"year\" real,\n \"championship\" text,\n \"event\" text,\n \"nation\" text,\n \"result\" text\n);\n\nQuestion: What year did Canada get a silver in the olympics in the Men's Coxless Pair event?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"coaching_titles\" WHERE \"nation\"='canada' AND \"result\"='silver' AND \"championship\"='olympics' AND \"event\"='men''s coxless pair';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: Where is the lacrosse school located?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='lacrosse';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: Which IHSAA Class has a Mascot of tigers?" }, { "role": "assistant", "content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"mascot\"='tigers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: Which Location has an Enrollment larger than 543?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"indiana_high_school_athletics_conference\" WHERE \"enrollment\">543;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: Which County has an Enrollment of 297?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"indiana_high_school_athletics_conference\" WHERE \"enrollment\"=297;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: Which School has an Enrollment larger than 264, and a County of 46 la porte?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"enrollment\">264 AND \"county\"='46 la porte';" } ]
[ { "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: What is the number of silver medals when there are more than 1 gold, and more than 6 bronze?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"world_championships_total_medals\" WHERE \"gold\">1 AND \"bronze\">6;" } ]
[ { "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: What is the total when the Yugoslavia number of silver won is more than 1?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"world_championships_total_medals\" WHERE \"silver\">1 AND \"nation\"='yugoslavia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the total attendance before week 1?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"schedule\" WHERE \"week\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1939\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: When was sniffles and the bookworm released?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"1939\" WHERE \"title\"='sniffles and the bookworm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1939\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: When was land of the midnight fun in the mm series released?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"1939\" WHERE \"series\"='mm' AND \"title\"='land of the midnight fun';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1939\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: Which series had a release on 1939-07-15 with the 8863 production number?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"1939\" WHERE \"release_date\"='1939-07-15' AND \"production_num\"='8863';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1939\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: Who directed hamateur night?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"1939\" WHERE \"title\"='hamateur night';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1939\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: When was Production Number 9105 released?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"1939\" WHERE \"production_num\"='9105';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbfx_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What Class has a Frequency of 90.1 FM?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"s_rebroadcaster_of_cbfx_fm\" WHERE \"frequency\"='90.1 fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbfx_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What is listed for the RECNet that also has a Frequency of 91.1 FM?" }, { "role": "assistant", "content": "SELECT \"rec_net\" FROM \"s_rebroadcaster_of_cbfx_fm\" WHERE \"frequency\"='91.1 fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbfx_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What Class has the Identifier fo CBFX-FM-2?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"s_rebroadcaster_of_cbfx_fm\" WHERE \"identifier\"='cbfx-fm-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbfx_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What is the RECNet with a Class of B and the City of License of Rouyn-Noranda?" }, { "role": "assistant", "content": "SELECT \"rec_net\" FROM \"s_rebroadcaster_of_cbfx_fm\" WHERE \"class\"='b' AND \"city_of_license\"='rouyn-noranda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbfx_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What Class has the Identifier of CBFX-FM-6?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"s_rebroadcaster_of_cbfx_fm\" WHERE \"identifier\"='cbfx-fm-6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbfx_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What Frequency has the Identifier of CBFX-FM-6?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"s_rebroadcaster_of_cbfx_fm\" WHERE \"identifier\"='cbfx-fm-6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of gold with less than 1 silver, from Belgium?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"medals_table\" WHERE \"silver\"<1 AND \"nation\"='belgium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: Which Lost has Points smaller than 15, and a Name of sc forst, and Drawn smaller than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"lost\") FROM \"first_round\" WHERE \"points\"<15 AND \"name\"='sc forst' AND \"drawn\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: How much Position has a Lost of 8, and a Played larger than 14?" }, { "role": "assistant", "content": "SELECT SUM(\"position\") FROM \"first_round\" WHERE \"lost\"=8 AND \"played\">14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: Which Drawn has a Lost larger than 8, and Points smaller than 7?" }, { "role": "assistant", "content": "SELECT SUM(\"drawn\") FROM \"first_round\" WHERE \"lost\">8 AND \"points\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: How much Drawn has a Name of erc lechbruck, and Points smaller than 17?" }, { "role": "assistant", "content": "SELECT COUNT(\"drawn\") FROM \"first_round\" WHERE \"name\"='erc lechbruck' AND \"points\"<17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"towns\" (\n \"town\" text,\n \"population_2001\" real,\n \"population_rank\" real,\n \"county\" text,\n \"municipality\" text\n);\n\nQuestion: What town is from the mol\u0117tai district municipality and has a population rank of 187 and a population less than 470 in 2001?" }, { "role": "assistant", "content": "SELECT \"town\" FROM \"towns\" WHERE \"municipality\"='mol\u0117tai district municipality' AND \"population_2001\"<470 AND \"population_rank\"=187;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"towns\" (\n \"town\" text,\n \"population_2001\" real,\n \"population_rank\" real,\n \"county\" text,\n \"municipality\" text\n);\n\nQuestion: What county is the town with a rank of 205 located in?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"towns\" WHERE \"population_rank\"=205;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_of_heat_6\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"percentage\" text,\n \"place\" real\n);\n\nQuestion: What is the fewest draws for percentages of 5.02%?" }, { "role": "assistant", "content": "SELECT MIN(\"draw\") FROM \"results_of_heat_6\" WHERE \"percentage\"='5.02%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_of_heat_6\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"percentage\" text,\n \"place\" real\n);\n\nQuestion: What is the average draws for the song \"Europe is My Home!\"?" }, { "role": "assistant", "content": "SELECT AVG(\"draw\") FROM \"results_of_heat_6\" WHERE \"song\"='\\\"europe is my home!\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ninth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the position of the player from the denver broncos?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"ninth_round\" WHERE \"team\"='denver broncos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ninth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the average pick of the kansas city chiefs?" }, { "role": "assistant", "content": "SELECT AVG(\"pick\") FROM \"ninth_round\" WHERE \"team\"='kansas city chiefs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ninth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the pick of wiley college?" }, { "role": "assistant", "content": "SELECT \"pick\" FROM \"ninth_round\" WHERE \"college\"='wiley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"northern_section\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance for the game with alfreton town as the home team?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"northern_section\" WHERE \"home_team\"='alfreton town';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"northern_section\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What was the score of the game where stafford rangers was the away team?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"northern_section\" WHERE \"away_team\"='stafford rangers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"northern_section\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the home team that has a tie no of 1?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"northern_section\" WHERE \"tie_no\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"northern_section\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the tie no that has southport as the away team?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"northern_section\" WHERE \"away_team\"='southport';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"northern_section\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance for the game that had the king's lynn as the home team?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"northern_section\" WHERE \"home_team\"='king''s lynn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"northern_section\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What was the score for the game with a tie no of 1?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"northern_section\" WHERE \"tie_no\"='1';" } ]
[ { "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 \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the game number on December 21?" }, { "role": "assistant", "content": "SELECT COUNT(\"game\") FROM \"game_log\" WHERE \"date\"='december 21';" } ]
[ { "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 \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the Game with a Record of 19-15?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"game_log\" WHERE \"record\"='19-15';" } ]
[ { "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 \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the Date of the game against Detroit in game 31 or after?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"game\">31 AND \"opponent\"='detroit';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: During which years did the golfer with the total of 289 win?" }, { "role": "assistant", "content": "SELECT \"year_s_won\" FROM \"made_the_cut\" WHERE \"total\"=289;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What was the To par for the player who finished t56?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"finish\"='t56';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which county did the player with a total of 294 represent?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"total\"=294;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What was the total for united states player phil mickelson?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"made_the_cut\" WHERE \"country\"='united states' AND \"player\"='phil mickelson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: With a less than 4 rank, and a time less than 24.42 what is the smallest lane?" }, { "role": "assistant", "content": "SELECT MIN(\"lane\") FROM \"semifinal_2\" WHERE \"rank\"<4 AND \"time\"<24.42;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: The swimmer from the United States in a lane less than 5, had what as the average time?" }, { "role": "assistant", "content": "SELECT AVG(\"time\") FROM \"semifinal_2\" WHERE \"nationality\"='united states' AND \"lane\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What nationality is the swimmer that is in the lane that is less than 2?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"semifinal_2\" WHERE \"lane\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"wimmera_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Which Losses have Draws smaller than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"losses\") FROM \"2009_ladder\" WHERE \"draws\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"wimmera_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Which Losses have Draws larger than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"losses\") FROM \"2009_ladder\" WHERE \"draws\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"wimmera_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How much Against has Losses smaller than 7, and a Wimmera FL of horsham?" }, { "role": "assistant", "content": "SELECT SUM(\"against\") FROM \"2009_ladder\" WHERE \"losses\"<7 AND \"wimmera_fl\"='horsham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"wimmera_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many Draws have Wins larger than 7, and a Wimmera FL of nhill, and Losses larger than 8?" }, { "role": "assistant", "content": "SELECT SUM(\"draws\") FROM \"2009_ladder\" WHERE \"wins\">7 AND \"wimmera_fl\"='nhill' AND \"losses\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_finals_10\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome of the match with a score of 3-6, 2-6?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"singles_finals_10\" WHERE \"score\"='3-6, 2-6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_finals_10\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the tournament that had byron black playing against magnus larsson?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_finals_10\" WHERE \"opponent\"='magnus larsson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_finals_10\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What tournament had a game with a score of 6-7, 4-6?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_finals_10\" WHERE \"score\"='6-7, 4-6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"line_honours_results_top_10\" (\n \"position\" real,\n \"sail_number\" text,\n \"yacht\" text,\n \"state_country\" text,\n \"yacht_type\" text,\n \"loa_metres\" real,\n \"skipper\" text,\n \"elapsed_time_d_hh_mm_ss\" text\n);\n\nQuestion: What was the yacht type smaller than 16.5 metres that finished in 3:14:41:28?" }, { "role": "assistant", "content": "SELECT \"yacht_type\" FROM \"line_honours_results_top_10\" WHERE \"loa_metres\"<16.5 AND \"elapsed_time_d_hh_mm_ss\"='3:14:41:28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"round\" real,\n \"opponent\" text,\n \"result\" text,\n \"opp\" real,\n \"venue\" text\n);\n\nQuestion: what is the result when the round is less than 7 and the opponent is melbourne storm?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"results\" WHERE \"round\"<7 AND \"opponent\"='melbourne storm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"round\" real,\n \"opponent\" text,\n \"result\" text,\n \"opp\" real,\n \"venue\" text\n);\n\nQuestion: what is the venue when the result is loss and the opponent is st george-illawarra dragons?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"results\" WHERE \"result\"='loss' AND \"opponent\"='st george-illawarra dragons';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_men\" (\n \"year\" real,\n \"place\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: Who won silver in 1982?" }, { "role": "assistant", "content": "SELECT \"silver\" FROM \"world_championships_men\" WHERE \"year\"=1982;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"repechage\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the Time of the Rowers in Rank 1?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"repechage\" WHERE \"rank\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"repechage\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the Time of the Rowers from Belgium?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"repechage\" WHERE \"country\"='belgium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_3\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text\n);\n\nQuestion: What time does lane 7 have?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"semifinal_3\" WHERE \"lane\"=7;" } ]