BMS-HOSxP Community

HOSxP => Report Exchange => ข้อความที่เริ่มโดย: yokyai ที่ กันยายน 05, 2010, 14:28:24 PM

หัวข้อ: รายงาน revisit 24 hr. ที่ er แต่เจอปัญหาขอคำแนะนำด้วยคับ
เริ่มหัวข้อโดย: yokyai ที่ กันยายน 05, 2010, 14:28:24 PM
ปัญหาตามรูปเลยคับ ต้องการนับจำนวนคนคับ
หัวข้อ: Re: รายงาน revisit 24 hr. ที่ er แต่เจอปัญหาขอคำแนะนำด้วยคับ
เริ่มหัวข้อโดย: เกื้อกูล ครับ.. ที่ กันยายน 05, 2010, 23:21:27 PM
select count(hn) as ptcount,hn,pdx
 from vn_stat
where vn in
( select vn from er_regist
   where vstdate between '2010-08-01' and '2010-08-31' )
and lastvisit_hour<=24
and pdx not like'Z%'
group by hn
having count(้ืhn) > 1
order by vstdate,hn