IntermediateWHERE & Filtering

Find employees with email matching company domain

The query

SQL
SELECT first_name, last_name, email
FROM employees
WHERE email LIKE '%@company.com'
  AND status = 'active'
ORDER BY last_name;
Tested against PostgreSQL 16

Note

Combine LIKE with other conditions using AND for refined filtering.

Tables referenced