Chinastark/bird_dataset huggingface dataset:
Database: formula_1
Note: born from 1980-1990 refers to year(dob) between 1980 and 1990; earliest lap time refers to Min(time);
Question: List out top 3 German drivers who were born from 1980-1990 and have the earliest lap time.
SQL: SELECT drivers.driverid FROM pitstops INNER JOIN drivers ON pitstops.driverid = drivers.driverid WHERE drivers.nationality = 'German' AND strftime('%Y', drivers.dob) BETWEEN '1980' AND '1990' ORDER BY pitstops.time LIMIT 3
Database: formula_1
Note: oldest refers to MIN(year(dob)); reference names appear in drverRef.;
Question: Please state the reference name of the oldest German driver.
SQL: SELECT driverref FROM drivers WHERE nationality = 'German' ORDER BY julianday(dob) ASC LIMIT 1
Database: formula_1
Note: born in 1971 refers to year(dob) = 1971; has the fastest lap time refers to fastestlaptime has values;
Question: Which drivers who were born in 1971 and has the fastest lap time on the race? Give id and code of these drivers.
SQL: SELECT drivers.driverid, drivers.code FROM results INNER JOIN drivers ON results.driverid = drivers.driverid WHERE strftime('%Y', drivers.dob) = '1971' AND results.fastestlaptime IS NOT NULL
Database: formula_1
Note: born before 1982 refers to year(dob) < 1982; latest lap time refers to Max(time);
Question: List out top 10 Spanish drivers who were born before 1982 and have the latest lap time.
SQL: SELECT drivers.driverid FROM pitstops INNER JOIN drivers ON pitstops.driverid = drivers.driverid WHERE drivers.nationality = 'Spanish' AND strftime('%Y', drivers.dob) < '1982' ORDER BY pitstops.time DESC LIMIT 10
Database: formula_1
Note: 'has the fastest lap time?' refers to fastestlaptime has values;
Question: State the racing year which has the fastest lap time?
SQL: SELECT races.year FROM results INNER JOIN races ON results.raceid = races.raceid WHERE results.fastestlaptime IS NOT NULL
Database: formula_1
Note: lowest speed of lap time refers to Max(time);
Question: Which year has the lowest speed of lap time?
SQL: SELECT races.year FROM laptimes INNER JOIN races ON laptimes.raceid = races.raceid ORDER BY laptimes.time DESC LIMIT 1
Database: formula_1
Note: fastest time refers to Min(time);
Question: List the driver's ID of the top five driver, by descending order, the fastest time during the first lap of the race.
SQL: SELECT driverid FROM laptimes WHERE lap = 1 ORDER BY TIME LIMIT 5
Database: formula_1
Note: disqualified refers to statusid = 2, finisher refers to time! = null; race no. refers to raceid; raceid > 50 and raceid < 100;
Question: From race no. 50 to 100, how many finishers have been disqualified?
SQL: SELECT sum(iif(TIME IS NOT NULL, 1, 0)) FROM results WHERE statusid = 2 AND raceid < 100 AND raceid > 50
Database: formula_1
Note: location coordinates refers to (lat,lng); Austria refers to country = 'Austria';
Question: How many times the circuits were held in Austria? Please give their location and coordinates.
SQL: SELECT DISTINCT LOCATION, lat, lng FROM circuits WHERE country = 'Austria'
Database: formula_1
Note: finisher refers to time is not null;
Question: What race number has the most finishers?
SQL: SELECT raceid FROM results GROUP BY raceid ORDER BY count(TIME IS NOT NULL) DESC LIMIT 1
Database: formula_1
Note: passed the second qualifying lap refers to q2 is not null; birthday refers to dob; reference name of drivers refers to driverref; race no. refers to raceid;
Question: List the reference name of the drivers who passed the second qualifying lap during race no. 23. Indicate their nationality and birthday.
SQL: SELECT drivers.driverref, drivers.nationality, drivers.dob FROM qualifying INNER JOIN drivers ON qualifying.driverid = drivers.driverid WHERE qualifying.raceid = 23 AND qualifying.q2 IS NOT NULL
Database: formula_1
Note: date of birth refers to drivers.dob; The larger the birthday value, the younger the person is, and vice versa; first qualifying race refers to MIN(races.date);
Question: On what year did the youngest driver had his first qualifying race? Also state the name, date and time of the race.
SQL: SELECT races.year, races.name, races.date, races.time FROM qualifying INNER JOIN drivers ON qualifying.driverid = drivers.driverid INNER JOIN races ON qualifying.raceid = races.raceid WHERE qualifying.driverid = ( SELECT driverid FROM drivers ORDER BY dob DESC LIMIT 1 ) ORDER BY races.date ASC LIMIT 1
Database: formula_1
Note: puncture status refers to status = Puncture;
Question: How many American drivers have puncture status.
SQL: SELECT count(drivers.driverid) FROM drivers INNER JOIN results ON drivers.driverid = results.driverid INNER JOIN status ON results.statusid = status.statusid WHERE status.status = 'Puncture' AND drivers.nationality = 'American'
Database: formula_1
Note: introduction website refers to url; Italian is a nationality;
Question: Which of the Italian constructor got the highest point to date? Give its introduction website?
SQL: SELECT constructors.url FROM constructors INNER JOIN constructorstandings ON constructors.constructorid = constructorstandings.constructorid WHERE constructors.nationality = 'Italian' ORDER BY constructorstandings.points DESC LIMIT 1
Database: formula_1
Note: introduction website refers to url;
Question: What is the website of the constructor who tallied the most total wins.
SQL: SELECT constructors.url FROM constructors INNER JOIN constructorstandings ON constructors.constructorid = constructorstandings.constructorid ORDER BY constructorstandings.wins DESC LIMIT 1
Database: formula_1
Note: slowest time refers to Max(time);
Question: Among the drivers who participated in the French Grand Prix, who has the slowest time in the 3rd lap.
SQL: SELECT laptimes.driverid FROM laptimes INNER JOIN races ON laptimes.raceid = races.raceid WHERE races.name = 'French Grand Prix' AND laptimes.lap = 3 ORDER BY laptimes.time DESC LIMIT 1
Database: formula_1
Note: fastest refers to Min(time);
Question: In which race did the fastest 1st lap time was recorded? Please indicate the time in milliseconds.
SQL: SELECT laptimes.milliseconds FROM laptimes INNER JOIN races ON laptimes.raceid = races.raceid WHERE laptimes.lap = 1 ORDER BY laptimes.time LIMIT 1
Database: formula_1
Note: top 10 refers to rank <11; AVG(fastestlaptime);
Question: What is the average fastest lap time of the top 10 drivers in the 2006 United States Grand Prix?
SQL: SELECT avg(results.fastestlaptime) FROM results INNER JOIN races ON results.raceid = races.raceid WHERE results.rank < 11 AND races.year = 2006 AND races.name = 'United States Grand Prix'
Database: formula_1
Note: Full name of the driver refers to drivers.forename and drivers.surname; born between 1980-1985 refers to 1980< year(dob)>1985; Average pitstop duration refers to Divide(SUM(duration),COUNT(duration)); shortest average refers to Min(avg(duration));
Question: List down top 3 German drivers who has the shortest average pit stop duration and were born between 1980-1985.
SQL: SELECT drivers.forename, drivers.surname FROM pitstops INNER JOIN drivers ON pitstops.driverid = drivers.driverid WHERE drivers.nationality = 'German' AND strftime('%Y', drivers.dob) BETWEEN '1980' AND '1985' GROUP BY drivers.forename, drivers.surname ORDER BY avg(pitstops.duration) LIMIT 3
Database: formula_1
Note: Only the time of the champion shows in the format of "hour: minutes: seconds.millionsecond";
Question: Who is the champion of the Canadian Grand Prix in 2008? Indicate his finish time.
SQL: SELECT results.time FROM results INNER JOIN races ON results.raceid = races.raceid WHERE races.name = 'Canadian Grand Prix' AND races.year = 2008 AND results.time LIKE '_:%:__.___'
Database: formula_1
Note: the time of the champion shows in the format of "minutes: seconds.millionsecond" in which Max(time); constructor reference name refers to constructorref; website refers to url;
Question: What is the constructor reference name of the champion in the 2009 Singapore Grand Prix? Please give its website.
SQL: SELECT constructors.constructorref, constructors.url FROM results INNER JOIN races ON results.raceid = races.raceid INNER JOIN constructors ON results.constructorid = constructors.constructorid WHERE races.name = 'Singapore Grand Prix' AND races.year = 2009 AND results.time LIKE '_:%:__.___'
Database: formula_1
Note: Full name refers to forname, surname; date of birth refers to dob; year(dob) BETWEEN '1981' AND '1991'; Austrian is a nationality;
Question: What is the full name and date of birth of Austrian drivers born between 1981 and 1991?
SQL: SELECT forename, surname, dob FROM drivers WHERE nationality = 'Austrian' AND strftime('%Y', dob) BETWEEN '1981' AND '1991'
Database: formula_1
Note: FFull name refers to forname+surname; nationality refers to German; date of birth refers to dob; year(dob) BETWEEN '1971' AND '1985';
Question: Find the full name, Wiki Pedia page link, and date of birth of German drivers born between 1971 and 1985. List it in descending order of date of birth.
SQL: SELECT forename, surname, url, dob FROM drivers WHERE nationality = 'German' AND strftime('%Y', dob) BETWEEN '1971' AND '1985' ORDER BY dob DESC
Database: formula_1
Note: coordinates expressed in latitude and longitude refers to (lat, lng);
Question: In which location does the Hungaroring circuit located? Also, find the country and coordinates of this circuit?
SQL: SELECT country, lat, lng FROM circuits WHERE name = 'Hungaroring'
Database: formula_1
Note: Monaco Grand Priz refers to the race; race in year between 1980 and 2010;
Question: Which constructor scored most points from Monaco Grand Prix between 1980 and 2010? List the score, name and nationality of this team.
SQL: SELECT sum(constructorresults.points), constructors.name, constructors.nationality FROM constructorresults INNER JOIN constructors ON constructorresults.constructorid = constructors.constructorid INNER JOIN races ON races.raceid = constructorresults.raceid WHERE races.name = 'Monaco Grand Prix' AND races.year BETWEEN 1980 AND 2010 GROUP BY constructors.name ORDER BY sum(constructorresults.points) DESC LIMIT 1
Database: formula_1
Note: Average score = AVG(points);
Question: What is the average score of Lewis Hamilton among all the Turkish Grand Prix?
SQL: SELECT avg(driverstandings.points) FROM drivers INNER JOIN driverstandings ON drivers.driverid = driverstandings.driverid INNER JOIN races ON races.raceid = driverstandings.raceid WHERE drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton' AND races.name = 'Turkish Grand Prix'
Database: formula_1
Note: races in date between '2000-01-01' and '2010-12-31';
Question: What is the annual average number of races held during the first 10 years of the 21st century?
SQL: SELECT cast(sum(CASE WHEN YEAR BETWEEN 2000 AND 2010 THEN 1 ELSE 0 END) AS REAL) / 10 FROM races WHERE date BETWEEN '2000-01-01' AND '2010-12-31'
Database: formula_1
Note: Citizenship of majority of drivers = MAX(nationality); citizenship and nationality are synonyms;
Question: Which citizenship do the vast majority of the drivers hold?
SQL: SELECT nationality FROM drivers GROUP BY nationality ORDER BY count(driverid) DESC LIMIT 1
Database: formula_1
Note: victories refer to wins; 91st refers to points;
Question: In terms of number of points acquired, how many victories did the driver who ranked 91st acquired?
SQL: SELECT sum(CASE WHEN points = 91 THEN wins ELSE 0 END) FROM driverstandings
Database: formula_1
Note: Fastest lap speed refers to MIN(fastestlaptime);
Question: In terms of the fastest lap time, what is the name of the race which recorded the fastest lap speed by a racer?
SQL: SELECT races.name FROM races INNER JOIN results ON races.raceid = results.raceid WHERE results.fastestlaptime IS NOT NULL ORDER BY results.fastestlaptime ASC LIMIT 1
Database: formula_1
Note: full location refers to location+country; most recent race = MAX(date);
Question: Which racetrack hosted the most recent race? Indicate the full location.
SQL: SELECT circuits.location FROM circuits INNER JOIN races ON circuits.circuitid = races.circuitid ORDER BY races.date DESC LIMIT 1
Database: formula_1
Note: ranked 1st in the 3rd qualifying race refer to MIN(q3); 2008 is the year of race; full name of racer = forename, surname;
Question: What is full name of the racer who ranked 1st in the 3rd qualifying race held in the Marina Bay Street Circuit in 2008?
SQL: SELECT drivers.forename, drivers.surname FROM qualifying INNER JOIN drivers ON qualifying.driverid = drivers.driverid INNER JOIN races ON qualifying.raceid = races.raceid WHERE q3 IS NOT NULL AND races.year = 2008 AND races.circuitid IN ( SELECT circuitid FROM circuits WHERE name = 'Marina Bay Street Circuit' ) ORDER BY cast(substr(q3, 1, instr(q3, ':') - 1) AS INTEGER) * 60 + cast(substr(q3, instr(q3, ':') + 1, instr(q3, '.') - instr(q3, ':') - 1) AS REAL) + cast(substr(q3, instr(q3, '.') + 1) AS REAL) / 1000 ASC LIMIT 1
Database: formula_1
Note: full name refers to forename+surname; Youngest racer = MAX(dob);
Question: As of the present, what is the full name of the youngest racer? Indicate her nationality and the name of the race to which he/she first joined.
SQL: SELECT drivers.forename, drivers.surname, drivers.nationality, races.name FROM drivers INNER JOIN driverstandings ON drivers.driverid = driverstandings.driverid INNER JOIN races ON driverstandings.raceid = races.raceid ORDER BY julianday(drivers.dob) DESC LIMIT 1
Database: formula_1
Note: number of accidents refers to the number where statusid = 3; Canadian Grand Prix refers to the race of name;
Question: How many accidents did the driver who had the highest number accidents in the Canadian Grand Prix have?
SQL: SELECT count(results.driverid) FROM results INNER JOIN races ON results.raceid = races.raceid INNER JOIN status ON results.statusid = status.statusid WHERE status.statusid = 3 AND races.name = 'Canadian Grand Prix' GROUP BY results.driverid ORDER BY count(results.driverid) DESC LIMIT 1
Database: formula_1
Note: oldest racer refers to MIN(dob); full name refers to forename, surname.;
Question: How many wins was achieved by the oldest racer? Indicate his/her full name.
SQL: SELECT sum(driverstandings.wins),drivers.forename, drivers.surname FROM driverstandings INNER JOIN drivers ON driverstandings.driverid = drivers.driverid ORDER BY drivers.dob ASC LIMIT 1
Database: formula_1
Note: longest time spent at pitstop refers to MAX(duration);
Question: What was the longest time a driver had ever spent at a pit stop?
SQL: SELECT duration FROM pitstops ORDER BY duration DESC LIMIT 1
Database: formula_1
Question: Among all the lap records set on various circuits, what is the time for the fastest one?
SQL: SELECT TIME FROM laptimes ORDER BY (CASE WHEN instr(TIME, ':') <> instr(substr(TIME, instr(TIME, ':') + 1), ':') + instr(TIME, ':') THEN cast(substr(TIME, 1, instr(TIME, ':') - 1) AS REAL) * 3600 ELSE 0 END) + (cast(substr(TIME, instr(TIME, ':') - 2 * (instr(TIME, ':') = instr(substr(TIME, instr(TIME, ':') + 1), ':') + instr(TIME, ':')), instr(TIME, ':') - 1) AS REAL) * 60) + (cast(substr(TIME, instr(TIME, ':') + 1, instr(TIME, '.') - instr(TIME, ':') - 1) AS REAL)) + (cast(substr(TIME, instr(TIME, '.') + 1) AS REAL) / 1000) ASC LIMIT 1
Database: formula_1
Note: longest time refes to MAX(duration);
Question: What was the longest time that Lewis Hamilton had spent at a pit stop?
SQL: SELECT pitstops.duration FROM pitstops INNER JOIN drivers ON pitstops.driverid = drivers.driverid WHERE drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton' ORDER BY pitstops.duration DESC LIMIT 1
Database: formula_1
Question: During which lap did Lewis Hamilton take a pit stop during the 2011 Australian Grand Prix?
SQL: SELECT pitstops.lap FROM pitstops INNER JOIN drivers ON pitstops.driverid = drivers.driverid INNER JOIN races ON pitstops.raceid = races.raceid WHERE drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton' AND races.year = 2011 AND races.name = 'Australian Grand Prix'
Database: formula_1
Note: time spent at pit stop refers to duration;
Question: Please list the time each driver spent at the pit stop during the 2011 Australian Grand Prix.
SQL: SELECT pitstops.duration FROM pitstops INNER JOIN races ON pitstops.raceid = races.raceid WHERE races.year = 2011 AND races.name = 'Australian Grand Prix'
Database: formula_1
Note: lap recod means the fastest time recorded which refers to time;
Question: What is the lap record set by Lewis Hamilton in a Formula_1 race?
SQL: SELECT laptimes.time FROM laptimes INNER JOIN drivers ON laptimes.driverid = drivers.driverid WHERE drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton'
Database: formula_1
Note: shortest lap time refers to MIN(time); the time format for the shortest lap time is 'MM:SS.mmm' or 'M:SS.mmm'; full name of the driver refers to forename, surname;
Question: Which top 20 driver created the shortest lap time ever record in a Formula_1 race? Please give them full names.
SQL: WITH lap_times_in_seconds AS (SELECT driverid, (CASE WHEN substr(TIME, 1, instr(TIME, ':') - 1) <> '' THEN cast(substr(TIME, 1, instr(TIME, ':') - 1) AS REAL) * 60 ELSE 0 END + CASE WHEN substr(TIME, instr(TIME, ':') + 1, instr(TIME, '.') - instr(TIME, ':') - 1) <> '' THEN cast(substr(TIME, instr(TIME, ':') + 1, instr(TIME, '.') - instr(TIME, ':') - 1) AS REAL) ELSE 0 END + CASE WHEN substr(TIME, instr(TIME, '.') + 1) <> '' THEN cast(substr(TIME, instr(TIME, '.') + 1) AS REAL) / 1000 ELSE 0 END) AS time_in_seconds FROM laptimes) SELECT drivers.forename, drivers.surname, t1.driverid FROM (SELECT driverid, min(time_in_seconds) AS min_time_in_seconds FROM lap_times_in_seconds GROUP BY driverid) AS t1 INNER JOIN drivers ON t1.driverid = drivers.driverid ORDER BY t1.min_time_in_seconds ASC LIMIT 20
Database: formula_1
Note: fastest lap refers to MIN(time);
Question: What was the position of the circuits during Lewis Hamilton's fastest lap in a Formula_1 race?
SQL: SELECT laptimes.position FROM laptimes INNER JOIN drivers ON laptimes.driverid = drivers.driverid WHERE drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton' ORDER BY laptimes.time ASC LIMIT 1
Database: formula_1
Note: lap record means the fastest time recorded which refers to time;
Question: What is the lap record for the Austrian Grand Prix Circuit?
SQL: WITH fastest_lap_times AS ( SELECT results.raceid, results.fastestlaptime FROM results WHERE results.fastestlaptime IS NOT NULL) SELECT min(fastest_lap_times.fastestlaptime) AS lap_record FROM fastest_lap_times INNER JOIN races ON fastest_lap_times.raceid = races.raceid INNER JOIN circuits ON races.circuitid = circuits.circuitid WHERE races.name = 'Austrian Grand Prix'
Database: formula_1
Note: lap record means the fastest time recorded which refers to time;
Question: Please list the lap records for the circuits in Italy.
SQL: WITH fastest_lap_times AS (SELECT results.raceid, results.fastestlaptime, (cast(substr(results.fastestlaptime, 1, instr(results.fastestlaptime, ':') - 1) AS REAL) * 60) + (cast(substr(results.fastestlaptime, instr(results.fastestlaptime, ':') + 1, instr(results.fastestlaptime, '.') - instr(results.fastestlaptime, ':') - 1) AS REAL)) + (cast(substr(results.fastestlaptime, instr(results.fastestlaptime, '.') + 1) AS REAL) / 1000) AS time_in_seconds FROM results WHERE results.fastestlaptime IS NOT NULL ) SELECT results.fastestlaptime AS lap_record FROM results INNER JOIN races ON results.raceid = races.raceid INNER JOIN circuits ON races.circuitid = circuits.circuitid INNER JOIN (SELECT min(fastest_lap_times.time_in_seconds) AS min_time_in_seconds FROM fastest_lap_times INNER JOIN races ON fastest_lap_times.raceid = races.raceid INNER JOIN circuits ON races.circuitid = circuits.circuitid WHERE circuits.country = 'Italy' ) AS t4 ON (cast(substr(results.fastestlaptime, 1, instr(results.fastestlaptime, ':') - 1) AS REAL) * 60) + (cast(substr(results.fastestlaptime, instr(results.fastestlaptime, ':') + 1, instr(results.fastestlaptime, '.') - instr(results.fastestlaptime, ':') - 1) AS REAL)) + (cast(substr(results.fastestlaptime, instr(results.fastestlaptime, '.') + 1) AS REAL) / 1000) = t4.min_time_in_seconds LIMIT 1
Database: formula_1
Note: lap record means the fastest time recorded which refers to time;
Question: In which Formula_1 race was the lap record for the Austrian Grand Prix Circuit set?
SQL: WITH fastest_lap_times AS ( SELECT results.raceid, results.fastestlaptime, (cast(substr(results.fastestlaptime, 1, instr(results.fastestlaptime, ':') - 1) AS REAL) * 60) + (cast(substr(results.fastestlaptime, instr(results.fastestlaptime, ':') + 1, instr(results.fastestlaptime, '.') - instr(results.fastestlaptime, ':') - 1) AS REAL)) + (cast(substr(results.fastestlaptime, instr(results.fastestlaptime, '.') + 1) AS REAL) / 1000) AS time_in_seconds FROM results WHERE results.fastestlaptime IS NOT NULL ) SELECT races.name FROM races INNER JOIN circuits ON races.circuitid = circuits.circuitid INNER JOIN results ON races.raceid = results.raceid INNER JOIN ( SELECT min(fastest_lap_times.time_in_seconds) AS min_time_in_seconds FROM fastest_lap_times INNER JOIN races ON fastest_lap_times.raceid = races.raceid INNER JOIN circuits ON races.circuitid = circuits.circuitid WHERE races.name = 'Austrian Grand Prix') AS t4 ON (cast(substr(results.fastestlaptime, 1, instr(results.fastestlaptime, ':') - 1) AS REAL) * 60) + (cast(substr(results.fastestlaptime, instr(results.fastestlaptime, ':') + 1, instr(results.fastestlaptime, '.') - instr(results.fastestlaptime, ':') - 1) AS REAL)) + (cast(substr(results.fastestlaptime, instr(results.fastestlaptime, '.') + 1) AS REAL) / 1000) = t4.min_time_in_seconds WHERE races.name = 'Austrian Grand Prix'
Database: formula_1
Note: lap record means the fastest time recorded which refers to time, how long spent at pitstop refers to duration;
Question: In the race a driver set the lap record for the Austrian Grand Prix Circuit, how long did he spent at the pit stop at that same race?
SQL: WITH fastest_lap_times AS ( SELECT results.raceid, results.driverid, results.fastestlaptime, (cast(substr(results.fastestlaptime, 1, instr(results.fastestlaptime, ':') - 1) AS REAL) * 60) + (cast(substr(results.fastestlaptime, instr(results.fastestlaptime, ':') + 1, instr(results.fastestlaptime, '.') - instr(results.fastestlaptime, ':') - 1) AS REAL)) + (cast(substr(results.fastestlaptime, instr(results.fastestlaptime, '.') + 1) AS REAL) / 1000) AS time_in_seconds FROM results WHERE results.fastestlaptime IS NOT NULL), lap_record_race AS ( SELECT results.raceid, results.driverid FROM results INNER JOIN races ON results.raceid = races.raceid INNER JOIN circuits ON races.circuitid = circuits.circuitid INNER JOIN ( SELECT min(fastest_lap_times.time_in_seconds) AS min_time_in_seconds FROM fastest_lap_times INNER JOIN races ON fastest_lap_times.raceid = races.raceid INNER JOIN circuits ON races.circuitid = circuits.circuitid WHERE races.name = 'Austrian Grand Prix') ON (cast(substr(results.fastestlaptime, 1, instr(results.fastestlaptime, ':') - 1) AS REAL) * 60) + (cast(substr(results.fastestlaptime, instr(results.fastestlaptime, ':') + 1, instr(results.fastestlaptime, '.') - instr(results.fastestlaptime, ':') - 1) AS REAL)) + (cast(substr(results.fastestlaptime, instr(results.fastestlaptime, '.') + 1) AS REAL) / 1000) = pitstops.min_time_in_seconds WHERE races.name = 'Austrian Grand Prix') SELECT pitstops.duration FROM lap_record_race INNER JOIN pitstops ON lap_record_race.raceid = pitstops.raceid AND lap_record_race.driverid = pitstops.driverid
Database: formula_1
Note: lap records means the fastest time recorded which refers to time; coordinates are expressed as latitude and longitude which refers to (lat, lng);
Question: Please list the location coordinates of the circuits whose lap record is 1:29.488.
SQL: SELECT circuits.lat, circuits.lng FROM laptimes INNER JOIN races ON laptimes.raceid = races.raceid INNER JOIN circuits ON races.circuitid = circuits.circuitid WHERE laptimes.time = '1:29.488'
Database: formula_1
Note: average time in milliseconds spent at pit stop refers to AVG(milliseconds);
Question: What was the average time in milliseconds Lewis Hamilton spent at a pit stop during Formula_1 races?
SQL: SELECT avg(milliseconds) FROM pitstops INNER JOIN drivers ON pitstops.driverid = drivers.driverid WHERE drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton'