ForceChallenges
ProblemsDailyNotes
Sign in
Problem list
Sign in to submit

Open Cases by Priority

MediumSOQL 25 ptsCreated Oct 2, 2026

The support manager needs a dashboard tile showing how many open cases exist per priority.

Return one row per Priority with the number of Cases whose Status is not 'Closed'. Alias the count as total. Sort by Priority ascending.

Expected shape

Prioritytotal
High42
Low17

Constraints

  • Use an aggregate query (COUNT(Id)), aliased total.
  • Cases with a null Priority form their own group.
  • Row order is checked.
GROUP BYAggregates
CodeSOQL
Loading editor…
+1 hidden on submit
120 cases

Seed data

Case× 120 rows
Status: {{pick:New|Working|Closed|Escalated|Closed}}Subject: Issue {{i}}Priority: {{pick:High|Medium|Low}}

Expected

3 row(s), order checked

#totalPriority
124High
224Low
324Medium