My OR condition with in the where statement is failing to execute, Can someone let me know if I'm missing something or querying it wrong. Any help is much appreciated.
SELECT Id FROM Object__c
WHERE ( Latitude__c >= 3 AND Longitude__c>= -8 AND Latitude__c <= 4 AND Longitude__c <= 8 AND RecordtypeId =: recid AND Active__c = true ) OR (Statewide_Service__c = \'True\' AND State__c =: stateofcand AND RecordtypeId =: recid AND Active__c = true )Order by Resource_Type__c asc