Simple query implentation & test.