rewrite games page as raw sql, reduce trips to the db to one