The following is an example SQL statement that demonstrates how data can be extracted from the QryLogEventHisV view to give an explanation of the expression and events which caused a RED SysCon.
WITH RECURSIVE CausalAnalysis(EntryTS, EntryKind, EntryID, EntryName, Activity, ActivityId) AS ( SELECT EntryTS, EntryKind, EntryID, EntryName, Activity, ActivityId FROM DBC.QryLogEventHisV WHERE EntryKind = 'SYSCON' AND EntryName = 'RED' AND Activity = 'ACTIVE' UNION ALL SELECT Cause.EntryTS, Cause.EntryKind, Cause.EntryID, Cause.EntryName, Cause.Activity, Cause.ActivityId FROM CausalAnalysis Condition INNER JOIN DBC.QryLogEventHisV Cause ON Condition.EntryKind = Cause.ActivityId AND Condition.EntryID = Cause.ActivityId ) SELECT * FROM CausalAnalysis ORDER BY 1 DESC;