This question runs in a pre-configured Salesforce environment - no personal connection required.
Write a method that returns a list of Account names for accounts with annual revenue between two specified amounts (inclusive).
The method should:
- Use SOQL to query accounts with AnnualRevenue between minRevenue and maxRevenue
- Include accounts where AnnualRevenue >= minRevenue AND AnnualRevenue <= maxRevenue
- Order results by Name alphabetically
- Handle null revenue values by excluding them
- Return a List<String> of account names
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.