Patrick McDonald wrote:
Hello,
I would like to automatically get the number of assignments received
between a 24 hour period for the past 8 days. I am using
"where received >= date_add( now() , interval -1 day)" to get
yesterdays assignments....
I didn't understand what you want. And why doesn't date_add() help you
to do this? Or do you mean that you want to get 8 numbers, one number
for each day for the past 8 days? If you are not using time and/or it is
enough for you that we use date to separate rows, then just:
# This is not tested
select count(*) from assignments where received >= date_sub( now(),
interval 8 day ) group by received;