function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Deepu sfdcDeepu sfdc 

How to write a single SOQL to retrieve list of Accounts(Just Account Ids) which has more than 100 contacts associated to it ??

Best Answer chosen by Deepu sfdc
Naveen DhanarajNaveen Dhanaraj
Try this,
SELECT AccountId, count(Id) records FROM Contact GROUP BY Accountid HAVING count(Id) > 100