SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Salary Distribution by Range

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

Problem Statement

Bucket employees into salary bands and count each bucket: • "Under 60k" → salary < 60000 • "60k-80k" → 60000 ≤ salary < 80000 • "80k-100k" → 80000 ≤ salary < 100000 • "Over 100k" → salary ≥ 100000 Return salary_range and employee_count, in the bucket order shown above.

Relevant Tables

employees

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: