What is the salary and name of the employee who has the most number of certificates on aircraft with distance less than 5000?
SELECT T1.salary, T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid   =   T2.eid JOIN Aircraft AS T3 ON T3.aid   =   T2.aid WHERE T3.distance  <  5000 GROUP BY T1.eid ORDER BY count ( * )  DESC LIMIT 1
most number of certificates refers to MAX(COUNT(certificates)); on aircraft with distance less than 5000 refers to WHERE distance < 5000;