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