Prøv at erstatte :
SUM(H_TIME) AS HANDLE_TIME
af :
MEDIAN(H_TIME) AS HANDLE_TIME
(linje 3)
EDIT:For månederne skal du erstatte:
select
MONTH, WEEK, DAY,
Af:
select
MONTH,
Og:
GROUP BY
MONTH
,WEEK
,DAY
Af:
GROUP BY
MONTH
For ugerne skal du erstatte:
select
MONTH, WEEK, DAY,
Af:
select
MONTH, WEEK,
Og:
GROUP BY
MONTH
,WEEK
,DAY
Af:
GROUP BY
MONTH
,WEEK