Update query for user code problems view

So it doesn’t explode in production.