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!

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.

Wally can't hear you

Please sign in to access the AI Assistant

Sign In