query with primitive types