SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Department Efficiency Metrics

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

Problem Statement

For each department with employees, return department_name, total_salary_cost, and share_pct = (total_salary_cost ÷ company-wide payroll) × 100, rounded to 2 decimals. Sort by share_pct descending.

Relevant Tables

departmentsemployees

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: