query tests