What is the name and distance of every aircraft that can cover a distance of more than 5000 and which at least 5 people can fly?
select t2.name from certificate as t1 join aircraft as t2 on t2.aid = t1.aid where t2.distance > 5000 group by t1.aid order by count(*) >= 5