SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Departments with All High Earners

Build mastery in Subqueries with this scenario-based SQL challenge and live execution support.

Problem Statement

Find departments where every employee earns strictly more than $60,000 — and which have at least one employee (so empty depts are excluded). Use EXISTS to require ≥1 employee AND NOT EXISTS to forbid any low earner. Return department_id, department_name — ordered by department_id.

Relevant Tables

departmentsemployees

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: