I am trying to find campaign members for campaigns executed in last 2 years (not via Apex), in order to migrate this data. Using Jitterbit.
I have tried couple different queries (from developer console) and can't seem to get the right query. Campaign is a lookup on CampaignMember, so should I not be able to use the __r notation to access?
SELECT Id, CampaignId, ContactId, CreatedById, CreatedDate, FirstRespondedDate, HasResponded, IsDeleted, LastModifiedById, LastModifiedDate, LeadId, Status, SystemModstamp
FROM CampaignMember
where CampaignId = Campaign__r.id and Campaign__r.CreatedDate >= LAST_N_YEARS:2