What is the salary and name of the employee who has the least number of certificates on aircrafts with distance more 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 ( * ) asc limit 1
Okay. What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more 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
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