What are the drivers' last names who had 11 pit stops and participated in more than 5 race results?
select t1.surname, t1.driverid from drivers as t1 join pitstops as t2 on t1.driverid = t2.driverid group by t1.driverid having count ( * ) = 11 intersect select t1.surname, t1.driverid from drivers as t1 join results as t2 on t1.driverid = t2.driverid group by t1.driverid having count ( * ) > 5
What are the drivers' last names who had 11 pit stops?
select t1.surname, t1.driverid from drivers as t1 join pitstops as t2 on t1.driverid = t2.driverid group by t1.driverid having count ( * ) = 11
What are the race ids that the driver with the surname Nakajima was in?
select t2.raceid from drivers as t1 join results as t2 on t1.driverid = t2.driverid where t1.surname = "Nakajima"
How many wins does that driver have?
select count ( * ) from drivers as t1 join results as t2 on t1.driverid = t2.driverid where t1.surname = "Nakajima" and t2.rank = 1