zephquamy
02-05-2008, 06:20 PM
I'm trying to write a MySQL query that will give me the total number of messages sent each day not including worker replies.
This report is built into Cerberus, but doesn't allow me to specify absolute date ranges.
I've got a good start on it, but I'm missing something as the total my query returns is about 1000 higher than the internal Cerberus query. What am I missing?
select date(from_unixtime(created_date)) as thedate, count(*) as ticketcount
from message as m
where from_unixtime(created_date) between '2008-1-1' and '2008/2/1' and is_outgoing = 0
group by thedate
This report is built into Cerberus, but doesn't allow me to specify absolute date ranges.
I've got a good start on it, but I'm missing something as the total my query returns is about 1000 higher than the internal Cerberus query. What am I missing?
select date(from_unixtime(created_date)) as thedate, count(*) as ticketcount
from message as m
where from_unixtime(created_date) between '2008-1-1' and '2008/2/1' and is_outgoing = 0
group by thedate