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

🏆 #CodeEveryDay August 2026

Contest runs August 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