SELECT COUNT(pkNotification) AS caseTotal
,COUNT(fkCaseType) AS Suspected
, COUNT(fkCaseType) AS Confirmed
, Disease.Name
FROM [Notification]
INNER JOIN [Disease] ON Notification.fkDisease=Disease.pkDisease
GROUP BY Disease.Name
This is my statement. But I need COUNT (fkCaseType) AS. It is assumed that only when fkCaseType = 1, and for the confirmed - fkcaseType = 2.
The problem is where I did the subqueries, I had problems with the group.
source
share