Show the name and distance of the aircrafts.
select name, distance from aircraft
How about those with a distance longer than 5000?
select name, distance from aircraft where distance > 5000
Which also have at least 5 people with the certificate?
select t2.name, t2.distance 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