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 \"rugby_spain_internationals_1989\" (\n \"first_game\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"percentage\" text\n);\n\nQuestion: What is the total number of drawn matches from first game years before 2006 and fewer than 2 matches played?" }, { "role": "assistant", "content": "SELECT SUM(\"drawn\") FROM \"rugby_spain_internationals_1989\" WHERE \"first_game\"<2006 AND \"played\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rugby_spain_internationals_1989\" (\n \"first_game\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"percentage\" text\n);\n\nQuestion: What is the highest number of losses associated with 2 matches played, a first game after 1997, and more than 0 draws?" }, { "role": "assistant", "content": "SELECT MAX(\"lost\") FROM \"rugby_spain_internationals_1989\" WHERE \"played\"=2 AND \"first_game\">1997 AND \"drawn\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia_in_england\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What is the Result of the Test match at the Edgbaston Venue on 5,6,7,8 June 1997?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"australia_in_england\" WHERE \"date\"='5,6,7,8 june 1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia_in_england\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What is the Date of the Test match of Australia in England at The Oval Venue?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"australia_in_england\" WHERE \"venue\"='the oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia_in_england\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Who was the Away captain for the Test match of Australia in England where the Result was AUS by 264 runs?" }, { "role": "assistant", "content": "SELECT \"away_captain\" FROM \"australia_in_england\" WHERE \"result\"='aus by 264 runs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia_in_england\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Who was the Home captain for the Test match of Australia in England at the Edgbaston Venue?" }, { "role": "assistant", "content": "SELECT \"home_captain\" FROM \"australia_in_england\" WHERE \"venue\"='edgbaston';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"telenovelas\" (\n \"year\" text,\n \"title\" text,\n \"production_company\" text,\n \"role\" text,\n \"notes\" text\n);\n\nQuestion: what is the name of the role that has co-protagonist in the notes field and the years of 2008-2009?" }, { "role": "assistant", "content": "SELECT \"role\" FROM \"telenovelas\" WHERE \"notes\"='co-protagonist' AND \"year\"='2008-2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"telenovelas\" (\n \"year\" text,\n \"title\" text,\n \"production_company\" text,\n \"role\" text,\n \"notes\" text\n);\n\nQuestion: What is the name of the role that has a Title of Olvidarte Jamas?" }, { "role": "assistant", "content": "SELECT \"role\" FROM \"telenovelas\" WHERE \"title\"='olvidarte jamas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"telenovelas\" (\n \"year\" text,\n \"title\" text,\n \"production_company\" text,\n \"role\" text,\n \"notes\" text\n);\n\nQuestion: Which production company has the year of 2005 listed?" }, { "role": "assistant", "content": "SELECT \"production_company\" FROM \"telenovelas\" WHERE \"year\"='2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"telenovelas\" (\n \"year\" text,\n \"title\" text,\n \"production_company\" text,\n \"role\" text,\n \"notes\" text\n);\n\nQuestion: What is the name of the role that has a Title of Salud, Dinero y Amor and antagonist in the notes field?" }, { "role": "assistant", "content": "SELECT \"role\" FROM \"telenovelas\" WHERE \"notes\"='antagonist' AND \"title\"='salud, dinero y amor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"telenovelas\" (\n \"year\" text,\n \"title\" text,\n \"production_company\" text,\n \"role\" text,\n \"notes\" text\n);\n\nQuestion: What is the name of the production company that has a year of 2008-2009?" }, { "role": "assistant", "content": "SELECT \"production_company\" FROM \"telenovelas\" WHERE \"year\"='2008-2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south_waikato_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" text\n);\n\nQuestion: What is the Authority for Kuranui Primary School that is located in the Area of Tirau?" }, { "role": "assistant", "content": "SELECT \"authority\" FROM \"south_waikato_district\" WHERE \"area\"='tirau' AND \"name\"='kuranui primary school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south_waikato_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" text\n);\n\nQuestion: Which Names have Deciles larger than 7?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"south_waikato_district\" WHERE \"decile\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south_waikato_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" text\n);\n\nQuestion: What Gender are the schools that have a Roll of 135?" }, { "role": "assistant", "content": "SELECT \"gender\" FROM \"south_waikato_district\" WHERE \"roll\"='135';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south_waikato_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" text\n);\n\nQuestion: What is the Name of a state Authority that has a Roll of 72?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"south_waikato_district\" WHERE \"authority\"='state' AND \"roll\"='72';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which friendly competition took place on 19 April 1979?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='friendly' AND \"date\"='19 april 1979';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which Team 1 has a first leg of 1-0 and a second leg of 0-2?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"second_round\" WHERE \"1st_leg\"='1-0' AND \"2nd_leg\"='0-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which Team 1 faced Dynamos FC?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"second_round\" WHERE \"team_2\"='dynamos fc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is Team 1 Al-Hilal's Agg.?" }, { "role": "assistant", "content": "SELECT \"agg\" FROM \"second_round\" WHERE \"team_1\"='al-hilal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What Team 2 has a second leg of 1-0?" }, { "role": "assistant", "content": "SELECT \"team_2\" FROM \"second_round\" WHERE \"2nd_leg\"='1-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What Team 2 has a second leg of 3-1?" }, { "role": "assistant", "content": "SELECT \"team_2\" FROM \"second_round\" WHERE \"2nd_leg\"='3-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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: Which record happened on the date of May 7?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='may 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which tournament had Lubomira Bacheva as the opponent in the final?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles\" WHERE \"opponent_in_the_final\"='lubomira bacheva';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who was the opponent in the final on 5 July 1992?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"singles\" WHERE \"date\"='5 july 1992';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the date of the tournament where Kyoko Nagatsuka was the opponent in the final?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles\" WHERE \"opponent_in_the_final\"='kyoko nagatsuka';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the surface at the tournament of Vaihingen?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles\" WHERE \"tournament\"='vaihingen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the surface of the tournament where Anna Benzon was the opponent in the final?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles\" WHERE \"opponent_in_the_final\"='anna benzon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eesti_p_levkivi_j_hvi_in_estonian_footba\" (\n \"year\" text,\n \"league\" text,\n \"position\" real,\n \"goals\" real,\n \"points\" real\n);\n\nQuestion: What is the average position of Eesti P\u00f5levkivi J\u00f5hvi when they had less than 13 points and worse than a -12 goal differential?" }, { "role": "assistant", "content": "SELECT AVG(\"position\") FROM \"eesti_p_levkivi_j_hvi_in_estonian_footba\" WHERE \"points\"<13 AND \"goals\">-12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the to par for the player who had a score of 70-72-70-69=281?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"score\"='70-72-70-69=281';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What year had the qual of totals" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"indy_500_results\" WHERE \"qual\"='totals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What qual had a finish of 16 in 1968?" }, { "role": "assistant", "content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"finish\"='16' AND \"year\"='1968';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What was the finish with the start of 25 and a lap larger than 46?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"indy_500_results\" WHERE \"start\"='25' AND \"laps\">46;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What was the lowest lap with the ranking of 19?" }, { "role": "assistant", "content": "SELECT MIN(\"laps\") FROM \"indy_500_results\" WHERE \"start\"='19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"one_day_internationals\" (\n \"player\" text,\n \"wkts\" real,\n \"runs\" real,\n \"econ\" real,\n \"ovrs\" real\n);\n\nQuestion: Name the least ovrs for wkts of 0" }, { "role": "assistant", "content": "SELECT MIN(\"ovrs\") FROM \"one_day_internationals\" WHERE \"wkts\"=0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"one_day_internationals\" (\n \"player\" text,\n \"wkts\" real,\n \"runs\" real,\n \"econ\" real,\n \"ovrs\" real\n);\n\nQuestion: Name the average econ for runs more than 703 and ovrs more than 25.5" }, { "role": "assistant", "content": "SELECT AVG(\"econ\") FROM \"one_day_internationals\" WHERE \"ovrs\">25.5 AND \"runs\">703;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dakar_rally_results\" (\n \"year\" real,\n \"class\" text,\n \"vehicle\" text,\n \"position\" text,\n \"stages_won\" text\n);\n\nQuestion: What is the average year that has a car that won 0 stages with a position of DNF?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"dakar_rally_results\" WHERE \"class\"='car' AND \"stages_won\"='0' AND \"position\"='dnf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dakar_rally_results\" (\n \"year\" real,\n \"class\" text,\n \"vehicle\" text,\n \"position\" text,\n \"stages_won\" text\n);\n\nQuestion: What is the class that that won 2 stages and has a position of DNF?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"dakar_rally_results\" WHERE \"stages_won\"='2' AND \"position\"='dnf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dakar_rally_results\" (\n \"year\" real,\n \"class\" text,\n \"vehicle\" text,\n \"position\" text,\n \"stages_won\" text\n);\n\nQuestion: What position did the BMW vehicle made in 2006 hold?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"dakar_rally_results\" WHERE \"vehicle\"='bmw' AND \"year\"=2006;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_fleet_roster\" (\n \"builder\" text,\n \"model\" text,\n \"length_ft_m\" text,\n \"order_year\" text,\n \"fuel_propulsion\" text,\n \"fleet_series_quantity\" text\n);\n\nQuestion: Which builder has a Fuel Propulsion of diesel, a Model of d40lf, and an Order Year of 2005?" }, { "role": "assistant", "content": "SELECT \"builder\" FROM \"current_fleet_roster\" WHERE \"fuel_propulsion\"='diesel' AND \"model\"='d40lf' AND \"order_year\"='2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_fleet_roster\" (\n \"builder\" text,\n \"model\" text,\n \"length_ft_m\" text,\n \"order_year\" text,\n \"fuel_propulsion\" text,\n \"fleet_series_quantity\" text\n);\n\nQuestion: Which model has a Fleet Series (Quantity) of 11081-11092 (12)?" }, { "role": "assistant", "content": "SELECT \"model\" FROM \"current_fleet_roster\" WHERE \"fleet_series_quantity\"='11081-11092 (12)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_fleet_roster\" (\n \"builder\" text,\n \"model\" text,\n \"length_ft_m\" text,\n \"order_year\" text,\n \"fuel_propulsion\" text,\n \"fleet_series_quantity\" text\n);\n\nQuestion: Which order year has a Fleet Series (Quantity) of 12081-12090 (10)?" }, { "role": "assistant", "content": "SELECT \"order_year\" FROM \"current_fleet_roster\" WHERE \"fleet_series_quantity\"='12081-12090 (10)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_fleet_roster\" (\n \"builder\" text,\n \"model\" text,\n \"length_ft_m\" text,\n \"order_year\" text,\n \"fuel_propulsion\" text,\n \"fleet_series_quantity\" text\n);\n\nQuestion: Which Fleet Series (Quantity) that has a Builder of mci, and an Order Year of 2002?" }, { "role": "assistant", "content": "SELECT \"fleet_series_quantity\" FROM \"current_fleet_roster\" WHERE \"builder\"='mci' AND \"order_year\"='2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_fleet_roster\" (\n \"builder\" text,\n \"model\" text,\n \"length_ft_m\" text,\n \"order_year\" text,\n \"fuel_propulsion\" text,\n \"fleet_series_quantity\" text\n);\n\nQuestion: Which Fleet Series (Quantity) has an Order Year of 2010, and a Model of de40lfr?" }, { "role": "assistant", "content": "SELECT \"fleet_series_quantity\" FROM \"current_fleet_roster\" WHERE \"order_year\"='2010' AND \"model\"='de40lfr';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_fleet_roster\" (\n \"builder\" text,\n \"model\" text,\n \"length_ft_m\" text,\n \"order_year\" text,\n \"fuel_propulsion\" text,\n \"fleet_series_quantity\" text\n);\n\nQuestion: Which Fuel Propulsion has a Fleet Series (Quantity) of 04001-04125 (125)?" }, { "role": "assistant", "content": "SELECT \"fuel_propulsion\" FROM \"current_fleet_roster\" WHERE \"fleet_series_quantity\"='04001-04125 (125)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matamata_piako_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Name the sum of roll for morrinsville school" }, { "role": "assistant", "content": "SELECT SUM(\"roll\") FROM \"matamata_piako_district\" WHERE \"name\"='morrinsville school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matamata_piako_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Name the authority for morrinsville college" }, { "role": "assistant", "content": "SELECT \"authority\" FROM \"matamata_piako_district\" WHERE \"name\"='morrinsville college';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matamata_piako_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Name the years when decile was less than 7 for waitoa school" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"matamata_piako_district\" WHERE \"decile\"<7 AND \"name\"='waitoa school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matamata_piako_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Name the total number of roll for state authority and stanley avenue school with decile more than 5" }, { "role": "assistant", "content": "SELECT COUNT(\"roll\") FROM \"matamata_piako_district\" WHERE \"authority\"='state' AND \"name\"='stanley avenue school' AND \"decile\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the Blue Jays' record when they played the Royals with an attendance larger than 50,522?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"attendance\">'50,522' AND \"opponent\"='royals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"population_region_total\" real,\n \"population_caloundra\" real,\n \"population_maroochy\" real,\n \"population_noosa\" real\n);\n\nQuestion: What year had a population region total of 63,073 and a population maroochy smaller than 35,266?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"population\" WHERE \"population_region_total\"='63,073' AND \"population_maroochy\"<'35,266';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the grid total associated with 18 laps?" }, { "role": "assistant", "content": "SELECT COUNT(\"grid\") FROM \"125cc_classification\" WHERE \"laps\"=18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What rider is on an aprilia that went under 18 laps with a grid total of 17?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"125cc_classification\" WHERE \"manufacturer\"='aprilia' AND \"laps\"<18 AND \"grid\"=17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the Manufacturer for simone corsi?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"125cc_classification\" WHERE \"rider\"='simone corsi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the grid total associated with a Time/Retired of +33.634, and a Laps smaller than 19?" }, { "role": "assistant", "content": "SELECT MIN(\"grid\") FROM \"125cc_classification\" WHERE \"time_retired\"='+33.634' AND \"laps\"<19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engines_and_transmissions\" (\n \"model_engine\" text,\n \"capacity\" text,\n \"cylinders_valves\" text,\n \"power_rpm\" text,\n \"torque_nm_rpm\" text\n);\n\nQuestion: Tell me the power when the torque is n\u00b7m (lb\u00b7ft)/*n\u00b7m (lb\u00b7ft) @1750" }, { "role": "assistant", "content": "SELECT \"power_rpm\" FROM \"engines_and_transmissions\" WHERE \"torque_nm_rpm\"='n\u00b7m (lb\u00b7ft)/*n\u00b7m (lb\u00b7ft) @1750';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engines_and_transmissions\" (\n \"model_engine\" text,\n \"capacity\" text,\n \"cylinders_valves\" text,\n \"power_rpm\" text,\n \"torque_nm_rpm\" text\n);\n\nQuestion: Name the capacity for the engine of 2.0 duratorq" }, { "role": "assistant", "content": "SELECT \"capacity\" FROM \"engines_and_transmissions\" WHERE \"model_engine\"='2.0 duratorq';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engines_and_transmissions\" (\n \"model_engine\" text,\n \"capacity\" text,\n \"cylinders_valves\" text,\n \"power_rpm\" text,\n \"torque_nm_rpm\" text\n);\n\nQuestion: Name the capacity for the torque of n\u00b7m (lb\u00b7ft) @4150" }, { "role": "assistant", "content": "SELECT \"capacity\" FROM \"engines_and_transmissions\" WHERE \"torque_nm_rpm\"='n\u00b7m (lb\u00b7ft) @4150';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engines_and_transmissions\" (\n \"model_engine\" text,\n \"capacity\" text,\n \"cylinders_valves\" text,\n \"power_rpm\" text,\n \"torque_nm_rpm\" text\n);\n\nQuestion: Name the power for 1.8 duratorq" }, { "role": "assistant", "content": "SELECT \"power_rpm\" FROM \"engines_and_transmissions\" WHERE \"model_engine\"='1.8 duratorq';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engines_and_transmissions\" (\n \"model_engine\" text,\n \"capacity\" text,\n \"cylinders_valves\" text,\n \"power_rpm\" text,\n \"torque_nm_rpm\" text\n);\n\nQuestion: Name the power for when the torque is n\u00b7m (lb\u00b7ft)/*n\u00b7m (lb\u00b7ft) @1750" }, { "role": "assistant", "content": "SELECT \"power_rpm\" FROM \"engines_and_transmissions\" WHERE \"torque_nm_rpm\"='n\u00b7m (lb\u00b7ft)/*n\u00b7m (lb\u00b7ft) @1750';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_appearances_in_uefa_club_competition\" (\n \"rank\" real,\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"goal_ratio\" real,\n \"debut_in_europe\" real\n);\n\nQuestion: What are the smallest goals with a Goal Ratio of 0.14, and a Debut in Europe smaller than 1995?" }, { "role": "assistant", "content": "SELECT MIN(\"goals\") FROM \"top_appearances_in_uefa_club_competition\" WHERE \"goal_ratio\"=0.14 AND \"debut_in_europe\"<1995;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_appearances_in_uefa_club_competition\" (\n \"rank\" real,\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"goal_ratio\" real,\n \"debut_in_europe\" real\n);\n\nQuestion: What's the average goal ratio with Goals larger than 1, Games larger than 161, and a Debut in Europe smaller than 1985?" }, { "role": "assistant", "content": "SELECT AVG(\"goal_ratio\") FROM \"top_appearances_in_uefa_club_competition\" WHERE \"goals\">1 AND \"games\">161 AND \"debut_in_europe\"<1985;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_appearances_in_uefa_club_competition\" (\n \"rank\" real,\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"goal_ratio\" real,\n \"debut_in_europe\" real\n);\n\nQuestion: What lowest games have 20 goals and a Goal Ratio smaller than 0.14?" }, { "role": "assistant", "content": "SELECT MIN(\"games\") FROM \"top_appearances_in_uefa_club_competition\" WHERE \"goals\"=20 AND \"goal_ratio\"<0.14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_appearances_in_uefa_club_competition\" (\n \"rank\" real,\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"goal_ratio\" real,\n \"debut_in_europe\" real\n);\n\nQuestion: What is the largest goal ratio with Goals smaller than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"goal_ratio\") FROM \"top_appearances_in_uefa_club_competition\" WHERE \"goals\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_appearances_in_uefa_club_competition\" (\n \"rank\" real,\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"goal_ratio\" real,\n \"debut_in_europe\" real\n);\n\nQuestion: What lowest games have a Goal Ratio of 0, and Goals smaller than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"games\") FROM \"top_appearances_in_uefa_club_competition\" WHERE \"goal_ratio\"=0 AND \"goals\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_appearances_in_uefa_club_competition\" (\n \"rank\" real,\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"goal_ratio\" real,\n \"debut_in_europe\" real\n);\n\nQuestion: How many debuts in Europe have less than 76 goals, more than 151 games, and a rank greater than 5?" }, { "role": "assistant", "content": "SELECT COUNT(\"debut_in_europe\") FROM \"top_appearances_in_uefa_club_competition\" WHERE \"goals\"<76 AND \"games\">151 AND \"rank\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the average points of the Ferrari 1512 Chassis after 1965?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='ferrari 1512' AND \"year\">1965;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the Chassis of the Cooper Car Company after 1965 when the engine was a Maserati v12?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\">1965 AND \"team\"='cooper car company' AND \"engine\"='maserati v12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which location had a round of 3, and an Opponent of matt horwich?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"round\"<3 AND \"opponent\"='matt horwich';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the time of sportfight 10?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='sportfight 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which opponent had a time of 0:29?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='0:29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" real,\n \"name\" text,\n \"builder\" text,\n \"type\" text,\n \"works_number\" real,\n \"date\" real\n);\n\nQuestion: What number has the builder ruston hornsby, the date 1961, and the name Topsy?" }, { "role": "assistant", "content": "SELECT COUNT(\"number\") FROM \"locomotives\" WHERE \"builder\"='ruston hornsby' AND \"date\"=1961 AND \"name\"='topsy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" real,\n \"name\" text,\n \"builder\" text,\n \"type\" text,\n \"works_number\" real,\n \"date\" real\n);\n\nQuestion: What is the number with the builder hunslet and a works number greater than 822?" }, { "role": "assistant", "content": "SELECT COUNT(\"number\") FROM \"locomotives\" WHERE \"builder\"='hunslet' AND \"works_number\">822;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the March 14 game?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"regular_season\" WHERE \"date\"='march 14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the score for the December 11 game against the Ottawa Senators?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"regular_season\" WHERE \"visitor\"='ottawa senators' AND \"date\"='december 11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_yachts\" (\n \"hull_no\" real,\n \"year\" real,\n \"project\" text,\n \"length_overall_in_meters_without_bowsprit\" real,\n \"name\" text,\n \"destination\" text\n);\n\nQuestion: Name the project with length overall being 25 and name of levante" }, { "role": "assistant", "content": "SELECT \"project\" FROM \"list_of_yachts\" WHERE \"length_overall_in_meters_without_bowsprit\"=25 AND \"name\"='levante';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_yachts\" (\n \"hull_no\" real,\n \"year\" real,\n \"project\" text,\n \"length_overall_in_meters_without_bowsprit\" real,\n \"name\" text,\n \"destination\" text\n);\n\nQuestion: Name the sum of Hull number with portugal destination" }, { "role": "assistant", "content": "SELECT SUM(\"hull_no\") FROM \"list_of_yachts\" WHERE \"destination\"='portugal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_yachts\" (\n \"hull_no\" real,\n \"year\" real,\n \"project\" text,\n \"length_overall_in_meters_without_bowsprit\" real,\n \"name\" text,\n \"destination\" text\n);\n\nQuestion: Name the sum of hull number for italy and year more than 1999" }, { "role": "assistant", "content": "SELECT SUM(\"hull_no\") FROM \"list_of_yachts\" WHERE \"destination\"='italy' AND \"year\">1999;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"recording_industry_association_of_americ\" (\n \"year\" real,\n \"date\" text,\n \"title\" text,\n \"format_s\" text,\n \"award_description_s\" text,\n \"result_s\" text\n);\n\nQuestion: Give me the result for a format saying album with 1994 as the year." }, { "role": "assistant", "content": "SELECT \"result_s\" FROM \"recording_industry_association_of_americ\" WHERE \"format_s\"='album' AND \"year\"=1994;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"recording_industry_association_of_americ\" (\n \"year\" real,\n \"date\" text,\n \"title\" text,\n \"format_s\" text,\n \"award_description_s\" text,\n \"result_s\" text\n);\n\nQuestion: List the Award Descriptions for the year of 1989." }, { "role": "assistant", "content": "SELECT \"award_description_s\" FROM \"recording_industry_association_of_americ\" WHERE \"year\"=1989;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is on at 9:30 on the channel of dancing with the stars?" }, { "role": "assistant", "content": "SELECT \"9_30\" FROM \"monday\" WHERE \"8_30\"='dancing with the stars';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is on at 7:30 when k-ville is on at 9:00 on that channel?" }, { "role": "assistant", "content": "SELECT \"7_30\" FROM \"monday\" WHERE \"9_00\"='k-ville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is on at 8:30 when occupation double is on at 7:00 at that channel?" }, { "role": "assistant", "content": "SELECT \"8_30\" FROM \"monday\" WHERE \"7_00\"='occupation double';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is on at 8:30 when etalk is on at 7:00 on that channel?" }, { "role": "assistant", "content": "SELECT \"8_30\" FROM \"monday\" WHERE \"7_00\"='etalk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is on at 8:00 when etalk is on at 7:00?" }, { "role": "assistant", "content": "SELECT \"8_00\" FROM \"monday\" WHERE \"7_00\"='etalk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game played on August 5?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='august 5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: On what date was the Blue Jays record 60-56?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='60-56';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"county_board_of_supervisors\" (\n \"position\" text,\n \"name\" text,\n \"party\" text,\n \"first_elected\" real,\n \"district\" text\n);\n\nQuestion: Tell me the name for first elected more than 1988 and district of mason" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"county_board_of_supervisors\" WHERE \"first_elected\">1988 AND \"district\"='mason';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"county_board_of_supervisors\" (\n \"position\" text,\n \"name\" text,\n \"party\" text,\n \"first_elected\" real,\n \"district\" text\n);\n\nQuestion: Name the party with first elected more than 1999 and position of supervisor for john foust" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"county_board_of_supervisors\" WHERE \"first_elected\">1999 AND \"position\"='supervisor' AND \"name\"='john foust';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"county_board_of_supervisors\" (\n \"position\" text,\n \"name\" text,\n \"party\" text,\n \"first_elected\" real,\n \"district\" text\n);\n\nQuestion: Name the total number of first elected for dranesville" }, { "role": "assistant", "content": "SELECT COUNT(\"first_elected\") FROM \"county_board_of_supervisors\" WHERE \"district\"='dranesville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"premierships_8_62\" (\n \"year\" real,\n \"opponent\" text,\n \"competition\" text,\n \"score\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: What year was the venue at Sydney Cricket Ground, and the opponent was Parramatta Eels?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"premierships_8_62\" WHERE \"venue\"='sydney cricket ground' AND \"opponent\"='parramatta eels';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"premierships_8_62\" (\n \"year\" real,\n \"opponent\" text,\n \"competition\" text,\n \"score\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: What was the competition in 1978?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"premierships_8_62\" WHERE \"year\"=1978;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"premierships_8_62\" (\n \"year\" real,\n \"opponent\" text,\n \"competition\" text,\n \"score\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: What year was the average attendance 80,388?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"premierships_8_62\" WHERE \"attendance\"='80,388';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"premierships_8_62\" (\n \"year\" real,\n \"opponent\" text,\n \"competition\" text,\n \"score\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: What was the score with the opponent being New Zealand Warriors?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"premierships_8_62\" WHERE \"opponent\"='new zealand warriors';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: Which 1st Party has an election in 1847?" }, { "role": "assistant", "content": "SELECT \"1st_party\" FROM \"members_of_parliament\" WHERE \"election\"='1847';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: Which 1st Party has an election in 1865?" }, { "role": "assistant", "content": "SELECT \"1st_party\" FROM \"members_of_parliament\" WHERE \"election\"='1865';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: Which 1st Party has a 2nd Member of constituency abolished?" }, { "role": "assistant", "content": "SELECT \"1st_party\" FROM \"members_of_parliament\" WHERE \"2nd_member\"='constituency abolished';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: Which 1st Member has an election in 1880 and a liberal 1st Party?" }, { "role": "assistant", "content": "SELECT \"1st_member\" FROM \"members_of_parliament\" WHERE \"1st_party\"='liberal' AND \"election\"='1880';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: Which 1st Member has an election in 1859 and a conservative 2nd Party?" }, { "role": "assistant", "content": "SELECT \"1st_member\" FROM \"members_of_parliament\" WHERE \"2nd_party\"='conservative' AND \"election\"='1859';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1966_season_finished_1st_54pts_out_of_19\" (\n \"rider\" text,\n \"matches\" real,\n \"rides\" real,\n \"bonus_pts\" real,\n \"total_points\" real\n);\n\nQuestion: What was the average number of points with bonus pts less than 31 with the rider dennis gavros?" }, { "role": "assistant", "content": "SELECT AVG(\"total_points\") FROM \"1966_season_finished_1st_54pts_out_of_19\" WHERE \"rider\"='dennis gavros' AND \"bonus_pts\"<31;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1966_season_finished_1st_54pts_out_of_19\" (\n \"rider\" text,\n \"matches\" real,\n \"rides\" real,\n \"bonus_pts\" real,\n \"total_points\" real\n);\n\nQuestion: How many total matches involving dennis gavros had total points less than 167?" }, { "role": "assistant", "content": "SELECT COUNT(\"matches\") FROM \"1966_season_finished_1st_54pts_out_of_19\" WHERE \"rider\"='dennis gavros' AND \"total_points\"<167;" } ]