SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Manager vs Non-Manager Analysis

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

Problem Statement

Classify each employee as Manager (someone whose employee_id appears in another row's manager_id) or Non-Manager. Return employee_type, employee_count, avg_salary (rounded to 2 decimals), min_salary, max_salary. Sort by avg_salary descending.

Relevant Tables

employees

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: