This will actually execute many queries (1 query for each show, for each network). It's what's called a n+1 query, and a frequent performance problem.

Instead, you could:

```ruby
Show.where(day_of_week: weekday).each do |show|
  puts show
end
```

After all, we don't need to group by the network at all here.