I am trying to count all records between two dates that have been completed. This means that the created_at field is between start_date and end_date, and the final_at field is not null.
I can use the following expression to get records that have not ended:
Record.count(:all, :conditions => {:created_at => start_date..end_date, :finished_at => nil })
Is there a similar way to count entries in which nonzero ended?
source
share