Reputation: 8645
I need help converting this bit of T-SQL into an ActiveRecord Query
select entry
from faxlog
group by entry
having count(entry) >= 8
Upvotes: 0
Views: 104
Reputation: 1096
Try this:
Faxlog.group(:entry).select("entry").having("count(entry) >= ?", 8)
Upvotes: 1