Trunc Date [message #633458] |
Thu, 19 February 2015 05:11 |
|
naga78
Messages: 1 Registered: February 2015
|
Junior Member |
|
|
I have a query like this
select trunc(col_date,'hh24'),count(1) from tb1
group by trunc(col_date,'hh24')
I have a situation like for few hours there are 0 records, but the above query gives me records only when there are records present in the table
example
09/02/2015 03:00 1
09/02/2015 05:00 1
What i need is something like this
09/02/2015 0
09/02/2015 01:00 0
09/02/2015 02:00 0
09/02/2015 03:00 1
09/02/2015 04:00 0
09/02/2015 05:00 1
How can we do this ?
|
|
|
|
|