SQL • LESSON 06

AND / OR Conditions

Learn how to combine multiple conditions when filtering SQL results.

🟢 Beginner⏱ 2 Minutes⭐ 130 XP
🤔 THE QUESTION

How can we filter employees based on a specific range of values?

💡 WHAT IS IT?

SQL comparison conditions can be used to keep only rows whose values satisfy a required range or threshold.

🎯 WHAT IS IT USED FOR?

It is useful for filtering salaries, ages, dates, quantities, scores, and other numeric or ordered values.

💻 EXAMPLE
SELECT *
FROM employees
WHERE salary BETWEEN 50000 AND 100000;

Mission Brief

Practice combining SQL conditions using AND and OR.

Objectives

  • SELECT
  • FROM
  • WHERE
  • AND / OR