So we can’t do complex queries in Salesforce.com. But we all need to. And it’s a reporting functionality, right? I mean, if they don’t give us access to reports in the API (which they haven’t) and they don’t build a complex query builder (which they haven’t) we’re out of luck.
And then I thought about Campaigns.
After Winter ‘06 came out, Campaigns became snapshots of reports. They added the all powerful “Add to Campaign” button.

That removed the need for a bunch of Excel ping pong. Export to Excel, import to Campaign. Great for usability, but doesn’t help the complex reporting needs.
But what if they had added this button too?

Then we could create a report of all Donors, and then subtract out everyone who attended our last party. Giving us the result set we want in a Campaign where it’s available for export to Excel, can be viewed in a report, etc.
Unfortunately, I can’t add that button. There isn’t API access to reports. But I have full API access to Campaigns. So if we do the first step of putting the report results in a Campaign, then I could subtract the members of one Campaign from another, putting the resulting set in another Campaign.
We could chain together as many as we wanted. Giving results like everyone who has never given to my org, attened my last breifing meeting, and is a volunteer.
I’ve written a way to compare two Campaigns, generating a resulting set of CampaignMembers in a new Campaign. Still interested? Want to beta test?