I'm trying to create a SOQL query that returns a list of Campaigns with Influenced Opportunities, similar to the standard campaign report with the same name. The following doesn't seem to be returning the same values as the report:
SELECT Id,Name FROM Opportunity
where CampaignId in (SELECT CampaignId from CampaignMember where CampaignId = '??')
Any help would be greatly appreciated.