Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
SELECT TIMES.personID, MAPS.eventID, CONVERT(TIME,DATEADD(s,SUM(DATEDIFF(SECOND, TIMES.startTime, TIMES.endTime) ),0)) as duration FROM ( SELECT TIMES1.personID, TIMES1.eventtype, TIMES1.reasoncode, TIMES1.eventdatetime, TIMES1.eventdatetime as startTime, ISNULL((SELECT MIN(TIMES2.eventdatetime) FROM TIMECLOCK TIMES2 WHERE TIMES2.eventdatetime > TIMES1.eventdatetime and TIMES2.personID = TIMES1.personID ),GETUTCDATE()) as endTime FROM TIMECLOCK TIMES1 ) TIMES JOIN MAPS on MAPS.personID = TIMES.personID AND MAPS.active = 1 JOIN REASONS on REASONS.eventtype = TIMES.eventtype AND REASONS.reasoncode = TIMES.reasoncode WHERE DATEADD(mi, DATEDIFF(mi, GETUTCDATE(), GETDATE()), TIMES.eventdatetime) > MAPS.lastEvent AND REASONS.reasonID in (SELECT reasoncode FROM REASONALLOWED) AND MAPS.eventID = 464 GROUP BY TIMES.personID, MAPS.eventID ORDER BY MAPS.eventID, duration DESC
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.