0
如何將此SQL轉換爲named_scope?此外,我希望總評論參數通過lambda傳遞。將SQL語句轉換爲named_scope?
「選擇用戶。,計數(),如從用戶TOTAL_COMMENTS,評論,其中(users.id = comments.user_id)和(comments.public_comment = 1)和(comments.aasm_state = '發佈')和( comments.forum_user_id爲空)group by users.id having total_comments> 25「