db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
formula_1
select t1.forename, t1.surname, t1.url from drivers as t1 inner join results as t2 on t1.driverid = t2.driverid inner join races as t3 on t3.raceid = t2.raceid where t3.name = 'australian grand prix' and t2.time like '_:%:__.___' and t3.year = 2008
Question: who was the champion of 2008's australian grand prix and where can i know more about him? | 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...
who was the champion of 2008's australian grand prix and where can i know more about him?
formula_1
select count(*) from drivers as t1 inner join results as t2 on t1.driverid = t2.driverid inner join races as t3 on t3.raceid = t2.raceid where t3.name = 'australian grand prix' and t1.nationality = 'american' and t3.year = 2008
Question: how many drivers from the usa participated 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, national...
how many drivers from the usa participated in the 2008 australian grand prix?
formula_1
select count(*) from ( select t1.driverid from results as t1 inner join races as t2 on t1.raceid = t2.raceid where t2.name = 'australian grand prix' and t2.year = 2008 and t1.time is not null group by t1.driverid having count(t2.raceid) > 0 )
Question: among the drivers that finished the race in the 2008 australian grand prix, how many of them have participated in formula_1 races? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driv...
among the drivers that finished the race in the 2008 australian grand prix, how many of them have participated in formula_1 races?
formula_1
select sum(t2.points) from drivers as t1 inner join results as t2 on t1.driverid = t2.driverid where t1.forename = 'lewis' and t1.surname = 'hamilton'
Question: how many points did lewis hamilton get in total in all the formula_1 races he 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,...
how many points did lewis hamilton get in total in all the formula_1 races he participated?
formula_1
select avg(cast(substr(t2.fastestlaptime, 1, instr(t2.fastestlaptime, ':') - 1) as integer) * 60 + cast(substr(t2.fastestlaptime, instr(t2.fastestlaptime, ':') + 1) as real)) from drivers as t1 inner join results as t2 on t1.driverid = t2.driverid where t1.surname = 'hamilton' and t1.forename = 'lewis'
Question: what is the average fastest lap time in seconds for lewis hamilton in all the formula_1 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, surna...
what is the average fastest lap time in seconds for lewis hamilton in all the formula_1 races?
formula_1
select cast(sum(iif(t1.time is not null, 1, 0)) as real) * 100 / count(t1.resultid) from results as t1 inner join races as t2 on t1.raceid = t2.raceid where t2.name = 'australian grand prix' and t2.year = 2008
Question: what is the rate of drivers completing all the laps 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,...
what is the rate of drivers completing all the laps in the 2008 australian grand prix?
formula_1
with time_in_seconds as ( select t1.positionorder, case when t1.positionorder = 1 then (cast(substr(t1.time, 1, 1) as real) * 3600) + (cast(substr(t1.time, 3, 2) as real) * 60) + cast(substr(t1.time, 6) as real) else cast(substr(t1.time, 2) as real) end as time_seconds from results as t1 inner join races as t2 on t1.ra...
Question: how much faster in percentage is the champion than the driver who finished the race last 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, ...
how much faster in percentage is the champion than the driver who finished the race last in the 2008 australian grand prix?
formula_1
select count(circuitid) from circuits where location = 'melbourne' and country = 'australia'
Question: how many circuits are there in melbourne, australia? | 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...
how many circuits are there in melbourne, australia?
formula_1
select lat, lng from circuits where country = 'usa'
Question: please list the location coordinates of the us circuits. | 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 -> s...
please list the location coordinates of the us circuits.
formula_1
select count(driverid) from drivers where nationality = 'british' and strftime('%y', dob) > '1980'
Question: how many british drivers were born after 1980? | 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...
how many british drivers were born after 1980?
formula_1
select avg(t1.points) from constructorstandings as t1 inner join constructors as t2 on t1.constructorid = t2.constructorid where t2.nationality = 'british'
Question: what are the average points of british constructors? | 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...
what are the average points of british constructors?
formula_1
select t2.name from constructorstandings as t1 inner join constructors as t2 on t1.constructorid = t2.constructorid order by t1.points desc limit 1
Question: which constructor has the highest point? | 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 constructor has the highest point?
formula_1
select t2.name from constructorstandings as t1 inner join constructors as t2 on t1.constructorid = t2.constructorid where t1.points = 0 and t1.raceid = 291
Question: please list the constructor names with 0 points at race 291. | 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 ...
please list the constructor names with 0 points at race 291.
formula_1
select count(t1.raceid) from constructorstandings as t1 inner join constructors as t2 on t1.constructorid = t2.constructorid where t1.points = 0 and t2.nationality = 'japanese' group by t1.constructorid having count(raceid) = 2
Question: how many japanese constructors have 0 points in 2 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 -> s...
how many japanese constructors have 0 points in 2 races?
formula_1
select distinct t2.name from results as t1 inner join constructors as t2 on t1.constructorid = t2.constructorid where t1.rank = 1
Question: which constructors have been ranked 1? | 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. s...
which constructors have been ranked 1?
formula_1
select count(distinct t2.constructorid) from results as t1 inner join constructors as t2 on t1.constructorid = t2.constructorid where t1.laps > 50 and t2.nationality = 'french'
Question: how many french constructors have a lap number of over 50? | 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 french constructors have a lap number of over 50?
formula_1
select cast(sum(iif(t1.time is not null, 1, 0)) as real) * 100 / count(t1.raceid) 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 t3.nationality = 'japanese' and t2.year between 2007 and 2009
Question: please calculate the race completion percentage of japanese drivers from 2007 to 2009. | 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,...
please calculate the race completion percentage of japanese drivers from 2007 to 2009.
formula_1
with time_in_seconds as ( select t2.year, t2.raceid, t1.positionorder, case when t1.positionorder = 1 then (cast(substr(t1.time, 1, 1) as real) * 3600) + (cast(substr(t1.time, 3, 2) as real) * 60) + cast(substr(t1.time, 6) as real) else cast(substr(t1.time, 2) as real) end as time_seconds from results as t1 inner join ...
Question: what is the average time in seconds of champion for each year? | 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 is the average time in seconds of champion for each year?
formula_1
select t2.forename, t2.surname from results as t1 inner join drivers as t2 on t1.driverid = t2.driverid where strftime('%y', t2.dob) > '1975' and t1.rank = 2
Question: which drivers born after 1975 have been ranked 2? please give their forenames and surnames. | 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 drivers born after 1975 have been ranked 2? please give their forenames and surnames.
formula_1
select count(t1.driverid) from results as t1 inner join drivers as t2 on t1.driverid = t2.driverid where t2.nationality = 'italian' and t1.time is null
Question: how many italian drivers haven't finished the 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. status -> status...
how many italian drivers haven't finished the race?
formula_1
select t2.forename, t2.surname, t1.fastestlaptime from results as t1 inner join drivers as t2 on t1.driverid = t2.driverid where t1.fastestlaptime is not null order by t1.fastestlaptime asc limit 1
Question: which driver has the fastest lap time? please give their forenames and surnames. | 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...
which driver has the fastest lap time? please give their forenames and surnames.
formula_1
select t1.fastestlap from results as t1 inner join races as t2 on t1.raceid = t2.raceid where t2.year = 2009 and t1.time like '_:%:__.___'
Question: what is the fastest lap number of the champion 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, number, code, forename, surname, dob, nationality, url. status -> st...
what is the fastest lap number of the champion in 2009?
formula_1
select avg(t1.fastestlapspeed) from results as t1 inner join races as t2 on t1.raceid = t2.raceid where t2.year = 2009 and t2.name = 'spanish grand prix'
Question: what is the average of fastest lap speed in the 2009 spanish grand prix 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, national...
what is the average of fastest lap speed in the 2009 spanish grand prix race?
formula_1
select t1.name, t1.year from races as t1 inner join results as t2 on t1.raceid = t2.raceid where t2.milliseconds is not null order by t2.milliseconds limit 1
Question: which race has the shortest actual finishing time? please give the name and year. | 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...
which race has the shortest actual finishing time? please give the name and year.
formula_1
select cast(sum(iif(strftime('%y', t3.dob) < '1985' and t1.laps > 50, 1, 0)) as real) * 100 / count(*) 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.year between 2000 and 2005
Question: from 2000 to 2005, what percentage of drivers who were born before 1985 and the lap numbers were over 50? | 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, fore...
from 2000 to 2005, what percentage of drivers who were born before 1985 and the lap numbers were over 50?
formula_1
select count(t1.driverid) from drivers as t1 inner join laptimes as t2 on t1.driverid = t2.driverid where t1.nationality = 'french' and (cast(substr(t2.time, 1, 2) as integer) * 60 + cast(substr(t2.time, 4, 2) as integer) + cast(substr(t2.time, 7, 2) as real) / 1000) < 120
Question: how many french drivers who obtain the laptime less than 02:00.00? | 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...
how many french drivers who obtain the laptime less than 02:00.00?
formula_1
select code from drivers where nationality = 'american'
Question: list out the code for drivers who have nationality in america. | 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...
list out the code for drivers who have nationality in america.
formula_1
select raceid from races where year = 2009
Question: list out the id number of races which were hold 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, number, code, forename, surname, dob, nationality, url. status -> s...
list out the id number of races which were hold in 2009.
formula_1
select count(driverid) from driverstandings where raceid = 18
Question: how many driver participated in race id 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, forename, surname, dob, nationality, url. status -> statusI...
how many driver participated in race id number 18?
formula_1
select count(*) from ( select t1.nationality from drivers as t1 order by julianday(t1.dob) desc limit 3) as t3 where t3.nationality = 'dutch'
Question: state code numbers of top 3 yougest drivers. how many netherlandic drivers among them? | 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,...
state code numbers of top 3 yougest drivers. how many netherlandic drivers among them?
formula_1
select driverref from drivers where forename = 'robert' and surname = 'kubica'
Question: what is reference name of robert kubica? | 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 is reference name of robert kubica?
formula_1
select count(driverid) from drivers where nationality = 'australian' and strftime('%y', dob) = '1980'
Question: how many australian drivers who were born in 1980? | 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...
how many australian drivers who were born in 1980?
formula_1
select t2.driverid from pitstops as t1 inner join drivers as t2 on t1.driverid = t2.driverid where t2.nationality = 'german' and strftime('%y', t2.dob) between '1980' and '1990' order by t1.time limit 3
Question: list out top 3 german drivers who were born from 1980-1990 and have the earliest 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, ...
list out top 3 german drivers who were born from 1980-1990 and have the earliest lap time.
formula_1
select driverref from drivers where nationality = 'german' order by julianday(dob) asc limit 1
Question: please state the reference name of the oldest german driver. | 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 ...
please state the reference name of the oldest german driver.
formula_1
select t2.driverid, t2.code from results as t1 inner join drivers as t2 on t1.driverid = t2.driverid where strftime('%y', t2.dob) = '1971' and t1.fastestlaptime is not null
Question: which drivers who were born in 1971 and has the fastest lap time on the race? give id and code of these 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, cod...
which drivers who were born in 1971 and has the fastest lap time on the race? give id and code of these drivers.
formula_1
select t2.driverid from pitstops as t1 inner join drivers as t2 on t1.driverid = t2.driverid where t2.nationality = 'spanish' and strftime('%y', t2.dob) < '1982' order by t1.time desc limit 10
Question: list out top 10 spanish drivers who were born before 1982 and have the latest 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, dob...
list out top 10 spanish drivers who were born before 1982 and have the latest lap time.
formula_1
select t2.year from results as t1 inner join races as t2 on t1.raceid = t2.raceid where t1.fastestlaptime is not null
Question: state the racing year which has the fastest 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, dob, nationality, url. status -> stat...
state the racing year which has the fastest lap time?
formula_1
select t2.year from laptimes as t1 inner join races as t2 on t1.raceid = t2.raceid order by t1.time desc limit 1
Question: which year has the lowest speed of 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, dob, nationality, url. status -> statusId, sta...
which year has the lowest speed of lap time?
formula_1
select driverid from laptimes where lap = 1 order by time limit 5
Question: list the driver's id of the top five driver, by descending order, the fastest time during the first lap of the 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,...
list the driver's id of the top five driver, by descending order, the fastest time during the first lap of the race.
formula_1
select sum(iif(time is not null, 1, 0)) from results where statusid = 2 and raceid < 100 and raceid > 50
Question: from race no. 50 to 100, how many finishers have been disqualified? | 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. ...
from race no. 50 to 100, how many finishers have been disqualified?
formula_1
select distinct location, lat, lng from circuits where country = 'austria'
Question: how many times the circuits were held in austria? please give their location and 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, surnam...
how many times the circuits were held in austria? please give their location and coordinates.
formula_1
select raceid from results group by raceid order by count(time is not null) desc limit 1
Question: what race number has the most finishers? | 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 race number has the most finishers?
formula_1
select t2.driverref, t2.nationality, t2.dob from qualifying as t1 inner join drivers as t2 on t1.driverid = t2.driverid where t1.raceid = 23 and t1.q2 is not null
Question: list the reference name of the drivers who passed the second qualifying lap during race no. 23. indicate their nationality and birthday. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId...
list the reference name of the drivers who passed the second qualifying lap during race no. 23. indicate their nationality and birthday.
formula_1
select t3.year, t3.name, t3.date, t3.time from qualifying as t1 inner join drivers as t2 on t1.driverid = t2.driverid inner join races as t3 on t1.raceid = t3.raceid where t1.driverid = ( select driverid from drivers order by dob desc limit 1 ) order by t3.date asc limit 1
Question: on what year did the youngest driver had his first qualifying race? state the name, date and time of the 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,...
on what year did the youngest driver had his first qualifying race? state the name, date and time of the race.
formula_1
select count(t1.driverid) from drivers as t1 inner join results as t2 on t1.driverid = t2.driverid inner join status as t3 on t2.statusid = t3.statusid where t3.status = 2 and t1.nationality = 'american'
Question: how many american drivers have been disqualified from the 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. stat...
how many american drivers have been disqualified from the race.
formula_1
select t1.url from constructors as t1 inner join constructorstandings as t2 on t1.constructorid = t2.constructorid where t1.nationality = 'italian' order by t2.points desc limit 1
Question: which of the italian constructor got the highest point to date? give 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, surna...
which of the italian constructor got the highest point to date? give its introduction website?
formula_1
select t1.url from constructors as t1 inner join constructorstandings as t2 on t1.constructorid = t2.constructorid order by t2.wins desc limit 1
Question: what is the website of the constructor who tallied the most total wins. | 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 is the website of the constructor who tallied the most total wins.
formula_1
select t1.driverid from laptimes as t1 inner join races as t2 on t1.raceid = t2.raceid where t2.name = 'french grand prix' and t1.lap = 3 order by t1.time desc limit 1
Question: among the drivers who participated in the french grand prix, who has the slowest time in the 3rd 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...
among the drivers who participated in the french grand prix, who has the slowest time in the 3rd lap.
formula_1
select t1.milliseconds from laptimes as t1 inner join races as t2 on t1.raceid = t2.raceid where t1.lap = 1 order by t1.time limit 1
Question: in which race did the fastest 1st lap time was recorded? please indicate the time in milliseconds. | 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, s...
in which race did the fastest 1st lap time was recorded? please indicate the time in milliseconds.
formula_1
select avg(t1.fastestlaptime) from results as t1 inner join races as t2 on t1.raceid = t2.raceid where t1.rank < 11 and t2.year = 2006 and t2.name = 'united states grand prix'
Question: what is the average fastest lap time of the top 10 drivers in the 2006 united states 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, sur...
what is the average fastest lap time of the top 10 drivers in the 2006 united states grand prix?
formula_1
select t2.forename, t2.surname from pitstops as t1 inner join drivers as t2 on t1.driverid = t2.driverid where t2.nationality = 'german' and strftime('%y', t2.dob) between '1980' and '1985' group by t2.forename, t2.surname order by avg(t1.duration) limit 5
Question: list down top 5 german drivers who has the shortest average pit stop duration and were born between 1980-1985. | 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,...
list down top 5 german drivers who has the shortest average pit stop duration and were born between 1980-1985.
formula_1
select t1.time from results as t1 inner join races as t2 on t1.raceid = t2.raceid where t2.name = 'canadian grand prix' and t2.year = 2008 and t1.time like '_:%:__.___'
Question: who is the champion of the canadian grand prix in 2008? indicate his finish 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, dob, nati...
who is the champion of the canadian grand prix in 2008? indicate his finish time.
formula_1
select t3.constructorref, t3.url from results as t1 inner join races as t2 on t1.raceid = t2.raceid inner join constructors as t3 on t1.constructorid = t3.constructorid where t2.name = 'singapore grand prix' and t2.year = 2009 and t1.time like '_:%:__.___'
Question: what is the constructor reference name of the champion in the 2009 singapore grand prix? please give its 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, co...
what is the constructor reference name of the champion in the 2009 singapore grand prix? please give its website.
formula_1
select forename, surname, dob from drivers where nationality = 'austrian' and strftime('%y', dob) between '1981' and '1991'
Question: what is the full name and date of birth of austrian drivers born between 1981 and 1991? | 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...
what is the full name and date of birth of austrian drivers born between 1981 and 1991?
formula_1
select forename, surname, url, dob from drivers where nationality = 'german' and strftime('%y', dob) between '1971' and '1985' order by dob desc
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. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. driv...
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.
formula_1
select country, lat, lng from circuits where name = 'hungaroring'
Question: in which location does the hungaroring circuit located? also, find the country and coordinates of this 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...
in which location does the hungaroring circuit located? also, find the country and coordinates of this circuit?
formula_1
select sum(t1.points), t2.name, t2.nationality from constructorresults as t1 inner join constructors as t2 on t1.constructorid = t2.constructorid inner join races as t3 on t3.raceid = t1.raceid where t3.name = 'monaco grand prix' and t3.year between 1980 and 2010 group by t2.name order by sum(t1.points) desc limit 1
Question: which constructor scored most points from monaco grand prix between 1980 and 2010? list the score, name and nationality of this team. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, d...
which constructor scored most points from monaco grand prix between 1980 and 2010? list the score, name and nationality of this team.
formula_1
select avg(t2.points) from drivers as t1 inner join driverstandings as t2 on t1.driverid = t2.driverid inner join races as t3 on t3.raceid = t2.raceid where t1.forename = 'lewis' and t1.surname = 'hamilton' and t3.name = 'turkish grand prix'
Question: what is the average score of lewis hamilton among all the turkish 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...
what is the average score of lewis hamilton among all the turkish grand prix?
formula_1
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'
Question: what is the annual average number of races held during the first 10 years of the 21st century? | 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...
what is the annual average number of races held during the first 10 years of the 21st century?
formula_1
select nationality from drivers group by nationality order by count(driverid) desc limit 1
Question: which citizenship do the vast majority of the drivers hold? | 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 -...
which citizenship do the vast majority of the drivers hold?
formula_1
select sum(case when points = 91 then wins else 0 end) from driverstandings
Question: in terms of number of points acquired, how many victories did the driver who ranked 91st acquired? | 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, s...
in terms of number of points acquired, how many victories did the driver who ranked 91st acquired?
formula_1
select t1.name from races as t1 inner join results as t2 on t1.raceid = t2.raceid where t2.fastestlaptime is not null order by t2.fastestlaptime asc limit 1
Question: in terms of the fastest lap time, what is the name of the race which recorded the fastest lap speed by a racer? | 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...
in terms of the fastest lap time, what is the name of the race which recorded the fastest lap speed by a racer?
formula_1
select t1.location from circuits as t1 inner join races as t2 on t1.circuitid = t2.circuitid order by t2.date desc limit 1
Question: which racetrack hosted the most recent race? indicate the full 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, dob, nationality, ...
which racetrack hosted the most recent race? indicate the full location.
formula_1
select t2.forename, t2.surname from qualifying as t1 inner join drivers as t2 on t1.driverid = t2.driverid inner join races as t3 on t1.raceid = t3.raceid where q3 is not null and t3.year = 2008 and t3.circuitid in ( select circuitid from circuits where name = 'marina bay street circuit' ) order by cast(substr(q3, 1, i...
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? | 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 full name of the racer who ranked 1st in the 3rd qualifying race held in the marina bay street circuit in 2008?
formula_1
select t1.forename, t1.surname, t1.nationality, t3.name from drivers as t1 inner join driverstandings as t2 on t1.driverid = t2.driverid inner join races as t3 on t2.raceid = t3.raceid order by julianday(t1.dob) desc limit 1
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. | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> d...
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.
formula_1
select count(t1.driverid) from results as t1 inner join races as t2 on t1.raceid = t2.raceid inner join status as t3 on t1.statusid = t3.statusid where t3.statusid = 3 and t2.name = 'canadian grand prix' group by t1.driverid order by count(t1.driverid) desc limit 1
Question: how many accidents did the driver who had the highest number accidents in the canadian grand prix have? | 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...
how many accidents did the driver who had the highest number accidents in the canadian grand prix have?
formula_1
select sum(t1.wins) from driverstandings as t1 inner join drivers as t2 on t1.driverid = t2.driverid group by t2.forename, t2.surname order by t2.dob asc limit 1
Question: how many wins was achieved by the oldest racer? indicate his/her 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, nationalit...
how many wins was achieved by the oldest racer? indicate his/her full name.
formula_1
select duration from pitstops order by duration desc limit 1
Question: what was the longest time a driver had ever spent at a pit stop? | 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. sta...
what was the longest time a driver had ever spent at a pit stop?
formula_1
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), ':') +...
Question: among all the lap records set on various circuits, what is the time for the fastest one? | 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...
among all the lap records set on various circuits, what is the time for the fastest one?
formula_1
select t1.duration from pitstops as t1 inner join drivers as t2 on t1.driverid = t2.driverid where t2.forename = 'lewis' and t2.surname = 'hamilton' order by t1.duration desc limit 1
Question: what was the longest time that lewis hamilton had spent at a pit stop? | 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...
what was the longest time that lewis hamilton had spent at a pit stop?
formula_1
select t1.lap from pitstops as t1 inner join drivers as t2 on t1.driverid = t2.driverid inner join races as t3 on t1.raceid = t3.raceid where t2.forename = 'lewis' and t2.surname = 'hamilton' and t3.year = 2011 and t3.name = 'australian grand prix'
Question: during which lap did lewis hamilton take a pit stop during the 2011 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, ...
during which lap did lewis hamilton take a pit stop during the 2011 australian grand prix?
formula_1
select t1.duration from pitstops as t1 inner join races as t2 on t1.raceid = t2.raceid where t2.year = 2011 and t2.name = 'australian grand prix'
Question: please list the time each driver spent at the pit stop during the 2011 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, surnam...
please list the time each driver spent at the pit stop during the 2011 australian grand prix.
formula_1
select t1.time from laptimes as t1 inner join drivers as t2 on t1.driverid = t2.driverid where t2.forename = 'lewis' and t2.surname = 'hamilton'
Question: what is the lap record set by lewis hamilton 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. st...
what is the lap record set by lewis hamilton in a formula_1 race?
formula_1
with lap_times_in_seconds as ( select driverid, (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, ':')...
Question: which driver created the shortest lap time ever record in a formula_1 race? please 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, forenam...
which driver created the shortest lap time ever record in a formula_1 race? please give his full name.
formula_1
select t1.position from laptimes as t1 inner join drivers as t2 on t1.driverid = t2.driverid where t2.forename = 'lewis' and t2.surname = 'hamilton' order by t1.time asc limit 1
Question: what was the position of the circuits during lewis hamilton's fastest lap 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, surna...
what was the position of the circuits during lewis hamilton's fastest lap in a formula_1 race?
formula_1
with fastest_lap_times as ( select t1.raceid, t1.fastestlaptime from results as t1 where t1.fastestlaptime is not null) select min(fastest_lap_times.fastestlaptime) as lap_record from fastest_lap_times inner join races as t2 on fastest_lap_times.raceid = t2.raceid inner join circuits as t3 on t2.circuitid = t3.circuiti...
Question: what is the lap record for the austrian grand prix 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 -...
what is the lap record for the austrian grand prix circuit?
formula_1
with fastest_lap_times as (select t1.raceid, t1.fastestlaptime, (cast(substr(t1.fastestlaptime, 1, instr(t1.fastestlaptime, ':') - 1) as real) * 60) + (cast(substr(t1.fastestlaptime, instr(t1.fastestlaptime, ':') + 1, instr(t1.fastestlaptime, '.') - instr(t1.fastestlaptime, ':') - 1) as real)) + (cast(substr(t1.fastest...
Question: please list the lap records for 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 -> sta...
please list the lap records for the circuits in italy.
formula_1
with fastest_lap_times as ( select t1.raceid, t1.fastestlaptime, (cast(substr(t1.fastestlaptime, 1, instr(t1.fastestlaptime, ':') - 1) as real) * 60) + (cast(substr(t1.fastestlaptime, instr(t1.fastestlaptime, ':') + 1, instr(t1.fastestlaptime, '.') - instr(t1.fastestlaptime, ':') - 1) as real)) + (cast(substr(t1.fastes...
Question: in which formula_1 race was the lap record for the austrian grand prix circuit set? | 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, na...
in which formula_1 race was the lap record for the austrian grand prix circuit set?
formula_1
with fastest_lap_times as ( select t1.raceid, t1.driverid, t1.fastestlaptime, (cast(substr(t1.fastestlaptime, 1, instr(t1.fastestlaptime, ':') - 1) as real) * 60) + (cast(substr(t1.fastestlaptime, instr(t1.fastestlaptime, ':') + 1, instr(t1.fastestlaptime, '.') - instr(t1.fastestlaptime, ':') - 1) as real)) + (cast(sub...
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? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, d...
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?
formula_1
select t3.lat, t3.lng from laptimes as t1 inner join races as t2 on t1.raceid = t2.raceid inner join circuits as t3 on t2.circuitid = t3.circuitid where t1.time = '1:29.488'
Question: please list the location coordinates of the circuits whose lap record is 1:29.488. | 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...
please list the location coordinates of the circuits whose lap record is 1:29.488.
formula_1
select avg(milliseconds) from pitstops as t1 inner join drivers as t2 on t1.driverid = t2.driverid where t2.forename = 'lewis' and t2.surname = 'hamilton'
Question: what was the average time in milliseconds lewis hamilton spent at a pit stop during formula_1 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,...
what was the average time in milliseconds lewis hamilton spent at a pit stop during formula_1 races?
formula_1
select cast(sum(t1.milliseconds) as real) / count(t1.lap) from laptimes as t1 inner join races as t2 on t1.raceid = t2.raceid inner join circuits as t3 on t2.circuitid = t3.circuitid where t3.country = 'italy'
Question: what is the average lap time in milliseconds of all the lap records set on the various 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, fore...
what is the average lap time in milliseconds of all the lap records set on the various circuits in italy?
european_football_2
select player_api_id from player_attributes order by overall_rating desc limit 1
Question: which player has the highest overall rating? indicate the player's api id. | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, ...
which player has the highest overall rating? indicate the player's api id.
european_football_2
select player_name from player order by height desc limit 1
Question: what is the height of the tallest player? indicate his name. | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_ki...
what is the height of the tallest player? indicate his name.
european_football_2
select preferred_foot from player_attributes where potential is not null order by potential asc limit 1
Question: what is the preferred foot when attacking of the player with the lowest potential? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dri...
what is the preferred foot when attacking of the player with the lowest potential?
european_football_2
select count(id) from player_attributes where overall_rating between 60 and 65 and defensive_work_rate = 'low'
Question: among the players with an overall rating between 60 to 65, how many players whose going to be in all of your attack moves instead of defensing? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, cross...
among the players with an overall rating between 60 to 65, how many players whose going to be in all of your attack moves instead of defensing?
european_football_2
select id from player_attributes order by crossing desc limit 5
Question: who are the top 5 players who perform better in crossing actions? indicate their player id. | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, vol...
who are the top 5 players who perform better in crossing actions? indicate their player id.
european_football_2
select t2.name from match as t1 inner join league as t2 on t1.league_id = t2.id where t1.season = '2015/2016' group by t2.name order by sum(t1.home_team_goal + t1.away_team_goal) desc limit 1
Question: which league had the most goals in the 2016 season? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accura...
which league had the most goals in the 2016 season?
european_football_2
select teamdetails.team_long_name from match as matchdata inner join team as teamdetails on matchdata.home_team_api_id = teamdetails.team_api_id where matchdata.season = '2015/2016' and matchdata.home_team_goal - matchdata.away_team_goal < 0 group by matchdata.home_team_api_id order by count(*) asc limit 1
Question: which home team had lost the fewest matches in the 2016 season? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free...
which home team had lost the fewest matches in the 2016 season?
european_football_2
select t2.player_name from player_attributes as t1 inner join player as t2 on t1.id = t2.id order by t1.penalties desc limit 10
Question: indicate the full names of the top 10 players with the highest number of penalties. | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dr...
indicate the full names of the top 10 players with the highest number of penalties.
european_football_2
select teaminfo.team_long_name from league as leaguedata inner join match as matchdata on leaguedata.id = matchdata.league_id inner join team as teaminfo on matchdata.away_team_api_id = teaminfo.team_api_id where leaguedata.name = 'scotland premier league' and matchdata.season = '2009/2010' and matchdata.away_team_goal...
Question: in scotland premier league, which away team won the most during the 2010 season? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribb...
in scotland premier league, which away team won the most during the 2010 season?
european_football_2
select t1.buildupplayspeed from team_attributes as t1 inner join team as t2 on t1.team_api_id = t2.team_api_id order by t1.buildupplaydribbling asc limit 4
Question: what are the speed in which attacks are put together of the top 4 teams with the highest build up play speed? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, ...
what are the speed in which attacks are put together of the top 4 teams with the highest build up play speed?
european_football_2
select t2.name from match as t1 inner join league as t2 on t1.league_id = t2.id where t1.season = '2015/2016' and t1.home_team_goal = t1.away_team_goal group by t2.name order by count(t1.id) desc limit 1
Question: which league had the most matches end as draw in the 2016 season? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, fr...
which league had the most matches end as draw in the 2016 season?
european_football_2
select datetime() - t2.birthday age from player_attributes as t1 inner join player as t2 on t1.player_api_id = t2.player_api_id where substr(t1.`date`, 1, 10) between '2013-01-01' and '2015-12-31' and t1.sprint_speed >= 97
Question: at present, calculate for the player's age who have a sprint speed of no less than 97 between 2013 to 2015. | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, sh...
at present, calculate for the player's age who have a sprint speed of no less than 97 between 2013 to 2015.
european_football_2
select t2.name, count(t1.id) from match as t1 inner join league as t2 on t1.league_id = t2.id group by t2.name order by count(t1.id) desc limit 1
Question: give the name of the league with the highest matches of all time and how many matches were played in the said league. | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_ac...
give the name of the league with the highest matches of all time and how many matches were played in the said league.
european_football_2
select sum(height) / count(id) from player where substr(birthday, 1, 4) between '1990' and '1995'
Question: what is the average height of players born between 1990 and 1995? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, fr...
what is the average height of players born between 1990 and 1995?
european_football_2
select player_api_id from player_attributes where substr(`date`, 1, 4) = '2010' order by overall_rating desc limit 1
Question: list the players' api id who had the highest above average overall ratings in 2010. | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dr...
list the players' api id who had the highest above average overall ratings in 2010.
european_football_2
select distinct team_fifa_api_id from team_attributes where buildupplayspeed > 50 and buildupplayspeed < 60
Question: give the team_fifa_api_id of teams with more than 50 but less than 60 build-up play speed. | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, voll...
give the team_fifa_api_id of teams with more than 50 but less than 60 build-up play speed.
european_football_2
select distinct t4.team_long_name from team_attributes as t3 inner join team as t4 on t3.team_api_id = t4.team_api_id where substr(t3.`date`, 1, 4) = '2012' and t3.buildupplaypassing > ( select cast(sum(t2.buildupplaypassing) as real) / count(t1.id) from team as t1 inner join team_attributes as t2 on t1.team_api_id = t...
Question: list the long name of teams with above-average build-up play passing in 2012. | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribblin...
list the long name of teams with above-average build-up play passing in 2012.
european_football_2
select cast(count(case when t2.preferred_foot = 'left' then t1.id else null end) as real) * 100 / count(t1.id) percent from player as t1 inner join player_attributes as t2 on t1.player_api_id = t2.player_api_id where substr(t1.birthday, 1, 4) between '1987' and '1992'
Question: calculate the percentage of players who prefer left foot, who were born between 1987 and 1992. | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, ...
calculate the percentage of players who prefer left foot, who were born between 1987 and 1992.