Count contacts who are associated with campaigns

V

VLee.KHer

I have a query which pulls contact IDs from a table and links them to
Campaign IDs from another table. So, a contact ID will show up more
than once if it is linked to more than one campaign.

What I need to do is count how many campaigns each contact is link to
based on the contact ID. How would I do that?
 
K

KARL DEWEY

Try this --
SELECT CONTACT.ContactID, Count(Campaign.CampaignID) AS CountOfCampaignID
FROM CONTACT INNER JOIN Campaign ON CONTACT.ContactID = Campaign.ContactID
GROUP BY CONTACT.ContactID;
 
Top