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
Apex Code Editor
Welcome to Lightning Challenge!
How It Works
- • Write your solution in the code editor
- • This challenge runs without connecting your own org
- • Submit to check if your solution passes
- • Use hints if you get stuck
Contest Alert
🏆 #CodeEveryDay July 2026
Contest runs July 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.