Sample Query:
SELECT AccountId
FROM Contact
GROUP BY AccountId
HAVING COUNT(AccountId) > 2
This SOQL query is used to get Account Ids where related Contacts count is greater than 2 for the account records.
Sample Query:
SELECT AccountId
FROM Contact
GROUP BY AccountId
HAVING COUNT(AccountId) > 2
This SOQL query is used to get Account Ids where related Contacts count is greater than 2 for the account records.