SQL: Display counts for all job statuses in Backlog/History

Document ID : KB000088881
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
SQL: Display counts for all job statuses in Backlog/History
Resolution:
Detailed Description and Symptoms

Below is the SQL required to get a count of the jobs in Backlog or History based on their unique status names.


Solution

?Backlog:

select so_status_name, count(*)
from so_job_queue
group by so_status_name;

History:

select so_status_name, count(*)
from so_job_history
group by so_status_name;