Notes
In this Query, we aim to write a SOQL (Salesforce Object Query Language) query that retrieves all Accounts with more than five associated Contacts. The goal is to not only fetch the Accounts but also include the count of their Contacts.
SELECT AccountId, Account.Name, COUNT(Id)
FROM Contact
GROUP BY AccountId, Account.Name
HAVING COUNT(Id) > 5