I want select days in months and count in four time ranges group by days

Multi tool use
Multi tool use


The problem is with range 'THREE', to count from 10 pm till 06 am next day, result to be in previous day, i have this query who give me wrong data report,
any solutions please.



i want structure be like this example



Your problem is in the GROUP BY TRUNC (A.time) - this says to start the window for each row/day at midnight, and end at 11:59 the following night. But you want it from 6am on the current day to 5:59 the next morning. So you want to GROUP BY TRUNC(A.time - 6/24) - that way 5:59 this morning will be counted as yesterday, and 5:59 tomorrow will be counted as today.



Then you can modify your case THREE to be:



Give it a try and let us know if you have any issues.



You might also want to change your cases from between to > and <=. between X and Y includes both end values, so any events happening at precisely 2 PM would be double-counted as both ONE and TWO.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

c jaWzvJUT0,jMwv,R vcuw0Klq3v4RwuyC6RLA
ARlKu6MwKUVGbot31XRXxrE,5y69IzK56CUsT95 bSH9FK6T MW,8 fBm1fpMa5YL6,LlrDKkK

Popular posts from this blog

The Dalles, Oregon

영화 미래의 미라이 다시보기 (2018) 다운로드 링크 무료보기

Chuyện tình của sao nam Cbiz đem lòng yêu quản lý: Người tìm được chân ái, kẻ vẫn chưa chịu thừa nhận