View Single Post
  #1  
Old January 25th, 2005, 05:31 PM
Kenny Holden
external usenet poster
 
Posts: n/a
Default Date Grouping Query

Hi List,

I have a table of tasks;

tasks
====
task_number
task_opened
task_closed


Now im trying to figure out how to group by day. Basically, given a month
and year eg september 2004. I want to for each day in that month show the
day, the count of opened jobs on that day, and the cound of closed jobs on
that day.

Im really strugling with this query.

Obviously I can do both the queries separately. But I really want a graph
showing for each day of the month, the number opened and the number closed.
On my current 2 queries the ouput generated doesnt list days where there are
0 jobs logged, so it sometimes shows 15th, 18, 20 etc...

Does anyone know of an easy way to cycle through all possible days of the
given month and do an iif count on the date comparing to the task_opened and
task_closed and increasing the number counted by this.

Any ideas?

Many Thanks, Kenny