SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Find Employees at Specific Hierarchy Level

Build mastery in Self Joins Hierarchical with this scenario-based SQL challenge and live execution support.

Problem Statement

Recursive CTE to assign hierarchy_level (CEO = 1) to each employee, then filter to level 3 only. Return employee_id, employee_name, hierarchy_level, manager_id, department_id — ordered by employee_id.

Relevant Tables

employees

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: