I have a record set that includes a date field, and want to determine how many unique dates are represented in the record set.
Something like:
Record
the latest #count on rails source code only accept 1 parameter. see: http://api.rubyonrails.org/classes/ActiveRecord/Calculations.html#method-i-count
#count
so I achieved the requirement by
Record.count('DISTINCT date')