hello,
how do I go about getting the sum of time_diff group them by username, function_name?
I have this statment which I manage to get the time_diff from TIME_OUT - TIME_IN
`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SELECT USERNAME, FUNCTION_NAME, INCIDENT_ID, TIME_IN,
TIME_OUT, INETADDR, to_char(to_date('00:00:00','HH24:MI:SS') +
(TIME_OUT - TIME_IN), 'HH24:MI:SS') time_diff
FROM CMS_LOGINHIST
WHERE TIME_IN > = TO_DATE('01/01/2004', 'MM/DD/YYYY')
and TIME_OUT < = TO_DATE('11/30/2004', 'MM/DD/YYYY')
and INCIDENT_ID=44 ORDER BY USERNAME ASC
thanks,
Ngai
how do I go about getting the sum of time_diff group them by username, function_name?
I have this statment which I manage to get the time_diff from TIME_OUT - TIME_IN
`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SELECT USERNAME, FUNCTION_NAME, INCIDENT_ID, TIME_IN,
TIME_OUT, INETADDR, to_char(to_date('00:00:00','HH24:MI:SS') +
(TIME_OUT - TIME_IN), 'HH24:MI:SS') time_diff
FROM CMS_LOGINHIST
WHERE TIME_IN > = TO_DATE('01/01/2004', 'MM/DD/YYYY')
and TIME_OUT < = TO_DATE('11/30/2004', 'MM/DD/YYYY')
and INCIDENT_ID=44 ORDER BY USERNAME ASC
thanks,
Ngai