select v.hn, concat(p.pname,p.fname,' ',p.lname) as ptname,concat(p.hometel) as tel,v.pttype,count(v.vn)
from vn_stat v, patient p
where v.hn=p.hn
and v.vstdate between '2012-01-01' and '2013-07-31'
and v.pttype<>'d8'
and v.pttype<>'d9'
and v.pttype<>'e1'
and v.pttype<>'h3'
and v.pttype<>'h1'
and v.pttype<>'54'
and v.pttype<>'24'
and v.pttype<>'14'
and v.pttype<>'15'
and v.pttype<>'72'
and v.pttype<>'f5'
and v.pttype<>'f6'
and v.pttype<>'f7'
and v.pttype<>'f4'
group by v.hn
order by count(v.vn) desc
limit 80