scalar query tests