Grokking SQL for Tech Interviews
Ask Author
Back to course home

0% completed

10. Departments with High Earning Employees (Medium)
Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Problem Statement

Table: Employee
Each row in this table represents an individual employee, detailing their unique ID, name, department, and salary.

+-------------+---------+
| Column Name | Type    | 
+-------------+---------+
| id          | int     | 
| name        | varchar |
| department  | varchar |
| salary      | int     |
+-------------+---------+
id is the primary key for this table.

Develop a solution to find departments with at least two employees who earn more than their department's average salary.

Return the result table in order of department.

.....

.....

.....

Like the course? Get enrolled and start learning!

Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible