so your from_date and to_date variables are both set to MIDNIGHT at
the start of the day. The created_at variable is a timestamp (in Rails
and Oracle), so includes hours, minutes and seconds (and fractional
seconds).
I'd suggest that if you use created_on instead of created_at you would
probably find that it works as expected (assuming you don't need any
more explicit ordering within each day). Since you know that
from_date = Date.new(3,11,07)
is midnight at the start of 3/11/07, you can use it this way also.