Triage the Urgent Open Cases

Basic

The support lead wants a morning list of cases that still need work and are rated High or Medium priority.

Return the Subject of every Case whose Priority is High or Medium and whose Status is not Closed.

Sample data

Case 4 records

SubjectStatusPriority
Login failsNewHigh
Invoice copyNewLow
API timeoutWorkingMedium
Data exportClosedHigh

Expected result on the sample

Subject
Login fails
API timeout

Row order does not matter. Only the columns above are compared; extra columns in your SELECT are fine.

Hints
  • Field IN ('A', 'B') matches either value.
  • Combine the two conditions with AND.

What this tests

IN replaces a chain of OR conditions on the same field and reads better in review. The trap is writing Priority != 'Low' instead: that also returns cases with no priority at all, because a null is not equal to Low. State the values you want rather than the one you do not.

SOQL

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.