EasyWHERE & Filtering

Filter employees by multiple conditions with OR

The query

SQL
SELECT first_name, last_name, salary, job_title
FROM employees
WHERE job_title ILIKE '%senior%'
   OR job_title ILIKE '%lead%'
   OR job_title ILIKE '%principal%'
ORDER BY salary DESC;
Tested against PostgreSQL 16

Note

Multiple OR with ILIKE for keyword-based job title filtering. Consider full-text search for production.

Tables referenced