# Accounts With High-Priority Open Cases

**Type:** SOQL · **Difficulty:** Easy · **Topics:** Semi-Join, Subquery, Case

Practice this problem interactively (write and run your SOQL against realistic data): https://www.forcechallenges.com/problems/accounts-with-high-priority-open-cases

## Problem

**Scenario**
The customer-support lead starts every morning by checking which customers have an urgent problem that nobody has resolved yet. She does not need to see every Case, only the list of Accounts that need attention.

**Task**
Write one SOQL query on `Account` that returns every Account having **at least one Case** that is both:
1. `Priority = 'High'`, and
2. **Open**, meaning its `Status` is not `Closed`.

An Account must appear **only once**, even if it has several matching Cases. Sort the result by `Name` ascending.

**Expected output**
One row per qualifying Account with two columns: `Id` and `Name`.

**Example**
- Acme has two High Cases in Status New. It is returned once.
- Globex has a High Case in Status Working. It is returned.
- Initech has only a High Case that is Closed. It is excluded.
- Umbrella has a Medium Case in Status New. It is excluded because of the priority.
- Hooli has no Cases. It is excluded.

## Constraints

Use a semi-join (WHERE Id IN (SELECT AccountId FROM Case ...)) so each Account appears only once, even if it has several matching Cases. Open means Status is not 'Closed'. Order by Name ascending.

---
Source: ForceChallenges · last updated 2026-10-24
