Hi, I'm trying to create a query that counts the number of times one particular value appears in one column of a table and count the number of times another particular value appears in another column in the same table. The table is "Presentations" and column names are "TriageCategory" and "Isolation". I want to count all values in "Triage category" that = Life-Threatening and values in "isolation" that = yes. I can get the counts when I do separate queries for triage category and isolation, but the values are not correct when I put them in the same query. This is the SQL for the combined query:
SELECT Presentations.triageCategory, Count(*) AS TotalLT, Presentations.isolation, Count(*) AS TotalIso
FROM Presentations
GROUP BY Presentations.triageCategory, Presentations.isolation
HAVING (((Presentations.triageCategory)="Life-Threatening") AND ((Presentations.isolation)=True));
Am I missing brackets somewhere that will ensure that the values are correct?