Force
Challenges
Problems
Daily
Notes
Sign in
Problem list
Run
Submit
Run in org
Hardcore
Sign in
to submit
Description
Schema
Hints
Submissions
Solution
Feedback
Accounts With More Than Five Contacts
Hard
SOQL
50 pts
Created Oct 7, 2026
Find accounts with more than five contacts.
Example
AccountId
total
001A
6
Constraints
Use GROUP BY and HAVING.
GROUP BY
HAVING
COUNT
Code
SOQL
Loading editor…
Testcases
Test Results
Console Log
My Org
Case 1
+1 hidden on submit
visible
Seed data
Account
× 2 rows
Name:
Account {{i}}
Contact
× 12 rows
LastName:
Contact {{i}}
AccountId:
{{id:Account:i%2+1}}
Expected
2 row(s), order checked
#
total
AccountId
1
6
001000000000002AAA
2
6
001000000000001AAA