HestonJames
Programmer
Hello Chaps,
I have the following query:
Now, If I wanted to return an additional column which gave me the count of records in the Event table for each Campaign object, how would I go about that? I've tried doing a 'Count(Event.ID) As NumberOfEvents' but that just gives me 1 for each row.
I'd appreciate your help
Heston
I have the following query:
Code:
Select Campaign.Campaign_ID,
Campaign.Name,
Event.ID,
Media.Name As MessageName,
Media.Type
From Campaign
Left Join Event On Campaign.Campaign_ID = Event.Campaign_ID
Left Join Media On Event.Media_ID = Media.Media_ID
Where Campaign.Owner_ID = 46
And Campaign.Active = 1
Group By Campaign.Campaign_ID,
Campaign.Name,
Event.ID,
Media.Name,
Media.Type
Now, If I wanted to return an additional column which gave me the count of records in the Event table for each Campaign object, how would I go about that? I've tried doing a 'Count(Event.ID) As NumberOfEvents' but that just gives me 1 for each row.
I'd appreciate your help
Heston