The core infrastructure backend (API, database, Docker, etc).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
362 B

CREATE OR ALTER PROCEDURE [dbo].[SecurityTask_ReadMetricsByOrganizationId]
@OrganizationId UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
SELECT
COUNT(CASE WHEN st.[Status] = 1 THEN 1 END) AS CompletedTasks,
COUNT(*) AS TotalTasks
FROM
[dbo].[SecurityTaskView] st
WHERE
st.[OrganizationId] = @OrganizationId
END
GO