0
我看起來像這樣翻譯SQL查詢的ActiveRecord
@words = Word.connection.select_all("select text, count(*) as occurs from words join works on words.work_id = works.id where works.grouping == 'group1' group by text order by occurs desc limit 10")
我想將它寫在多個軌道/活動記錄方式的代碼行,但語法仍然是相當新的給我。
每件作品都有很多單詞,每個單詞都屬於一件作品。