I am attempting to run an SQL query to pull in all most recent records based off of last modified date.
Here is my query and it giving me an error of Automation failed due to a system error. Any help would be appreciated.
SELECT DISTINCT
CreatedById,
LastModifiedById,
Organization__c,
Description__c,
MAX([LastModifiedDate]) as [LastModifiedDate],
IsDeleted,
Registration_Open_Date__c,
Registration_Close_Date__c,
Registration_Type__c,
Sports__c
FROM
ent.Program__c_Salesforce
GROUP BY
CreatedById,
LastModifiedById,
Description__c,
LastModifiedDate,
Organization__c,
IsDeleted,
Registration_Open_Date__c,
Registration_Close_Date__c,
Registration_Type__c,
Sports__c