This question runs in a pre-configured Salesforce environment - no personal connection required.
Query all accounts from the org and group them into three categories based on their employee count: Small (under 100 employees), Medium (100-500 employees), and Large (over 500 employees). Return a Map where the key is the size category string and the value is the count of accounts in that category. If an account has a null NumberOfEmployees field, categorize it as Small.
Examples:
Output: {'Small': 6, 'Medium': 12, 'Large': 12}
Explanation: Based on actual org data, 6 accounts have fewer than 100 employees, 12 have 100-500 employees, and 12 have over 500 employees
Output: {'Small': 8, 'Medium': 10, 'Large': 12}
Explanation: If 2 accounts with null NumberOfEmployees are categorized as Small, the Small count increases to 8
Welcome to Lightning Challenge!
Create an Account
Sign up to track your progress, earn points, and compete with others. Your solutions will be saved automatically.
Create accountHow It Works
- • Write your solution in the code editor
- • Connect your Salesforce org to test
- • Submit to check if your solution passes
- • Use hints if you get stuck
Contest Alert
Contest runs May 1 - 31. Complete challenges to climb the leaderboard!
Only the 31 daily challenges shown during this contest count toward points. Earlier dailies don't carry over.