BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: sathaporn ที่ ตุลาคม 04, 2011, 15:47:43 PM
-
ขอรายผู้ป่วยที่มา ANC แยกสิทธ์การรักษา ครับ
-
select o.pttype,p.name,count(distinct s.person_anc_id) 'case',count(s.vn) 'total'
from person_anc_service s
left join ovst o on s.vn=o.vn
left join pttype p on p.pttype=o.pttype
where s.anc_service_date between '2011-1-1' and '2011-1-31'
group by o.pttype
order by o.pttype
แบบนี้มั๊ย
-
น่าจะ ok ครับ เดี่ยวลองดูก่อนครับ ขอบคุณครับ