select c.hn,concat(p.pname,p.fname,' ',p.lname) as name,c.regdate,c.number as dmnumber,concat(p.addrpart," หมุ่ที่ ",p.moopart," ",th.full_name) as "address"
from clinicmember c
left outer join patient p on p.hn =c.hn
left join thaiaddress th on p.tmbpart=th.tmbpart and p.amppart=th.amppart and p.chwpart=th.chwpart
where c.regdate between "2009-01-01" and "2009-01-31" and c.clinic = "001"
order by c.regdate,c.number
เพิ่มตรงจุดใหนคับ