db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
superhero
select full_name from superhero where superhero_name = 'alien'
Question: provide the full name of the superhero named alien. | Tables: alignment -> id, alignment. attribute -> id, attribute_name. colour -> id, colour. gender -> id, gender. publisher -> id, publisher_name. race -> id, race. superhero -> id, superhero_name, full_name, gender_id, eye_colour_id, hair_colour_id, skin_c...
provide the full name of the superhero named alien.
superhero
select t1.full_name from superhero as t1 inner join colour as t2 on t1.eye_colour_id = t2.id where t1.weight_kg < 100 and t2.colour = 'brown'
Question: in superheroes with weight less than 100, list the full name of the superheroes with brown eyes. | Tables: alignment -> id, alignment. attribute -> id, attribute_name. colour -> id, colour. gender -> id, gender. publisher -> id, publisher_name. race -> id, race. superhero -> id, superhero_name, full_name, gen...
in superheroes with weight less than 100, list the full name of the superheroes with brown eyes.
superhero
select t2.attribute_value from superhero as t1 inner join hero_attribute as t2 on t1.id = t2.hero_id where t1.superhero_name = 'aquababy'
Question: list the attribute value of the superhero named aquababy. | Tables: alignment -> id, alignment. attribute -> id, attribute_name. colour -> id, colour. gender -> id, gender. publisher -> id, publisher_name. race -> id, race. superhero -> id, superhero_name, full_name, gender_id, eye_colour_id, hair_colour_id, ...
list the attribute value of the superhero named aquababy.
superhero
select t1.weight_kg, t2.race from superhero as t1 inner join race as t2 on t1.race_id = t2.id where t1.id = 40
Question: provide the weight and race of the superhero with superhero id 40. | Tables: alignment -> id, alignment. attribute -> id, attribute_name. colour -> id, colour. gender -> id, gender. publisher -> id, publisher_name. race -> id, race. superhero -> id, superhero_name, full_name, gender_id, eye_colour_id, hair_co...
provide the weight and race of the superhero with superhero id 40.
superhero
select avg(t1.height_cm) from superhero as t1 inner join alignment as t2 on t1.alignment_id = t2.id where t2.alignment = 'neutral'
Question: calculate the average height of all neutral superheroes. | Tables: alignment -> id, alignment. attribute -> id, attribute_name. colour -> id, colour. gender -> id, gender. publisher -> id, publisher_name. race -> id, race. superhero -> id, superhero_name, full_name, gender_id, eye_colour_id, hair_colour_id, s...
calculate the average height of all neutral superheroes.
superhero
select t1.hero_id from hero_power as t1 inner join superpower as t2 on t1.power_id = t2.id where t2.power_name = 'intelligence'
Question: list the hero id of superheroes have intellegence as their power. | Tables: alignment -> id, alignment. attribute -> id, attribute_name. colour -> id, colour. gender -> id, gender. publisher -> id, publisher_name. race -> id, race. superhero -> id, superhero_name, full_name, gender_id, eye_colour_id, hair_col...
list the hero id of superheroes have intellegence as their power.
superhero
select t2.colour from superhero as t1 inner join colour as t2 on t1.eye_colour_id = t2.id where t1.superhero_name = 'blackwulf'
Question: give the eye colour of blackwulf. | Tables: alignment -> id, alignment. attribute -> id, attribute_name. colour -> id, colour. gender -> id, gender. publisher -> id, publisher_name. race -> id, race. superhero -> id, superhero_name, full_name, gender_id, eye_colour_id, hair_colour_id, skin_colour_id, race_id,...
give the eye colour of blackwulf.
superhero
select t3.power_name from superhero as t1 inner join hero_power as t2 on t1.id = t2.hero_id inner join superpower as t3 on t2.power_id = t3.id where t1.height_cm * 100 > ( select avg(height_cm) from superhero ) * 80
Question: list the power of superheroes with height greater than 80% of the average height of all superheroes. | Tables: alignment -> id, alignment. attribute -> id, attribute_name. colour -> id, colour. gender -> id, gender. publisher -> id, publisher_name. race -> id, race. superhero -> id, superhero_name, full_name,...
list the power of superheroes with height greater than 80% of the average height of all superheroes.
formula_1
select t2.driverref from qualifying as t1 inner join drivers as t2 on t2.driverid = t1.driverid where t1.raceid = 18 order by t1.q1 desc limit 5
Question: please list the reference names of the drivers who are eliminated in the first period in race number 18. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, foren...
please list the reference names of the drivers who are eliminated in the first period in race number 18.
formula_1
select t2.surname from qualifying as t1 inner join drivers as t2 on t2.driverid = t1.driverid where t1.raceid = 19 and t1.q2 is not null order by t1.q2 asc limit 1
Question: what is the surname of the driver with the best lap time in race number 19 in the second period? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, sur...
what is the surname of the driver with the best lap time in race number 19 in the second period?
formula_1
select t2.year from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t1.location = 'shanghai'
Question: please list the year during which the race is held on circuits in shanghai. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationalit...
please list the year during which the race is held on circuits in shanghai.
formula_1
select distinct t1.url from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t1.name = 'circuit de barcelona-catalunya'
Question: where can the introduction of the races held on circuit de barcelona-catalunya be found? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, do...
where can the introduction of the races held on circuit de barcelona-catalunya be found?
formula_1
select distinct t2.name from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t1.country = 'germany'
Question: please give the name of the race held on the circuits in germany. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. st...
please give the name of the race held on the circuits in germany.
formula_1
select distinct t1.position from constructorstandings as t1 inner join constructors as t2 on t2.constructorid = t1.constructorid where t2.name = 'renault'
Question: please list the positions of the circuits built by the constructor renault. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationalit...
please list the positions of the circuits built by the constructor renault.
formula_1
select count(t3.raceid) from circuits as t1 inner join races as t3 on t3.circuitid = t1.circuitid where t1.country not in ( 'bahrain', 'china', 'singapore', 'japan', 'korea', 'turkey', 'uae', 'malaysia', 'spain', 'monaco', 'azerbaijan', 'austria', 'belgium', 'france', 'germany', 'hungary', 'italy', 'uk' ) and t3.year =...
Question: how many races in the year 2010 are held on grand prixs outside asia and europe? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, natio...
how many races in the year 2010 are held on grand prixs outside asia and europe?
formula_1
select distinct t2.name from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t1.country = 'spain'
Question: please give the names of the races held on the circuits in spain. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. st...
please give the names of the races held on the circuits in spain.
formula_1
select distinct t1.lat, t1.lng from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t2.name = 'australian grand prix'
Question: what is the location coordinates of the circuits for australian grand prix? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationalit...
what is the location coordinates of the circuits for australian grand prix?
formula_1
select distinct t1.url from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t1.name = 'sepang international circuit'
Question: where can i find the information about the races held on sepang international circuit? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob,...
where can i find the information about the races held on sepang international circuit?
formula_1
select distinct t2.time from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t1.name = 'sepang international circuit'
Question: please list the time of the races held on sepang international circuit. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, u...
please list the time of the races held on sepang international circuit.
formula_1
select distinct t1.lat, t1.lng, t1.location from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t2.name = 'abu dhabi grand prix'
Question: give the coordinate position for abu dhabi grand prix. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -> sta...
give the coordinate position for abu dhabi grand prix.
formula_1
select t2.nationality from constructorresults as t1 inner join constructors as t2 on t2.constructorid = t1.constructorid where t1.raceid = 24 and t1.points = 1
Question: which country is the constructor which got 1 point in the race no. 24 from? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationalit...
which country is the constructor which got 1 point in the race no. 24 from?
formula_1
select t1.q1 from qualifying as t1 inner join drivers as t2 on t2.driverid = t1.driverid where t1.raceid = 354 and t2.forename = 'bruno' and t2.surname = 'senna'
Question: what's bruno senna's q1 result in the qualifying race no. 354? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. statu...
what's bruno senna's q1 result in the qualifying race no. 354?
formula_1
select distinct t2.nationality from qualifying as t1 inner join drivers as t2 on t2.driverid = t1.driverid where t1.raceid = 355 and t1.q2 like '1:40%'
Question: for the driver who had the q2 time as 0:01:40 in the qualifying race no. 355, what is his nationality? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forenam...
for the driver who had the q2 time as 0:01:40 in the qualifying race no. 355, what is his nationality?
formula_1
select t2.number from qualifying as t1 inner join drivers as t2 on t2.driverid = t1.driverid where t1.raceid = 903 and t1.q3 like '1:54%'
Question: what is his number of the driver who finished 0:01:54 in the q3 of qualifying race no.903? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, ...
what is his number of the driver who finished 0:01:54 in the q3 of qualifying race no.903?
formula_1
select count(t3.driverid) from races as t1 inner join results as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid where t1.year = 2007 and t1.name = 'bahrain grand prix' and t2.time is null
Question: for the bahrain grand prix in 2007, how many drivers not finished the game? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationalit...
for the bahrain grand prix in 2007, how many drivers not finished the game?
formula_1
select t2.url from races as t1 inner join seasons as t2 on t2.year = t1.year where t1.raceid = 901
Question: show me the season page of year when the race no. 901 took place. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. st...
show me the season page of year when the race no. 901 took place.
formula_1
select count(t2.driverid) from races as t1 inner join results as t2 on t2.raceid = t1.raceid where t1.date = '2015-11-29' and t2.time is not null
Question: for the race happened on 2015/11/29, how many drivers finished the game? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, ...
for the race happened on 2015/11/29, how many drivers finished the game?
formula_1
select t1.forename, t1.surname from drivers as t1 inner join results as t2 on t2.driverid = t1.driverid where t2.raceid = 592 and t2.time is not null and t1.dob is not null order by t1.dob asc limit 1
Question: for all the drivers who finished the game in race no. 592, who is the oldest? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, national...
for all the drivers who finished the game in race no. 592, who is the oldest?
formula_1
select distinct t2.forename, t2.surname, t2.url from laptimes as t1 inner join drivers as t2 on t2.driverid = t1.driverid where t1.raceid = 161 and t1.time like '1:27%'
Question: who was the player that got the lap time of 0:01:27 in the race no. 161? show his introduction website. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forena...
who was the player that got the lap time of 0:01:27 in the race no. 161? show his introduction website.
formula_1
select t1.nationality from drivers as t1 inner join results as t2 on t2.driverid = t1.driverid where t2.raceid = 933 and t2.fastestlaptime is not null order by t2.fastestlapspeed desc limit 1
Question: for the driver who set the fastest lap speed in race no.933, where does he come from? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, ...
for the driver who set the fastest lap speed in race no.933, where does he come from?
formula_1
select distinct t1.lat, t1.lng from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t2.name = 'malaysian grand prix'
Question: where is malaysian grand prix held? give the location coordinates. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. s...
where is malaysian grand prix held? give the location coordinates.
formula_1
select t2.url from constructorresults as t1 inner join constructors as t2 on t2.constructorid = t1.constructorid where t1.raceid = 9 order by t1.points desc limit 1
Question: for the constructor which got the highest point in the race no. 9 , what is its introduction website? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename...
for the constructor which got the highest point in the race no. 9 , what is its introduction website?
formula_1
select t1.q1 from qualifying as t1 inner join drivers as t2 on t2.driverid = t1.driverid where t1.raceid = 345 and t2.forename = 'lucas' and t2.surname = 'di grassi'
Question: what's lucas di grassi's q1 result in the race no. 345? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -> st...
what's lucas di grassi's q1 result in the race no. 345?
formula_1
select distinct t2.nationality from qualifying as t1 inner join drivers as t2 on t2.driverid = t1.driverid where t1.raceid = 347 and t1.q2 like '1:15%'
Question: for the driver who had the q2 time as 0:01:15 in race no. 347, where is he from? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, natio...
for the driver who had the q2 time as 0:01:15 in race no. 347, where is he from?
formula_1
select t2.code from qualifying as t1 inner join drivers as t2 on t2.driverid = t1.driverid where t1.raceid = 45 and t1.q3 like '1:33%'
Question: in the race no. 45, for the driver who had the q3 time as 0:01:33, what is his abbreviated code? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, sur...
in the race no. 45, for the driver who had the q3 time as 0:01:33, what is his abbreviated code?
formula_1
select t2.time from drivers as t1 inner join results as t2 on t2.driverid = t1.driverid where t2.raceid = 743 and t1.forename = 'bruce' and t1.surname = 'mclaren'
Question: what is the actual finish time for bruce mclaren in the race no.743? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url....
what is the actual finish time for bruce mclaren in the race no.743?
formula_1
select t3.forename, t3.surname from races as t1 inner join results as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid where t1.year = 2006 and t1.name = 'san marino grand prix' and t2.position = 2
Question: who finished second in the san marino grand prix in 2006? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -> ...
who finished second in the san marino grand prix in 2006?
formula_1
select t2.url from races as t1 inner join seasons as t2 on t2.year = t1.year where t1.raceid = 901
Question: show me the season page of year when the race no. 901 took place. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. st...
show me the season page of year when the race no. 901 took place.
formula_1
select count(t2.driverid) from races as t1 inner join results as t2 on t2.raceid = t1.raceid where t1.date = '2015-11-29' and t2.time is not null
Question: for the race happened in 2015/11/29, how many drivers finished the game? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, ...
for the race happened in 2015/11/29, how many drivers finished the game?
formula_1
select t1.forename, t1.surname from drivers as t1 inner join results as t2 on t2.driverid = t1.driverid where t2.raceid = 872 and t2.time is not null order by t1.dob desc limit 1
Question: for all the drivers who finished the game in race no. 872, who is the youngest? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nation...
for all the drivers who finished the game in race no. 872, who is the youngest?
formula_1
select t2.forename, t2.surname from laptimes as t1 inner join drivers as t2 on t2.driverid = t1.driverid where t1.raceid = 348 order by t1.time asc limit 1
Question: who was the driver that got the best lap time in the race no. 348? give his full name. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob,...
who was the driver that got the best lap time in the race no. 348? give his full name.
formula_1
select t1.nationality from drivers as t1 inner join results as t2 on t2.driverid = t1.driverid where t2.fastestlaptime is not null order by t2.fastestlapspeed desc limit 1
Question: for the driver who set the fastest lap speed, what is his nationality? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, ur...
for the driver who set the fastest lap speed, what is his nationality?
formula_1
select (sum(iif(t2.raceid = 853, t2.fastestlapspeed, 0)) - sum(iif(t2.raceid = 854, t2.fastestlapspeed, 0))) * 100 / sum(iif(t2.raceid = 853, t2.fastestlapspeed, 0)) from drivers as t1 inner join results as t2 on t2.driverid = t1.driverid where t1.forename = 'paul' and t1.surname = 'di resta'
Question: paul di resta was in the no. 853 race, what percent faster did he finish in the 853rd race than the next race for the fastest lap speed? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId...
paul di resta was in the no. 853 race, what percent faster did he finish in the 853rd race than the next race for the fastest lap speed?
formula_1
select cast(count(case when t2.time is not null then t2.driverid end) as real) * 100 / count(t2.driverid) from races as t1 inner join results as t2 on t2.raceid = t1.raceid where t1.date = '1983-07-16'
Question: for the drivers who took part in the race in 1983/7/16, what's their race completion rate? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, ...
for the drivers who took part in the race in 1983/7/16, what's their race completion rate?
formula_1
select year from races where name = 'singapore grand prix' order by year asc limit 1
Question: which year was the first singapore grand prix? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -> statusId, s...
which year was the first singapore grand prix?
formula_1
select name from races where year = 2005 order by name desc
Question: how many races were there in 2005? name all the races in descending order. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality...
how many races were there in 2005? name all the races in descending order.
formula_1
select name from races where strftime('%y', date) = ( select strftime('%y', date) from races order by date asc limit 1 ) and strftime('%m', date) = ( select strftime('%m', date) from races order by date asc limit 1 )
Question: name the first race recorded. what are the other races that happened within the same month and year of that race. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, co...
name the first race recorded. what are the other races that happened within the same month and year of that race.
formula_1
select name, date from races where year = 1999 order by round desc limit 1
Question: state the name and date of the last round of race in year 1999. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. stat...
state the name and date of the last round of race in year 1999.
formula_1
select year from races group by year order by count(round) desc limit 1
Question: which year has the most number of races? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -> statusId, status....
which year has the most number of races?
formula_1
select name from races where year = 2017 and name not in ( select name from races where year = 2000 )
Question: name the races in year 2017 that are not hosted in year 2000. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status...
name the races in year 2017 that are not hosted in year 2000.
formula_1
select t1.country, t1.location from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t2.name = 'european grand prix' order by t2.year asc limit 1
Question: in which country was the first european grand prix hosted? name the circuit and location. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, d...
in which country was the first european grand prix hosted? name the circuit and location.
formula_1
select t2.date from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t1.name = 'brands hatch' and t2.name = 'british grand prix' order by t2.year desc limit 1
Question: when was the last f1 season whereby brands hatch hosted the british grand prix? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nation...
when was the last f1 season whereby brands hatch hosted the british grand prix?
formula_1
select count(t2.circuitid) from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t1.name = 'silverstone circuit' and t2.name = 'british grand prix'
Question: how many seasons has silverstone circuit hosted the united kindom grand prix? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, national...
how many seasons has silverstone circuit hosted the united kindom grand prix?
formula_1
select t3.forename, t3.surname from races as t1 inner join driverstandings as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid where t1.name = 'singapore grand prix' and t1.year = 2010 order by t2.position asc
Question: name all drivers in the 2010 singapore grand prix order by their position stands. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nati...
name all drivers in the 2010 singapore grand prix order by their position stands.
formula_1
select t3.forename, t3.surname, t2.points from races as t1 inner join driverstandings as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid order by t2.points desc limit 1
Question: state the driver with the most points scored. find his full name with that points. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nat...
state the driver with the most points scored. find his full name with that points.
formula_1
select t3.forename, t3.surname, t2.points from races as t1 inner join driverstandings as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid where t1.name = 'chinese grand prix' and t1.year = 2017 order by t2.points desc limit 3
Question: name the top 3 drivers and the points they scored in the 2017 chinese grand prix. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nati...
name the top 3 drivers and the points they scored in the 2017 chinese grand prix.
formula_1
select t2.milliseconds, t1.forename, t1.surname, t3.name from drivers as t1 inner join laptimes as t2 on t1.driverid = t2.driverid inner join races as t3 on t2.raceid = t3.raceid order by t2.milliseconds asc limit 1
Question: what is the best lap time recorded? list the driver and race with such recorded lap time. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, d...
what is the best lap time recorded? list the driver and race with such recorded lap time.
formula_1
select avg(t2.milliseconds) from races as t1 inner join laptimes as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid where t3.forename = 'sebastian' and t3.surname = 'vettel' and t1.year = 2009 and t1.name = 'chinese grand prix'
Question: what is the average lap time for sebastian vettel in the 2009 chinese grand prix? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nati...
what is the average lap time for sebastian vettel in the 2009 chinese grand prix?
formula_1
select cast(count(case when t2.position <> 1 then t2.position end) as real) * 100 / count(t2.driverstandingsid) from races as t1 inner join driverstandings as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid where t3.surname = 'hamilton' and t1.year >= 2010
Question: calculate the percentage whereby hamilton was not at the 1st track of the the f1 circuit since 2010. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename,...
calculate the percentage whereby hamilton was not at the 1st track of the the f1 circuit since 2010.
formula_1
select t1.forename, t1.surname, t1.nationality, avg(t2.points) from drivers as t1 inner join driverstandings as t2 on t2.driverid = t1.driverid where t2.wins = 1 group by t1.forename, t1.surname, t1.nationality order by count(t2.wins) desc limit 1
Question: name the driver with the most winning. mention his nationality and what is his average point scores. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename,...
name the driver with the most winning. mention his nationality and what is his average point scores.
formula_1
select strftime('%y', current_timestamp) - strftime('%y', dob), forename , surname from drivers where nationality = 'japanese' order by dob desc limit 1
Question: how old is the youngest japanese driver? what is his name? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status ->...
how old is the youngest japanese driver? what is his name?
formula_1
select distinct t1.name from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where strftime('%y', t2.date) between '1990' and '2000' group by t1.name having count(t2.raceid) = 4
Question: list circuits which host 4 f1 races from year 1990 to 2000. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -...
list circuits which host 4 f1 races from year 1990 to 2000.
formula_1
select t1.name, t1.location, t2.name from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t1.country = 'usa' and t2.year = 2006
Question: list circuits in usa which hosted f1 races in 2006. state the name and location of circuit and the name of the race it hosted. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRe...
list circuits in usa which hosted f1 races in 2006. state the name and location of circuit and the name of the race it hosted.
formula_1
select distinct t2.name, t1.name, t1.location from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t2.year = 2005 and strftime('%m', t2.date) = '09'
Question: name the races along with its circuit name and location for f1 races hosted in september 2005. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surna...
name the races along with its circuit name and location for f1 races hosted in september 2005.
formula_1
select t1.name from races as t1 inner join driverstandings as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid where t3.forename = 'alex' and t3.surname = 'yoong' and t2.position < 10
Question: which race was alex yoong in when he was in track number less than 10? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, ur...
which race was alex yoong in when he was in track number less than 10?
formula_1
select sum(t2.wins) from drivers as t1 inner join driverstandings as t2 on t2.driverid = t1.driverid inner join races as t3 on t3.raceid = t2.raceid inner join circuits as t4 on t4.circuitid = t3.circuitid where t1.forename = 'michael' and t1.surname = 'schumacher' and t4.name = 'sepang international circuit'
Question: how many times did michael schumacher won from races hosted in sepang international circuit? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname...
how many times did michael schumacher won from races hosted in sepang international circuit?
formula_1
select t1.name, t1.year from races as t1 inner join laptimes as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid where t3.forename = 'michael' and t3.surname = 'schumacher' order by t2.milliseconds asc limit 1
Question: state the race and year of race in which michael schumacher had his fastest lap. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, natio...
state the race and year of race in which michael schumacher had his fastest lap.
formula_1
select avg(t2.points) from drivers as t1 inner join driverstandings as t2 on t2.driverid = t1.driverid inner join races as t3 on t3.raceid = t2.raceid where t1.forename = 'eddie' and t1.surname = 'irvine' and t3.year = 2000
Question: what is eddie irvine's average points scored in year 2000? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status ->...
what is eddie irvine's average points scored in year 2000?
formula_1
select t1.name, t2.points from races as t1 inner join driverstandings as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid where t3.forename = 'lewis' and t3.surname = 'hamilton' order by t1.year asc limit 1
Question: which was lewis hamilton first race? what was his points recorded for his first race event? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname,...
which was lewis hamilton first race? what was his points recorded for his first race event?
formula_1
select distinct t2.name, t1.country from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t2.year = 2017 order by t2.date asc
Question: list all races in 2017 and the hosting country order by date of the event. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality...
list all races in 2017 and the hosting country order by date of the event.
formula_1
select t3.lap, t2.name, t2.year, t1.location from circuits as t1 inner join races as t2 on t1.circuitid = t2.circuitid inner join laptimes as t3 on t3.raceid = t2.raceid order by t3.lap desc limit 1
Question: what is the most laps f1 races had? name the race, year and circuit location where the races with most laps was hosted. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, numb...
what is the most laps f1 races had? name the race, year and circuit location where the races with most laps was hosted.
formula_1
select cast(count(case when t1.country = 'germany' then t2.circuitid end) as real) * 100 / count(t2.circuitid) from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t2.name = 'european grand prix'
Question: among all european grand prix races, what is the percentage of the races were hosted in germany? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, sur...
among all european grand prix races, what is the percentage of the races were hosted in germany?
formula_1
select lat, lng from circuits where name = 'silverstone circuit'
Question: what's the location coordinates of silverstone circuit? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -> st...
what's the location coordinates of silverstone circuit?
formula_1
select name from circuits where name in ('silverstone circuit', 'hockenheimring', 'hungaroring') order by lat desc limit 1
Question: which of these circuits is located at a higher latitude, silverstone circuit, hockenheimring or hungaroring? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, f...
which of these circuits is located at a higher latitude, silverstone circuit, hockenheimring or hungaroring?
formula_1
select circuitref from circuits where name = 'marina bay street circuit'
Question: what's the reference name of marina bay street circuit? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -> st...
what's the reference name of marina bay street circuit?
formula_1
select country from circuits order by alt desc limit 1
Question: in which country can i find the circuit with the highest altitude? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. s...
in which country can i find the circuit with the highest altitude?
formula_1
select count(driverid) - count(case when code is not null then code end) from drivers
Question: how many drivers don't have a code? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -> statusId, status. seas...
how many drivers don't have a code?
formula_1
select nationality from drivers where dob is not null order by dob asc limit 1
Question: which country is the oldest driver from? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -> statusId, status....
which country is the oldest driver from?
formula_1
select surname from drivers where nationality = 'italian'
Question: please list the surnames of all the italian drivers. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -> statu...
please list the surnames of all the italian drivers.
formula_1
select url from drivers where forename = 'anthony' and surname = 'davidson'
Question: which website should i go to if i want to know more about anthony davidson? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationalit...
which website should i go to if i want to know more about anthony davidson?
formula_1
select driverref from drivers where forename = 'lewis' and surname = 'hamilton'
Question: what's lewis hamilton's reference name? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -> statusId, status. ...
what's lewis hamilton's reference name?
formula_1
select t1.name from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t2.year = 2009 and t2.name = 'spanish grand prix'
Question: which circuit did the 2009 spanish grand prix use? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -> statusI...
which circuit did the 2009 spanish grand prix use?
formula_1
select distinct t2.year from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t1.name = 'silverstone circuit'
Question: please list all the years that silverstone circuit was used in a formula_1 race. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, natio...
please list all the years that silverstone circuit was used in a formula_1 race.
formula_1
select distinct t1.url from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t1.name = 'silverstone circuit'
Question: please give more information about the formula_1 races that used the silverstone circuit. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, d...
please give more information about the formula_1 races that used the silverstone circuit.
formula_1
select t2.date, t2.time from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t2.year = 2010 and t2.name = 'abu dhabi grand prix'
Question: what time did the the 2010's formula_1 race took place on the abu dhabi circuit? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, natio...
what time did the the 2010's formula_1 race took place on the abu dhabi circuit?
formula_1
select count(t2.circuitid) from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t1.country = 'italy'
Question: how many formula_1 races took place on the circuits in italy? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status...
how many formula_1 races took place on the circuits in italy?
formula_1
select t2.date from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t1.name = 'circuit de barcelona-catalunya'
Question: please list the exact dates on which a formula_1 race took place on the barcelona-catalunya circuit. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename,...
please list the exact dates on which a formula_1 race took place on the barcelona-catalunya circuit.
formula_1
select t1.url from circuits as t1 inner join races as t2 on t2.circuitid = t1.circuitid where t2.year = 2009 and t2.name = 'spanish grand prix'
Question: please give the link of the website that shows more information about the circuits the spanish grand prix used in 2009. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, numb...
please give the link of the website that shows more information about the circuits the spanish grand prix used in 2009.
formula_1
select t2.fastestlaptime from drivers as t1 inner join results as t2 on t2.driverid = t1.driverid where t1.forename = 'lewis' and t1.surname = 'hamilton' and t2.fastestlaptime is not null order by t2.fastestlaptime asc limit 1
Question: what's the fastest lap time ever in a race for lewis hamilton? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. statu...
what's the fastest lap time ever in a race for lewis hamilton?
formula_1
select t1.forename, t1.surname from drivers as t1 inner join results as t2 on t2.driverid = t1.driverid where t2.fastestlaptime is not null order by t2.fastestlapspeed desc limit 1
Question: which driver created the fastest lap speed in a formula_1 race? please give both his forename and surname. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, for...
which driver created the fastest lap speed in a formula_1 race? please give both his forename and surname.
formula_1
select t3.forename, t3.surname, t3.driverref from races as t1 inner join results as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid where t1.name = 'australian grand prix' and t2.rank = 1 and t1.year = 2008
Question: which driver ranked the first in the australian grand prix in 2008? please give his reference name. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, ...
which driver ranked the first in the australian grand prix in 2008? please give his reference name.
formula_1
select t1.name from races as t1 inner join results as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid where t3.forename = 'lewis' and t3.surname = 'hamilton'
Question: please list the formula_1 races that lewis hamilton participated. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. st...
please list the formula_1 races that lewis hamilton participated.
formula_1
select name from races where raceid in ( select raceid from results where rank = 1 and driverid = ( select driverid from drivers where forename = 'lewis' and surname = 'hamilton' ) )
Question: in which formula_1 race did lewis hamilton rank the highest? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status ...
in which formula_1 race did lewis hamilton rank the highest?
formula_1
select t2.fastestlapspeed from races as t1 inner join results as t2 on t2.raceid = t1.raceid where t1.name = 'spanish grand prix' and t1.year = 2009 and t2.fastestlapspeed is not null order by t2.fastestlapspeed desc limit 1
Question: what was the fastest lap speed among all drivers in the 2009 spanish grand prix? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, natio...
what was the fastest lap speed among all drivers in the 2009 spanish grand prix?
formula_1
select distinct t1.year from races as t1 inner join results as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid where t3.forename = 'lewis' and t3.surname = 'hamilton'
Question: in which years did lewis hamilton participate in a formula_1 race? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. s...
in which years did lewis hamilton participate in a formula_1 race?
formula_1
select t2.positionorder from races as t1 inner join results as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid where t3.forename = 'lewis' and t3.surname = 'hamilton' and t1.name = 'australian grand prix' and t1.year = 2008
Question: what was lewis hamilton's final rank in the 2008 australian grand prix? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, u...
what was lewis hamilton's final rank in the 2008 australian grand prix?
formula_1
select t3.forename, t3.surname from races as t1 inner join results as t2 on t2.raceid = t1.raceid inner join drivers as t3 on t3.driverid = t2.driverid where t2.grid = 4 and t1.name = 'australian grand prix' and t1.year = 2008
Question: which driver was in the no. 4 grid formation when starting the race in 2008's australian grand prix? please give his forename and surname. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driver...
which driver was in the no. 4 grid formation when starting the race in 2008's australian grand prix? please give his forename and surname.
formula_1
select count(t2.driverid) from races as t1 inner join results as t2 on t2.raceid = t1.raceid where t1.name = 'australian grand prix' and t1.year = 2008 and t2.time is not null
Question: how many drivers managed to finish the race in the 2008 australian grand prix? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationa...
how many drivers managed to finish the race in the 2008 australian grand prix?
formula_1
select t1.fastestlap from results as t1 inner join races as t2 on t1.raceid = t2.raceid inner join drivers as t3 on t1.driverid = t3.driverid where t2.name = 'australian grand prix' and t2.year = 2008 and t3.forename = 'lewis' and t3.surname = 'hamilton'
Question: which was the fastest lap for lewis hamilton in the 2008 australian grand prix? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nation...
which was the fastest lap for lewis hamilton in the 2008 australian grand prix?
formula_1
select t1.time from results as t1 inner join races as t2 on t1.raceid = t2.raceid where t1.rank = 2 and t2.name = 'australian grand prix' and t2.year = 2008
Question: what's the finish time for the driver who ranked second in 2008's australian grand prix? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, do...
what's the finish time for the driver who ranked second in 2008's australian grand prix?