Big Early-Stage Deals
Intermediate SolvedThe sales director wants to coach reps on large deals that are still early in the pipeline.
Return the Name of every Opportunity in stage Prospecting or Qualification with an Amount greater than 50,000.
Sample data
Opportunity 4 records
| Name | StageName | Amount | CloseDate |
|---|---|---|---|
| Atlas renewal | Prospecting | 75,000 | today + 30 days |
| Beacon pilot | Qualification | 20,000 | today + 30 days |
| Cobalt rollout | Negotiation/Review | 120,000 | today + 30 days |
| Delta expansion | Qualification | 51,000 | today + 30 days |
Expected result on the sample
| Name |
|---|
| Atlas renewal |
| Delta expansion |
Row order does not matter. Only the columns above are compared; extra columns in your SELECT are fine.
Hints
- Group the two stage conditions in parentheses, or use IN.
- "Greater than" is
>, not>=.
What this tests
SOQL refuses to guess how AND and OR combine: mixing them without parentheses is a parse error. Grouping the stage conditions, or using IN, makes the intent explicit. The other detail is the boundary: "greater than" means a 50,000 deal is not included, and a deal with no amount never passes a numeric comparison.
Datasets
Solved on this device only. Sign in with Google to keep your progress across devices.
Run on sample executes your query against the sample data shown on the left and displays the rows it returns. Submit checks it against the sample plus 2 hidden datasets, comparing your rows with the expected rows on each. Queries run in a real Salesforce org; the data is inserted for your run and rolled back afterwards.