I want to get count of Job status like count of open,count of closed jobs and count of processing jobs
USE [SmartJob
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROC [dbo].[GetJobStatus]
@CompanyID INT
AS
BEGIN
SELECT [StatusID]
,M.Value 'Status' FROM Jobs J
JOIN Master M ON M.MasterID=J.StatusID
WHERE CompanyID=@CompanyID;
END
Please help me