select t0.staff_id, t0.staff_name, t0.tel, IFNULL(t1.amount, 0) as amount
from lq_org_staff t0
left join
(SELECT count(*) as amount, t1.follow_id
from lq_student t1
GROUP BY t1.follow_id)
as t1 on t1.follow_id = t0.staff_id
select t0.staff_id, t0.staff_name, t0.tel, IFNULL(t1.amount, 0) as amount
from lq_org_staff t0
left join
(SELECT count(*) as amount, t1.follow_id
from lq_student t1
GROUP BY t1.follow_id)
as t1 on t1.follow_id = t0.staff_id