SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Multiple CTEs for Comprehensive Analysis

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

Problem Statement

Use multiple CTEs to analyze: (1) department salary statistics, (2) project counts per department, then join them to show department name, average salary, total projects, and calculate a productivity ratio (projects per employee).

Relevant Tables

departmentsemployeesprojects