Skip to main content
SQL โ€ข LESSON 06

AND / OR Conditions

How can we filter records using multiple criteria simultaneously?

Beginnerโฑ 2 Minutesโญ 130 XP
๐Ÿค” THE QUESTION

How can we filter records using multiple criteria simultaneously?

๐Ÿ’ก WHAT IS IT?

AND requires all conditions to evaluate to true, while OR requires at least one condition to be true.

๐ŸŽฏ WHAT IS IT USED FOR?

Multi-dimensional filtering such as department, region, status, and salary simultaneously.

๐Ÿ’ป EXAMPLE
SELECT *
FROM employees
WHERE department = 'IT'
AND salary > 50000;

๐ŸŽฏ Mission Objectives

Practice typing production-grade SQL code for AND / OR Conditions.

  • โœ“ AND
  • โœ“ Compound conditions
  • โœ“ WHERE
  • โœ“ Logical operators