ลืมแนบคำสั่งมาให้ดูด้วยค่ะ
select dx_doctor,d.name,count(dx_doctor) as count_dx ,sum(inc12) as sum_total
from vn_stat v
left outer join doctor d on d.code=v.dx_doctor
where vstdate between '2009-05-01' and '2009-05-31'
group by dx_doctor
order by count_dx desc