This query might benefit (w.r.t. readability) from being rewritten as follows. What do you think?
```ruby
Story.joins(:feed).where("stories.created_at < ?", timestamp).
  where(is_read: false, feeds: { group_id: group_id })
```