Solution for query board challenge.