Count query

usr33t

Registered User.
Local time
Today, 00:14
Joined
Dec 1, 2004
Messages
21
Hi everyone,

I wonder if someone could help me.

I am trying to write a query for a hospital database which counts the number of patients who received various treatments throughout their stay in intensive care. I think I will have trouble explaining textually what I would like to achieve so I have attached a Word document which should illustrate my requirements sufficiently.

If anyone could help me I would be extremely grateful.

Many thanks and best wishes
Russell
 

Attachments

Select "RENAL" Name, count(*) from [Your table] where Renal = "YES"
UNION
Select "Pacath" Name, count(*) from [Your table] where PACATH = "YES"

etc...

Offcourse you need to add in the dates... ;)

Or you could try a Pivot table, but then you will get the no's counted too...

Season greets from Amsterdam

The Mailman
 

Users who are viewing this thread

Back
Top Bottom