I have this below soql query in one batch class start method. Even if I run the batch class with the below-matching query, I am not getting anything. I have few records with this condition but not getting anything even I run the Batch. I think something problem with this query. Can anyone correct this query, please?
String query = 'SELECT Id, Name, Account_Type__c, ' +'(SELECT Id, Name, Account__c, Application_Status__c, Training_Requirements_Met__c, Training_Override__c, Level__r.Name , Partner_Type__r.Name , Solution_Type__r.Name FROM Accreditations__r WHERE Application_Status__c = \'Legal Approved/Awaiting Training Completion\' OR Application_Status__c = \'Partner Agreement Accepted\' ),' +'(SELECT Id, Account__c, Active__c, Student_Id__c, Training_Course__r.Name, Expiration_Date__c FROM Certifications__r ORDER BY Student_Id__c)' +'FROM Account WHERE Account_Type__c includes (\'Channel\')'; system.debug('========='+ query);