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