In my output I got two count values based on the condition.
SELECT count(distinct sc.staff),
count(distinct sc.subgroupId)
FROM schedules sc
WHERE EXISTS (SELECT *
FROM schedulegroup sg
WHERE sg.groupid = 15
AND sc.subgroupId = sg.subgroup
AND sg.created BETWEEN '2022-06-01' AND '2022-06-12'
AND sc.status IN(1,2)
)
Now I got the result based on the status condition(Status = 1 and 2). But I need a column of total count without checking the status condition. How to get the count of total records in the existing query?