select a.pdx,i.name 'disease',count(a.pdx) 'amount'
from an_stat a
left join icd101 i on i.code=a.pdx
where a.pcode='a7'
and a.dchdate between '2009-10-1' and '2010-9-30'
and a.pdx<>' ' and a.pdx is not null
group by a.pdx
order by amount desc
limit 20
ประมาณนี้มั๊ย