This question runs in a pre-configured Salesforce environment - no personal connection required.

Query all Account records and return a Map where the key is the Account Type (such as "Customer" or "Prospect") and the value is the maximum AnnualRevenue for that Type. Only include Types that have at least one Account with a non-null AnnualRevenue.

Examples:

Input: No parameters Output: {'Customer' => 225000000, 'Prospect' => 45000000} Explanation: The highest revenue Customer account has 225M annual revenue, and the highest revenue Prospect has 45M Input: No parameters Output: {'Customer' => 185000000} Explanation: If only Customer accounts have non-null revenue values, only Customer appears in the result
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 account

How 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 Feb 2026

Contest runs February 1 - 28. Complete challenges to climb the leaderboard!

Points are calculated for challenges completed during the contest period.