Using CASE Statements
  • Description: Implement conditional logic within a SELECT statement using CASE. Categorize employees as "High" ( > 70000 ), "Medium" (between 62000 and 70000 ), or "Low" ( < 55000 ) based on their salary.
  • Table Used: employees
    • Columns: employee_id, first_name, last_name, department, salary
  • Expected Columns Returned: first_name, last_name, salary_category
  • Schema:
classDiagram direction BT class Employees { integer employee_id text first_name text last_name text department float salary }

select * from employees