Select all posts where comments.count >= 10
===

One Post has many comments. I would like to select all posts where comments.count is greater than 5.

Something like this: Post.all.joins(:comments).having("count >= 5")