Hi there,

I have a list of events that occur periodically:

 

1/1/2008            Event

1/1/2008            Event

1/1/2008            Event

1/2/2008            Event

1/2/2008            Event

1/4/2008            Event

1/4/2008            Event

 

I know how to count events per day, but on days (such as 1/3/2008 in the
above example) where there is no event, how could I get the date to
display?

 

 

The query I am using is:

 

SELECT

from_unixtime(`mainDate`,"%m/%d/%Y"),

Count(`ID`)

 

FROM

`main_data`

WHERE

`department` =  '9'

GROUP BY

from_unixtime(`mainDate`,"%m/%d/%Y")

 

 

What I get with this query is:

 

 

1/1/2008            3

1/2/2008            2

1/4/2008            1

 

 

The result set that I want is:

 

1/1/2008            3

1/2/2008            2

1/3/2008            0

1/4/2008            1

 

 

 

Any ideas?

 

Thanks,

Craig
--------------------------------------------------------
This e-mail, including any attachments, may be confidential, privileged or 
otherwise legally protected. It is intended only for the addressee. If you 
received this e-mail in error or from someone who was not authorized to send it 
to you, do not disseminate, copy or otherwise use this e-mail or its 
attachments.  Please notify the sender immediately by reply e-mail and delete 
the e-mail from your system.

Reply via email to