I'm tryig to get the sum of total time spent on each activity worked by employees. Below is the sql I have but it does not sum. I need to sum hours and minutes to get a total amount of time spent on each ACTIVITY for a date range? How can I do this?
SELECT *,SUM(HOURS),SUM(MINUTES)
FROM DAILY_ACTIVITY
WHERE ACTIVITY_DATE >= '2011-03-03'
AND ACTIVITY_DATE <= '2011-04-11'
AND HOURS + MINUTES > 0
AND USERID = '36'
GROUP BY ACTIVITY