How many drivers have participated in 30 or fewer races?
select count ( * ) from ( select t1.driverid from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid having count ( * ) < = 30 )
What are the ID's of those drivers?
select t1.driverid from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid having count ( * ) < = 30
How many races did each of these drivers participate in?
select t1.driverid,count ( * ) from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid
How many of those drivers placed in the top 3 of any race?
select t1.driverid from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid having t2.rank < 3