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!
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
🏆 #CodeEveryDay Mar 2026
Contest runs March 3 - 31. Complete challenges to climb the leaderboard!
Points are calculated for challenges completed during the contest period.