标签: sql ruby activerecord
我需要帮助将这一部分T-SQL转换为ActiveRecord查询
select entry from faxlog group by entry having count(entry) >= 8
答案 0 :(得分:1)
试试这个:
Faxlog.group(:entry).select("entry").having("count(entry) >= ?", 8)