Validation of query results