Query Statistical history of a job on AWA

Document ID : KB000100744
Last Modified Date : 04/01/2019
Show Technical Document Details
Question:
How to fetch the statistical history of job?
Answer:
Query to pull Statistics,reports and messages records per client.

Oracle

SELECT AH_Client AS "Client", AH_Archiveflag, AH_Deleteflag, COUNT (*) AS "Activity count", MIN(AH_LDate) AS "Oldest activity" FROM AH WHERE AH_Otype NOT IN ('SERV', 'HOST', 'REPORT', 'QUEUE', 'USER', 'CLNT', 'C_HOSTG', 'DEPLOY', 'CAU') GROUP BY AH_Client, AH_Archiveflag, AH_Deleteflag ORDER BY AH_CLient, 4, MIN(AH_LDate); SELECT RH_Client AS "Client", RH_Archiveflag, RH_Deleteflag, COUNT (*) AS "Report count", MIN(RH_Timestamp4) AS "Oldest report" FROM RH WHERE RH_TYPE IN ('REP','LOG','ACT','POST') GROUP BY RH_Client, RH_Archiveflag, RH_Deleteflag ORDER BY RH_Client, 4 DESC, MIN(RH_Timestamp4); SELECT MELD_Client AS "Client", COUNT (*) AS "Message count", MIN(MELD_TimeStamp) AS "Oldest message" FROM MELD GROUP BY MELD_Client ORDER BY MELD_Client;

===============================================================================================================

SQL

SELECT AH_Client AS "Client", COUNT (*) AS "Activity count", MIN(AH_LDate) AS "Oldest activity" FROM AH GROUP BY AH_Client ORDER BY AH_Client; SELECT RH_Client AS "Client", COUNT (*) AS "Report count", MIN(RH_TimeStamp4) AS "Oldest report" FROM RH GROUP BY RH_Client ORDER BY RH_Client; SELECT MELD_Client AS "Client", COUNT (*) AS "Message count", MIN(MELD_TimeStamp) AS "Oldest message" FROM MELD GROUP BY MELD_Client ORDER BY MELD_Client;