conversations
listlengths
2
2
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Company, Business, Country, Value ( USD )\n###Question: In the United Kingdom, what company has an unknown date and is an energy business?" }, { "from": "gpt", "value": "SELECT Company FROM table WHERE Business = energy AND Date = unknown AND Country = united kingdom" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Company, Business, Country, Value ( USD )\n###Question: For the United Kingdom, what's the date?" }, { "from": "gpt", "value": "SELECT Date FROM table WHERE Country = united kingdom" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Company, Business, Country, Value ( USD )\n###Question: For the Enernoc Australia Pty Ltd, what's the country with an unknown date?" }, { "from": "gpt", "value": "SELECT Country FROM table WHERE Date = unknown AND Company = enernoc australia pty ltd" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Goal, Date, Venue, Score, Result, Competition\n###Question: Which date is associated with a venue of Luxembourg?" }, { "from": "gpt", "value": "SELECT Date FROM table WHERE Venue = luxembourg" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Entrant, Chassis, Engine, Points\n###Question: What is the year with a Kurtis Kraft 500a chassis, and less than 1.5 points?" }, { "from": "gpt", "value": "SELECT SUM Year FROM table WHERE Chassis = kurtis kraft 500a AND Points < 1.5" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Entrant, Chassis, Engine, Points\n###Question: What is the year with a kurtis kraft 500a chassis?" }, { "from": "gpt", "value": "SELECT SUM Year FROM table WHERE Chassis = kurtis kraft 500a" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Round, Pick #, Overall, Name, Position, College\n###Question: What is the lowest Pick # of Saint Vincent College?" }, { "from": "gpt", "value": "SELECT MIN Pick # FROM table WHERE College = saint vincent college" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Round, Pick #, Overall, Name, Position, College\n###Question: What is the Overall for Pick # less than 5 Jack Harmon?" }, { "from": "gpt", "value": "SELECT MIN Overall FROM table WHERE Name = jack harmon AND Pick # < 5" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Rank, Region, Total GDP (€ bn ), % growth, Per capita\n###Question: Which rank has a Total GDP (€ bn) of €11.243??" }, { "from": "gpt", "value": "SELECT Rank FROM table WHERE Total GDP (€ bn ) = €11.243" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Rank, Region, Total GDP (€ bn ), % growth, Per capita\n###Question: What is the Region that has a Total GDP (€ bn ) of €11,745.353?" }, { "from": "gpt", "value": "SELECT Region FROM table WHERE Total GDP (€ bn ) = €11,745.353" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Rank, Region, Total GDP (€ bn ), % growth, Per capita\n###Question: Which Region that has a growth of −3.6%?" }, { "from": "gpt", "value": "SELECT Region FROM table WHERE % growth = −3.6" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Rank, Region, Total GDP (€ bn ), % growth, Per capita\n###Question: What is the per capita of Greece?" }, { "from": "gpt", "value": "SELECT Per capita FROM table WHERE Region = greece" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Rank, Nation, Gold, Silver, Bronze, Total\n###Question: What is the fewest number of silver medals received by a nation who received 40 bronze medals and more than 42 gold medals?" }, { "from": "gpt", "value": "SELECT MIN Silver FROM table WHERE Bronze = 40 AND Gold > 42" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Rank, Nation, Gold, Silver, Bronze, Total\n###Question: What is the lowest number of silver medals received by Austria when they receive more than 3 total medals, more than 22 bronze medals, and fewer than 395 gold medals?" }, { "from": "gpt", "value": "SELECT MIN Silver FROM table WHERE Total > 3 AND Bronze > 22 AND Gold < 395 AND Nation = austria" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Rank, Nation, Gold, Silver, Bronze, Total\n###Question: What is the average number of silver medals with more than 6 gold meals and less than 5 bronze medals?" }, { "from": "gpt", "value": "SELECT AVG Silver FROM table WHERE Gold > 6 AND Bronze < 5" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Rank, Nation, Gold, Silver, Bronze, Total\n###Question: How many ranks are for Switzerland with more than 2 total medals?" }, { "from": "gpt", "value": "SELECT COUNT Rank FROM table WHERE Nation = switzerland AND Total > 2" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Res., Record, Opponent, Method, Event, Round, Time, Location\n###Question: What is the event of the match with a round larger than 2 and ended with a method of ko (kick)?" }, { "from": "gpt", "value": "SELECT Event FROM table WHERE Round > 2 AND Method = ko (kick)" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Res., Record, Opponent, Method, Event, Round, Time, Location\n###Question: What is the method of the match after round 1 in the k-1 andy memorial 2001 japan gp final?" }, { "from": "gpt", "value": "SELECT Method FROM table WHERE Round > 1 AND Event = k-1 andy memorial 2001 japan gp final" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Res., Record, Opponent, Method, Event, Round, Time, Location\n###Question: What is the highest round of the match with Rene Rooze as the opponent in Saitama, Japan?" }, { "from": "gpt", "value": "SELECT MAX Round FROM table WHERE Opponent = rene rooze AND Location = saitama, japan" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Res., Record, Opponent, Method, Event, Round, Time, Location\n###Question: What is the highest round of the match with a time of 0:57?" }, { "from": "gpt", "value": "SELECT MAX Round FROM table WHERE Time = 0:57" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Club, Played, Drawn, Lost, Points for, Points against, Tries for, Tries against, Try bonus, Losing bonus, Points\n###Question: How many points did the Club score that has a try bonus of 7 and 52 tries for ?" }, { "from": "gpt", "value": "SELECT Points for FROM table WHERE Tries for = 52 AND Try bonus = 7" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Club, Played, Drawn, Lost, Points for, Points against, Tries for, Tries against, Try bonus, Losing bonus, Points\n###Question: What is the Losing bonus of the club that has 80 tries against ?" }, { "from": "gpt", "value": "SELECT Losing bonus FROM table WHERE Tries against = 80" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Club, Played, Drawn, Lost, Points for, Points against, Tries for, Tries against, Try bonus, Losing bonus, Points\n###Question: How many tries for does waunarlwydd rfc have ?" }, { "from": "gpt", "value": "SELECT Tries for FROM table WHERE Club = waunarlwydd rfc" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Club, Played, Drawn, Lost, Points for, Points against, Tries for, Tries against, Try bonus, Losing bonus, Points\n###Question: How many losses did the club with 47 points have ?" }, { "from": "gpt", "value": "SELECT Lost FROM table WHERE Points = 47" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Club, Played, Drawn, Lost, Points for, Points against, Tries for, Tries against, Try bonus, Losing bonus, Points\n###Question: How many points against does the club that has a try bonus of 6 and tries against of 54 have ?" }, { "from": "gpt", "value": "SELECT Points against FROM table WHERE Try bonus = 6 AND Tries against = 54" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Team, Co-Drivers, Class, Laps, Pos., Class Pos.\n###Question: Who were the co-drivers in 2008?" }, { "from": "gpt", "value": "SELECT Co-Drivers FROM table WHERE Year = 2008" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Team, Co-Drivers, Class, Laps, Pos., Class Pos.\n###Question: What was the position in 2006?" }, { "from": "gpt", "value": "SELECT Pos. FROM table WHERE Year = 2006" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Team, Co-Drivers, Class, Laps, Pos., Class Pos.\n###Question: What was the class when there were 325 laps?" }, { "from": "gpt", "value": "SELECT Class FROM table WHERE Laps = 325" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Team, Co-Drivers, Class, Laps, Pos., Class Pos.\n###Question: What was the position in a year after 2005 with a class position of 5th?" }, { "from": "gpt", "value": "SELECT Pos. FROM table WHERE Year > 2005 AND Class Pos. = 5th" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, English title, Original title, Country, Director(s)\n###Question: What is the English title of the film from 2001?" }, { "from": "gpt", "value": "SELECT English title FROM table WHERE Year = 2001" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, English title, Original title, Country, Director(s)\n###Question: What is the original title of the film from Japan/Taiwan before 2003?" }, { "from": "gpt", "value": "SELECT Original title FROM table WHERE Year < 2003 AND Country = japan/taiwan" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, English title, Original title, Country, Director(s)\n###Question: What is the English title of the film directed by Fernando Meirelles?" }, { "from": "gpt", "value": "SELECT English title FROM table WHERE Director(s) = fernando meirelles" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, English title, Original title, Country, Director(s)\n###Question: What is the country of the original title Cidade de deus?" }, { "from": "gpt", "value": "SELECT Country FROM table WHERE Original title = cidade de deus" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, English title, Original title, Country, Director(s)\n###Question: What is the earliest year of a film from Mexico?" }, { "from": "gpt", "value": "SELECT MIN Year FROM table WHERE Country = mexico" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, English title, Original title, Country, Director(s)\n###Question: What is the average year of the film from France/Hong Kong?" }, { "from": "gpt", "value": "SELECT AVG Year FROM table WHERE Country = france/hong kong" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Place, Player, Country, Score, To par\n###Question: Name the country for t3 place" }, { "from": "gpt", "value": "SELECT Country FROM table WHERE Place = t3" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Place, Player, Country, Score, To par\n###Question: Name the country with +2 to par" }, { "from": "gpt", "value": "SELECT Country FROM table WHERE To par = +2" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Place, Player, Country, Score, To par\n###Question: Name the to par for colin montgomerie" }, { "from": "gpt", "value": "SELECT To par FROM table WHERE Player = colin montgomerie" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Place, Player, Country, Score, To par\n###Question: Name the score for scotland" }, { "from": "gpt", "value": "SELECT Score FROM table WHERE Country = scotland" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Island, Location, Area ( ha ), Population, Height (m)\n###Question: What island has a population over 76, a height over 210, and an area larger than 12068?" }, { "from": "gpt", "value": "SELECT Island FROM table WHERE Population > 76 AND Height (m) > 210 AND Area ( ha ) > 12068" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Island, Location, Area ( ha ), Population, Height (m)\n###Question: What is the highest population of Trondra Island in the Scalloway Islands?" }, { "from": "gpt", "value": "SELECT MAX Population FROM table WHERE Location = scalloway islands AND Island = trondra" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: First game, Played, Drawn, Lost, Percentage\n###Question: How many matches were drawn associated with a percentage of 7.14% and more than 12 losses?" }, { "from": "gpt", "value": "SELECT COUNT Drawn FROM table WHERE Percentage = 7.14% AND Lost > 12" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: First game, Played, Drawn, Lost, Percentage\n###Question: Which percentage has a first game before 1997, fewer than 2 losses, and fewer than 5 matches played?" }, { "from": "gpt", "value": "SELECT Percentage FROM table WHERE First game < 1997 AND Lost < 2 AND Played < 5" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: First game, Played, Drawn, Lost, Percentage\n###Question: What is the total number of drawn matches from first game years before 2006 and fewer than 2 matches played?" }, { "from": "gpt", "value": "SELECT SUM Drawn FROM table WHERE First game < 2006 AND Played < 2" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: First game, Played, Drawn, Lost, Percentage\n###Question: What is the highest number of losses associated with 2 matches played, a first game after 1997, and more than 0 draws?" }, { "from": "gpt", "value": "SELECT MAX Lost FROM table WHERE Played = 2 AND First game > 1997 AND Drawn > 0" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Home captain, Away captain, Venue, Result\n###Question: What is the Result of the Test match at the Edgbaston Venue on 5,6,7,8 June 1997?" }, { "from": "gpt", "value": "SELECT Result FROM table WHERE Date = 5,6,7,8 june 1997" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Home captain, Away captain, Venue, Result\n###Question: What is the Date of the Test match of Australia in England at The Oval Venue?" }, { "from": "gpt", "value": "SELECT Date FROM table WHERE Venue = the oval" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Home captain, Away captain, Venue, Result\n###Question: Who was the Away captain for the Test match of Australia in England where the Result was AUS by 264 runs?" }, { "from": "gpt", "value": "SELECT Away captain FROM table WHERE Result = aus by 264 runs" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Home captain, Away captain, Venue, Result\n###Question: Who was the Home captain for the Test match of Australia in England at the Edgbaston Venue?" }, { "from": "gpt", "value": "SELECT Home captain FROM table WHERE Venue = edgbaston" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Title, Production Company, Role, Notes\n###Question: what is the name of the role that has co-protagonist in the notes field and the years of 2008-2009?" }, { "from": "gpt", "value": "SELECT Role FROM table WHERE Notes = co-protagonist AND Year = 2008-2009" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Title, Production Company, Role, Notes\n###Question: What is the name of the role that has a Title of Olvidarte Jamas?" }, { "from": "gpt", "value": "SELECT Role FROM table WHERE Title = olvidarte jamas" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Title, Production Company, Role, Notes\n###Question: Which production company has the year of 2005 listed?" }, { "from": "gpt", "value": "SELECT Production Company FROM table WHERE Year = 2005" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Title, Production Company, Role, Notes\n###Question: What is the name of the role that has a Title of Salud, Dinero y Amor and antagonist in the notes field?" }, { "from": "gpt", "value": "SELECT Role FROM table WHERE Notes = antagonist AND Title = salud, dinero y amor" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Title, Production Company, Role, Notes\n###Question: What is the name of the production company that has a year of 2008-2009?" }, { "from": "gpt", "value": "SELECT Production Company FROM table WHERE Year = 2008-2009" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Name, Years, Gender, Area, Authority, Decile, Roll\n###Question: What is the Authority for Kuranui Primary School that is located in the Area of Tirau?" }, { "from": "gpt", "value": "SELECT Authority FROM table WHERE Area = tirau AND Name = kuranui primary school" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Name, Years, Gender, Area, Authority, Decile, Roll\n###Question: Which Names have Deciles larger than 7?" }, { "from": "gpt", "value": "SELECT Name FROM table WHERE Decile > 7" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Name, Years, Gender, Area, Authority, Decile, Roll\n###Question: What Gender are the schools that have a Roll of 135?" }, { "from": "gpt", "value": "SELECT Gender FROM table WHERE Roll = 135" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Name, Years, Gender, Area, Authority, Decile, Roll\n###Question: What is the Name of a state Authority that has a Roll of 72?" }, { "from": "gpt", "value": "SELECT Name FROM table WHERE Authority = state AND Roll = 72" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Venue, Score, Result, Competition\n###Question: Which friendly competition took place on 19 April 1979?" }, { "from": "gpt", "value": "SELECT Score FROM table WHERE Competition = friendly AND Date = 19 april 1979" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Team 1, Agg., Team 2, 1st leg, 2nd leg\n###Question: Which Team 1 has a first leg of 1-0 and a second leg of 0-2?" }, { "from": "gpt", "value": "SELECT Team 1 FROM table WHERE 1st leg = 1-0 AND 2nd leg = 0-2" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Team 1, Agg., Team 2, 1st leg, 2nd leg\n###Question: Which Team 1 faced Dynamos FC?" }, { "from": "gpt", "value": "SELECT Team 1 FROM table WHERE Team 2 = dynamos fc" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Team 1, Agg., Team 2, 1st leg, 2nd leg\n###Question: What is Team 1 Al-Hilal's Agg.?" }, { "from": "gpt", "value": "SELECT Agg. FROM table WHERE Team 1 = al-hilal" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Team 1, Agg., Team 2, 1st leg, 2nd leg\n###Question: What Team 2 has a second leg of 1-0?" }, { "from": "gpt", "value": "SELECT Team 2 FROM table WHERE 2nd leg = 1-0" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Team 1, Agg., Team 2, 1st leg, 2nd leg\n###Question: What Team 2 has a second leg of 3-1?" }, { "from": "gpt", "value": "SELECT Team 2 FROM table WHERE 2nd leg = 3-1" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Opponent, Score, Loss, Record\n###Question: Which record happened on the date of May 7?" }, { "from": "gpt", "value": "SELECT Record FROM table WHERE Date = may 7" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Tournament, Surface, Opponent in the final, Score\n###Question: Which tournament had Lubomira Bacheva as the opponent in the final?" }, { "from": "gpt", "value": "SELECT Tournament FROM table WHERE Opponent in the final = lubomira bacheva" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Tournament, Surface, Opponent in the final, Score\n###Question: Who was the opponent in the final on 5 July 1992?" }, { "from": "gpt", "value": "SELECT Opponent in the final FROM table WHERE Date = 5 july 1992" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Tournament, Surface, Opponent in the final, Score\n###Question: What is the date of the tournament where Kyoko Nagatsuka was the opponent in the final?" }, { "from": "gpt", "value": "SELECT Date FROM table WHERE Opponent in the final = kyoko nagatsuka" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Tournament, Surface, Opponent in the final, Score\n###Question: What is the surface at the tournament of Vaihingen?" }, { "from": "gpt", "value": "SELECT Surface FROM table WHERE Tournament = vaihingen" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Tournament, Surface, Opponent in the final, Score\n###Question: What was the surface of the tournament where Anna Benzon was the opponent in the final?" }, { "from": "gpt", "value": "SELECT Surface FROM table WHERE Opponent in the final = anna benzon" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, League, Position, Goals +/-, Points\n###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?" }, { "from": "gpt", "value": "SELECT AVG Position FROM table WHERE Points < 13 AND Goals +/- > -12" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Place, Player, Country, Score, To par, Money ( $ )\n###Question: What is the to par for the player who had a score of 70-72-70-69=281?" }, { "from": "gpt", "value": "SELECT To par FROM table WHERE Score = 70-72-70-69=281" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Start, Qual, Rank, Finish, Laps\n###Question: What year had the qual of totals" }, { "from": "gpt", "value": "SELECT Year FROM table WHERE Qual = totals" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Start, Qual, Rank, Finish, Laps\n###Question: What qual had a finish of 16 in 1968?" }, { "from": "gpt", "value": "SELECT Qual FROM table WHERE Finish = 16 AND Year = 1968" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Start, Qual, Rank, Finish, Laps\n###Question: What was the finish with the start of 25 and a lap larger than 46?" }, { "from": "gpt", "value": "SELECT Finish FROM table WHERE Start = 25 AND Laps > 46" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Start, Qual, Rank, Finish, Laps\n###Question: What was the lowest lap with the ranking of 19?" }, { "from": "gpt", "value": "SELECT MIN Laps FROM table WHERE Start = 19" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Player, Wkts, Runs, Econ, Ovrs\n###Question: Name the least ovrs for wkts of 0" }, { "from": "gpt", "value": "SELECT MIN Ovrs FROM table WHERE Wkts = 0" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Player, Wkts, Runs, Econ, Ovrs\n###Question: Name the average econ for runs more than 703 and ovrs more than 25.5" }, { "from": "gpt", "value": "SELECT AVG Econ FROM table WHERE Ovrs > 25.5 AND Runs > 703" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Class, Vehicle, Position, Stages won\n###Question: What is the average year that has a car that won 0 stages with a position of DNF?" }, { "from": "gpt", "value": "SELECT AVG Year FROM table WHERE Class = car AND Stages won = 0 AND Position = dnf" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Class, Vehicle, Position, Stages won\n###Question: What is the class that that won 2 stages and has a position of DNF?" }, { "from": "gpt", "value": "SELECT Class FROM table WHERE Stages won = 2 AND Position = dnf" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Class, Vehicle, Position, Stages won\n###Question: What position did the BMW vehicle made in 2006 hold?" }, { "from": "gpt", "value": "SELECT Position FROM table WHERE Vehicle = bmw AND Year = 2006" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Builder, Model, Length (ft/m), Order Year, Fuel Propulsion, Fleet Series (Quantity)\n###Question: Which builder has a Fuel Propulsion of diesel, a Model of d40lf, and an Order Year of 2005?" }, { "from": "gpt", "value": "SELECT Builder FROM table WHERE Fuel Propulsion = diesel AND Model = d40lf AND Order Year = 2005" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Builder, Model, Length (ft/m), Order Year, Fuel Propulsion, Fleet Series (Quantity)\n###Question: Which model has a Fleet Series (Quantity) of 11081-11092 (12)?" }, { "from": "gpt", "value": "SELECT Model FROM table WHERE Fleet Series (Quantity) = 11081-11092 (12)" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Builder, Model, Length (ft/m), Order Year, Fuel Propulsion, Fleet Series (Quantity)\n###Question: Which order year has a Fleet Series (Quantity) of 12081-12090 (10)?" }, { "from": "gpt", "value": "SELECT Order Year FROM table WHERE Fleet Series (Quantity) = 12081-12090 (10)" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Builder, Model, Length (ft/m), Order Year, Fuel Propulsion, Fleet Series (Quantity)\n###Question: Which Fleet Series (Quantity) that has a Builder of mci, and an Order Year of 2002?" }, { "from": "gpt", "value": "SELECT Fleet Series (Quantity) FROM table WHERE Builder = mci AND Order Year = 2002" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Builder, Model, Length (ft/m), Order Year, Fuel Propulsion, Fleet Series (Quantity)\n###Question: Which Fleet Series (Quantity) has an Order Year of 2010, and a Model of de40lfr?" }, { "from": "gpt", "value": "SELECT Fleet Series (Quantity) FROM table WHERE Order Year = 2010 AND Model = de40lfr" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Builder, Model, Length (ft/m), Order Year, Fuel Propulsion, Fleet Series (Quantity)\n###Question: Which Fuel Propulsion has a Fleet Series (Quantity) of 04001-04125 (125)?" }, { "from": "gpt", "value": "SELECT Fuel Propulsion FROM table WHERE Fleet Series (Quantity) = 04001-04125 (125)" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Name, Years, Gender, Area, Authority, Decile, Roll\n###Question: Name the sum of roll for morrinsville school" }, { "from": "gpt", "value": "SELECT SUM Roll FROM table WHERE Name = morrinsville school" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Name, Years, Gender, Area, Authority, Decile, Roll\n###Question: Name the authority for morrinsville college" }, { "from": "gpt", "value": "SELECT Authority FROM table WHERE Name = morrinsville college" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Name, Years, Gender, Area, Authority, Decile, Roll\n###Question: Name the years when decile was less than 7 for waitoa school" }, { "from": "gpt", "value": "SELECT Years FROM table WHERE Decile < 7 AND Name = waitoa school" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Name, Years, Gender, Area, Authority, Decile, Roll\n###Question: Name the total number of roll for state authority and stanley avenue school with decile more than 5" }, { "from": "gpt", "value": "SELECT COUNT Roll FROM table WHERE Authority = state AND Name = stanley avenue school AND Decile > 5" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Date, Opponent, Score, Loss, Attendance, Record\n###Question: What was the Blue Jays' record when they played the Royals with an attendance larger than 50,522?" }, { "from": "gpt", "value": "SELECT Record FROM table WHERE Attendance > 50,522 AND Opponent = royals" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Year, Population (Region total), Population (Caloundra), Population (Maroochy), Population (Noosa)\n###Question: What year had a population region total of 63,073 and a population maroochy smaller than 35,266?" }, { "from": "gpt", "value": "SELECT MAX Year FROM table WHERE Population (Region total) = 63,073 AND Population (Maroochy) < 35,266" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Rider, Manufacturer, Laps, Time/Retired, Grid\n###Question: What is the grid total associated with 18 laps?" }, { "from": "gpt", "value": "SELECT COUNT Grid FROM table WHERE Laps = 18" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Rider, Manufacturer, Laps, Time/Retired, Grid\n###Question: What rider is on an aprilia that went under 18 laps with a grid total of 17?" }, { "from": "gpt", "value": "SELECT Rider FROM table WHERE Manufacturer = aprilia AND Laps < 18 AND Grid = 17" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Rider, Manufacturer, Laps, Time/Retired, Grid\n###Question: What is the Manufacturer for simone corsi?" }, { "from": "gpt", "value": "SELECT Manufacturer FROM table WHERE Rider = simone corsi" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Rider, Manufacturer, Laps, Time/Retired, Grid\n###Question: What is the grid total associated with a Time/Retired of +33.634, and a Laps smaller than 19?" }, { "from": "gpt", "value": "SELECT MIN Grid FROM table WHERE Time/Retired = +33.634 AND Laps < 19" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Model/Engine, Capacity, Cylinders/Valves, Power/rpm, Torque (Nm)/rpm\n###Question: Tell me the power when the torque is n·m (lb·ft)/*n·m (lb·ft) @1750" }, { "from": "gpt", "value": "SELECT Power/rpm FROM table WHERE Torque (Nm)/rpm = n·m (lb·ft)/*n·m (lb·ft) @1750" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Model/Engine, Capacity, Cylinders/Valves, Power/rpm, Torque (Nm)/rpm\n###Question: Name the capacity for the engine of 2.0 duratorq" }, { "from": "gpt", "value": "SELECT Capacity FROM table WHERE Model/Engine = 2.0 duratorq" } ]
[ { "from": "human", "value": "Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. \n###Database Schema: Model/Engine, Capacity, Cylinders/Valves, Power/rpm, Torque (Nm)/rpm\n###Question: Name the capacity for the torque of n·m (lb·ft) @4150" }, { "from": "gpt", "value": "SELECT Capacity FROM table WHERE Torque (Nm)/rpm = n·m (lb·ft) @4150" } ]