unit test passed for query and sql.