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

Write a method that queries all Opportunity records where the Amount falls within the provided minimum and maximum values (inclusive). Return the results ordered by Amount in ascending order.

The org contains opportunities with amounts ranging from 12,500 to 1,250,000.

Examples

Input: minAmount = 0, maxAmount = 50000 Output: List of opportunities with amount from 0 to 50000, ordered by Amount ascending
Input: minAmount = 500001, maxAmount = 2000000 Output: List of high-value opportunities ordered by Amount ascending
Input: minAmount = 2000000, maxAmount = 3000000 Output: [] (empty list)
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