EasyWHERE & Filtering

Find employees hired between 2020 and 2022

The query

SQL
SELECT first_name, last_name, hire_date
FROM employees
WHERE hire_date BETWEEN '2020-01-01' AND '2022-12-31'
ORDER BY hire_date;
Tested against PostgreSQL 16

Note

Date strings in ISO format (YYYY-MM-DD) work directly with PostgreSQL date columns.

Tables referenced