This question runs in a pre-configured Salesforce environment - no personal connection required.
Sales managers want a clean picture of which stages the live pipeline is sitting in. Query every open Opportunity (one where IsClosed is false) and return the distinct StageName values, sorted alphabetically ascending.
Each stage must appear exactly once in the result no matter how many opportunities share it, and the list must be sorted so the output is stable.
Examples:
Input: (no parameters - the method queries the org)
Output: ['Id. Decision Makers', 'Needs Analysis', 'Negotiation/Review', ...]
Explanation: Every stage used by at least one open opportunity, listed once, in alphabetical order
Input: (an org where every open opportunity is in Prospecting)
Output: ['Prospecting']
Explanation: Duplicates collapse to a single entry
Input: (an org with no open opportunities)
Output: []
Explanation: Nothing open means nothing to report
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
Contest runs November 16 - 30. Complete challenges to climb the leaderboard!
Prizes 1 & 2: Salesforce certification exam voucher — won by random drawing, where every point is a ticket. see all prizes
Only the 15 daily challenges shown during this contest count toward points. Earlier dailies don't carry over.