BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: sompas ที่ พฤศจิกายน 13, 2007, 16:06:41 PM
-
ขอความช่วยเหลือผู้รู้ครับ ผมต้องการรายงานการให้บริการตามช่วงเวลา 08:31-16:30,16:31-24:00,00:00:01-08:30:00 รูปแบบคำสั่งเขียนยังไงครับ
-
ไม่ทราบว่าแบบนี้พอจะได้ไหม.... ลองไปปรับใช้ดูครับ
select concat(floor(((hour(vsttime)*3600)+(minute(vsttime)*60)+second(vsttime))/7200)*2,'-',
(floor(((hour(vsttime)*3600)+(minute(vsttime)*60)+second(vsttime))/7200)*2+2)) as h_time ,count(vn) as visit_count
from ovst
where vstdate ='2007-10-01'
group by h_time
order by vsttime