You need to sign in to do that
Don't have an account?
srinivasarao Muppaneni
soql query to retrieve all accounts having more than 100 contacts in one query
soql query to retrieve all accounts having more than 100 contacts in one query
[select id,name,(select accountid,count(id) from contact group by accountid having count(id)>100) from account]
[select id,name,(select accountid,count(id) from contact group by accountid having count(id)>100) from account]
To retrieve all accounts having more than 100 contacts in one query.
Please refer the below link for reference.
- https://salesforce.stackexchange.com/questions/139295/is-it-possible-to-retrieve-list-of-accounts-which-has-more-than-100-contacts-ass
I hope it will be helpful.Best Regards
Rahul Kumar
why count(name) is used cant we use count(id)