I have the following sql query which gives me the total h_time grouped by month, week and day. Instead I want the median h_time for month, week and day. How do I do that in Orac
Your problem probably come from the time part that the DATE type carry (even if you don't explicitly set it).
To get rid of it you can use the trunc function.
Replace:
SELECT DAY,
By:
SELECT trunc(DAY)
And:
GROUP BY DAY
GROUP BY trunc(DAY)