This question runs in a pre-configured Salesforce environment - no personal connection required.
Given an industry name, find all accounts in that industry whose annual revenue exceeds the average annual revenue for that industry. Return a list of strings formatted as "AccountName: $Revenue" where Revenue is the integer value with no decimals. Sort results by revenue in descending order. Return an empty list if no accounts match or if the industry has no accounts.
Examples:
Input: industry = 'Technology'
Output: ['Cloud Code Academy: $75000000', 'TechFlow Solutions: $45000000', ...]
Explanation: Returns Technology accounts with revenue above the Technology industry average, sorted highest first
Input: industry = 'Finance'
Output: ['Alpine Private Bank: $185000000', 'FinTech Asia: $32000000']
Explanation: Returns Finance accounts whose revenue exceeds the Finance industry average
Input: industry = 'NonExistent'
Output: []
Explanation: No accounts exist in this industry, so an empty list is returned
Input: industry = null
Output: []
Explanation: Null input returns an empty list immediately
Input: industry = ''
Output: []
Explanation: Blank input returns an empty list immediately
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 August 2026
Contest runs August 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.