Learn SQL Lesson
Combining Conditions
You can combine multiple conditions using `AND` and `OR`:
`AND` — both conditions must be true:
SELECT * FROM employees
WHERE department = 'Engineering' AND salary > 100000
`OR` — at least one condition must be true:
SELECT * FROM employees
WHERE department = 'Sales' OR department = 'Marketing'
Use parentheses to control the order of evaluation when mixing `AND` and `OR`:
SELECT * FROM employees
WHERE (department = 'Sales' OR department = 'Marketing')
AND salary > 70000
Practice challenge
Find employees who are in Marketing AND have a salary greater than 70,000.