Currently trying to do an INNER JOIN on my Account and Opportunity tables and am running into the following error. I am using Restforce (SFDC maintained Ruby SDK) to run these queries against a client.
Restforce::ErrorCode::MalformedQuery: MALFORMED_QUERY: SELECT Id FROM Account INNER JOIN Opportunity ON AccountId = ^ ERROR at Row:1:Column:30 unexpected token: 'JOIN'
The query I am trying to run is as follows:
SELECT Id FROM Account INNER JOIN Opportunity ON AccountId = Account.id WHERE Opportunity.Owner.Email = 'example.com' OR Account.Named_ADR__r.Email = 'example.com' OR Account.Owner.Email = 'example.com'
Not very familiar with SOQL but am struggling to understand how to do this in Salesforce land. Can anybody lend a hand?