AnsweredAssumed Answered

SQL Query for # of Executions

Question asked by LauraAlbrecht608310 on Jan 11, 2019

Hey guys.  I need some SQL assistance - I know there's a few of you SQL guru's out there.


I need to get the # of executions, by day, of processes running on a certain agent.  Right now I have this:


SELECT to_char(ah_timestamp1, 'yyyy-mm-dd') AS ExecutionDate,
count(*) as Executions
FROM automic.ah
WHERE ah_client in ('555')
AND ah_otype IN ('JOBS','JOBF','EVNT')
AND ah_hostdst IN ('SW20FIL01')
AND ah_timestamp1 > SYSDATE - 70
GROUP BY to_char(ah_timestamp1, 'yyyy-mm-dd')
ORDER BY ExecutionDate ASC;


However, while this is syntactically correct - the results I am getting are NOT right.  My expectation is that the number of executions will go DOWN.  We are migrating off of this server.


But that's not what I am seeing.  Can someone verify if I have a problem in my query and/or maybe my project is not progressing along as well as I thought.  :-)