Minor correction:
SELECT server_id, map_id, device_id,
SUM((CASE WHEN end_time > ?time2 THEN ?time2 ELSE end_time END) -
(CASE WHEN begin_time < ?time1 THEN ?time1 ELSE
begin_time END)) AS down_time
FROM event
WHERE (?time1, ?time2) OVERLAPS (begin_time, end_time)
AND status = 'down'
AND alarmpt = ''
GROUP BY server_id, map_id, device_id;
Without the alarmpt = '', you will include down_time for a device's
interfaces.
--
Bill Fisher
Dartware, LLC
____________________________________________________________________
List archives:
http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: [email protected]