Count of Late to Test 30 Days

This query provides a Count of the Number of Late to Test events tripped in the last 30 Days.

The queries provided should be tested to ensure they meet the customer's specific needs. The company makes no guarantees regarding their accuracy or suitability.

SELECT (SELECT COUNT(*) FROM CLOG{0} WHERE SERIALNO={ME} AND STCODE="*LT" AND EVTYPE IN (0,1) AND LOGDATE>=DATEADD(DD,-30,"{DU}"))
+
(SELECT COUNT(*) FROM CLOG{1} WHERE SERIALNO={ME} AND STCODE="*LT" AND EVTYPE IN (0,1) AND LOGDATE>=DATEADD(DD,-30,"{DU}"))
  • SELECT COUNT (*) - Looking for a whole number returned.
  • CLOG{0} - Current month's customer activity.
  • CLOG{1} - Last month's customer activity.
  • WHERE - Filters the results by the values defined.
  • SERIALNO={ME} - Matches the alarm's customer serial number in the data set.
  • and - Connector value between WHERE parameters.
  • STCODE="CODE" - Event code value to find the specific event(s) to count.
  • EVTYPE IN (0,1) - Looks for both Signals and Alarms within the activity.
  • LOGDATE>=DATEADD(DD,-30,"{DU}")) - Looks backward in the activity table(s) for the last 30 days from the event date in the alarm.