select a.an,a.ward,sum(admdate) as cc_day,sum(admit_hour) as cc_hour,b.dchdate,b.hn,c.name from ipt_ward_stat a
left outer join ipt b on b.an=a.an
left outer join ward c on c.ward=a.ward
where b.dchdate between "2014-01-01" and "2014-01-15" and a.ward="00"
group by a.an,a.ward
order by a.an
limit 0
ตัวอย่างรายงาน ไม่รู้ว่าแบบนี้ไหม