select pdx,count(an) as c_an,count(distinct(hn)) as c_hn,
sum(inc01) as s_inc01,sum(inc12) as s_inc12,
sum(inc02+inc03+inc04+inc05+inc06+inc07+inc08+inc09+inc10+inc11+inc13+inc14+inc15+inc16) as s_outer,
sum(income) as s_income
from an_stat
where dchdate between "2009-10-01" and "2009-10-31" and pdx!=""
and aid="421301"
group by pdx
order by c_an desc limit 10
มีข้อมูลไหมครับ