-- Database schema
| flight : flno [ INT ] primary_key , origin [ TEXT ] , destination [ TEXT ] , distance [ INT ] , departure_date [ TEXT ] , arrival_date [ TEXT ] , price [ INT ] , aid [ INT ] flight.aid = aircraft.aid | aircraft : aid [ INT ] primary_key , name [ TEXT ] , distance [ INT ] | employee : eid [ INT ] primary_key , name [ TEXT ] , salary [ INT ] | certificate : eid [ INT ] primary_key certificate.eid = employee.eid , aid [ INT ] certificate.aid = aircraft.aid |
-- -- Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate.

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;