Skip to main content
SQL • LESSON 45

BETWEEN

How can we filter values that fall inside a specific range?

Beginner3 Minutes580 XP
🤔 THE QUESTION

How can we filter values that fall inside a specific range?

💡 WHAT IS IT?

The BETWEEN operator filters rows where a column value falls inclusively within a specified lower and upper boundary.

🎯 WHAT IS IT USED FOR?

Salary brackets, age ranges, price filters, score intervals in analytical queries.

💻 EXAMPLE
SELECT name, salary
FROM employees
WHERE salary BETWEEN 60000 AND 100000;

🎯 Mission Objectives

Practice typing production-grade SQL code for BETWEEN.

  • BETWEEN operator
  • Inclusive range
  • Numeric filtering
  • WHERE clause