I’m in need of some help on how to write a query. I pretty familiar with MSSQL but I am just starting on Oracle now. I know I need to use the Dual table in some way, I just can’t seem to get the syntax right.
Here is what I have so far, which returns the row count of each hour on a specific day (’{Root Container.Label 2.text}’ is a date)
SELECT trunc("TimeEntered",'HH') as t_stamp, count(*) as rate
FROM myTable
Where trunc("TimeEntered",'DD') = '{Root Container.Label 2.text}'
GROUP BY trunc("TimeEntered", 'HH')
ORDER BY t_stamp asc
However, the query about does not return a value of 0 if there is no data for that specific hour.
How do I join the above query with a table of 24 hours to get the hours with 0?
Thanks