bmaro
11 years agoLevel 4
OpsCenter Report Total Number of Jobs for the Previous Month
I need to create a basic monthly report showing the total number of jobs that ran for the previous month. It can be by master or media servers and doesn't need to take into account ignoring reruns, ...
- 11 years ago
Hi bmaro.
You can try this.
SELECT count(distinct dj.id) AS "Total Number of Jobs",
CASE lookup_PolicyType.name WHEN 'Standard' THEN 'Unix' ELSE lookup_PolicyType.name end as "Type"FROM domain_job dj
JOIN lookup_PolicyType
ON lookup_policyType.id = dj.policyType WHERE DATEDIFF(day,UTCBigIntToNomTime(dj.endTime), GETDATE()) <= 30
GROUP BY Type
ORDER BY "Total Number of Jobs"Br Morten