Count Expression

C

Chuck Moore

I have a query that selects all patients that were initially Triaged for
Admit. I have a second column in the query that lists what actually happened
to them and include three values from a table. Is there an expressions that
I can use to count the number of times that each different value appears in
the column
autSortCategoryID strSortCategory CountOfautSortCategoryID dtmAuditDate strDispositionCategory
3 1 Discharge 1 05/30/2006 Discharged
5 1 Discharge 1 05/30/2006 Admitted
6 1 Discharge 1 06/01/2006 Admitted
7 1 Discharge 1 06/04/2006 Walk Out
8 1 Discharge 1 06/03/2006 Admitted
10 1 Discharge 1 06/06/2006 Discharged
 
M

Marshall Barton

Chuck said:
I have a query that selects all patients that were initially Triaged for
Admit. I have a second column in the query that lists what actually happened
to them and include three values from a table. Is there an expressions that
I can use to count the number of times that each different value appears in
the column?
autSortCategoryID strSortCategory CountOfautSortCategoryID dtmAuditDate strDispositionCategory
3 1 Discharge 1 05/30/2006 Discharged
5 1 Discharge 1 05/30/2006 Admitted
6 1 Discharge 1 06/01/2006 Admitted
7 1 Discharge 1 06/04/2006 Walk Out
8 1 Discharge 1 06/03/2006 Admitted
10 1 Discharge 1 06/06/2006 Discharged


I think all you want is a simple Totals type query:

SELECT strDispositionCategory,
Count(*) As CountOfDisposition
FROM yourquery
GROUP BY strDispositionCategory
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top