menu
Clear Progress
Home
Easy
Basic SELECT Query
Filtering Data with WHERE Clauses
Sorting Data with ORDER BY
Using Aggregate Functions
Grouping Data with GROUP BY
Filtering Groups with HAVING
Joining Tables (INNER JOIN)
LEFT JOIN and NULL Handling
Combining Results with UNION
Medium
Subqueries for Complex Filtering
Using CASE Statements
Subqueries for Complex Filtering
Description:
Practice using subqueries to filter data based on another query. Retrieve employees whose salaries are higher than the average salary of their department.
Table Used:
employees
Columns:
employee_id
,
first_name
,
last_name
,
department
,
salary
Expected Columns Returned:
employee_id
,
first_name
,
last_name
,
department
Schema:
classDiagram direction BT class Employees { integer employee_id text first_name text last_name text department float salary }
select * from employees
Run
Clear
Solution