select i.labor_date, p.cid, concat(p.pname,p.fname," ",p.lname) as mothername, p.addrpart, p.moopart, t.full_name
from ipt_pregnancy i, an_stat a, patient p, thaiaddress t
where i.an=a.an
and p.hn=a.hn
and t.addressid=a.aid
and i.labor_date between "2009-10-01" and "2010-11-14"
order by i.labor_date