This question runs in a pre-configured Salesforce environment - no personal connection required.
Return a Map of country names to their total revenue for accounts with AnnualRevenue greater than 10000000. Use GROUP BY to aggregate by BillingCountry. Only include countries with total revenue greater than 50000000. Sort by total revenue descending. Use only safe Account fields (BillingCountry, AnnualRevenue). Return an empty Map if no countries meet the criteria.
Examples:
Input: None (query all accounts)
Output: Map<String, Decimal> {'USA' => 125000000, 'Germany' => 75000000}
Explanation: Countries with total revenue > 50M from high-value accounts (> 10M each)
Input: None
Output: Empty Map<String, Decimal>
Explanation: If no countries have total revenue > 50M, return empty map
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.