I found a redundant Owner field in an Org, which I want to check if it's matching the standard Owner field or not. A very simple SOQL query - at least I thought:
SELECT Account_Owner__c,OwnerId,Id,Name
FROM Account
WHERE Account_Owner__c = OwnerId
But getting:
MALFORMED_QUERY:
WHERE Id = Name
ERROR at Row:3:Column:12
Bind variables only allowed in Apex code
Is it not possible in SOQL to match fields against other fields of the same record?