Skip to content
SQLSimplified
Data AnalystQuestion 10 of 57

Refactoring with CTEs

Problem

Using a CTE named HighEarners, select all employees with a salary > 100000. Then, from the CTE, count how many high earners exist in each department_id.

Try It

Loading playground environment...

Hint

Solution