I would like to group a search result by days, but unfortunately, the definition is not a day from midnight to midnight (00:00-24:00), but from 06:00 to 06:00.
Any easy solution? If possible in PL-SQL
It should be as simple as this:
GROUP BY TRUNC(DATE - 6/24)
- 6/24
subtracts 6 hours from the datetime in the column DATE
and thus all times between 06:00 and 06:00 will be the same day. TRUNC
then removes the time part as you only need the date.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With