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
Try replacing :
SUM(H_TIME) AS HANDLE_TIME
by :
MEDIAN(H_TIME) AS HANDLE_TIME
(line 3)
EDIT:
For the months, replace:
select
MONTH, WEEK, DAY,
By:
select
MONTH,
And:
GROUP BY
MONTH
,WEEK
,DAY
By:
GROUP BY
MONTH
For the weeks, replace:
select
MONTH, WEEK, DAY,
By:
select
MONTH, WEEK,
And:
GROUP BY
MONTH
,WEEK
,DAY
By:
GROUP BY
MONTH
,WEEK