HCL Workload Automation, Version 9.4

Job metrics queries for DB2

Use the following SQL query to find the number of jobs run on specific workstations:
SELECT year(job_run_date_time) AS Year, month(job_run_date_time) AS Month,
cast (count(job_run_date_time) AS INT) AS JobNbr FROM mdl.job_history_v 
WHERE workstation_name IN ('WKS_1', 'WKS_2', 'WKS_N') or 
(workstation_name = '-' and JOB_STREAM_WKS_NAME_IN_RUN in('WKS_1', 'WKS_2', 'WKS_N') )
GROUP BY year(job_run_date_time), month(job_run_date_time)
where 'WKS_1', 'WKS_2', 'WKS_N' are the names of the workstations that ran the jobs you want counted.
Use the following SQL query to find the number of jobs run on the entire HCL Workload Automation domain:
SELECT year(job_run_date_time) AS Year, month(job_run_date_time) AS Month, 
cast (count(job_run_date_time) AS INT) AS JobNbr FROM mdl.job_history_v 
GROUP BY year(job_run_date_time), month(job_run_date_time)