You need to sign in to do that
Don't have an account?

Parent to Child query: Count number of Accounts with a related Event with Type = to "X"
I am trying to Query to get the COUNT of Accounts that have at least 1 Event related to it that has the Type = 'Meeting - Client'
When I run the below SOQL it still brings back Accounts that DO NOT have any Events related to them. How do I fix this?
SELECT Id, (SELECT Event.Id FROM Account.Events WHERE Event.Type = 'Meeting - Client') FROM Account
WHERE OwnerId = '00530000005eaqR'
When I run the below SOQL it still brings back Accounts that DO NOT have any Events related to them. How do I fix this?
SELECT Id, (SELECT Event.Id FROM Account.Events WHERE Event.Type = 'Meeting - Client') FROM Account
WHERE OwnerId = '00530000005eaqR'
SELECT AccountId, COUNT(Id)
FROM Event
WHERE Type = 'Meeting - Client'
GROUP BY AccountId