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

Given the Opportunities that exist in the org, return the Name of the Opportunity that has the highest Amount. Opportunities with a null Amount must be ignored when determining the highest value. If no Opportunity has a non-null Amount, return null.

Examples:

Input: Org contains Opportunities with various Amount values, including some with null Amount Output: The Name of the Opportunity with the largest Amount, ignoring any null Amount records Input: Org contains no Opportunities with a non-null Amount Output: null Input: Two Opportunities share the same highest Amount Output: The Name that comes first alphabetically among the tied Opportunities
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

🏆 All Time Leaderboard

Contest runs January 1, 1970 - December 31, 9999. Complete challenges to climb the leaderboard!

Points are calculated for challenges completed during the contest period.

Wally can't hear you

Please sign in to access the AI Assistant

Sign In