To build total/avg/max days per month

Singlespeed

Registered User.
Local time
Today, 09:47
Joined
Jun 5, 2009
Messages
33
I have pre christmas developers block and cant figure this out, it appears simple!!

I have a table with Date Started Treatment, Date Treatment Completed going back 3 years.

I need to produce a monthly summary for the last 12 months to show how many people were in treatment at the end of each month, also how long they were in treament for.

I would like to do it in one query which I can then pivot to make a graph from.
 
Cheers - the crux of my problem is that I need to count those in treatment at the end of each month, but they might have started before that month so they dont have any date values in that month.
 
Which is why you need to fake the months using something simular to the file I attached.
 

Users who are viewing this thread

Back
Top Bottom