Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex DataLens
    • Overview
    • Formula syntax
      • All Functions
        • Overview
        • AND
        • Addition and concatenation (+)
        • BETWEEN
        • Comparison
        • Division (/)
        • IN
        • IS FALSE
        • IS TRUE
        • LIKE
        • Modulo (%)
        • Multiplication (*)
        • NOT
        • Negation (-)
        • OR
        • Power (^)
        • Subtraction (-)
      • Function Availability
    • Parameters
  • Audit Trails events
  1. Calculated fields
  2. Function reference
  3. Operators
  4. BETWEEN

BETWEEN

Written by
Yandex Cloud
Improved by
amatol
Updated at November 6, 2024

SyntaxSyntax

value [ NOT ] BETWEEN low AND high

DescriptionDescription

Returns TRUE if value is in the range from low to high inclusive.

The option value NOT BETWEEN low AND high returns the opposite value.

Argument types:

  • value — Date | Datetime | Fractional number | Integer | String
  • low — Date | Datetime | Fractional number | Integer | String
  • high — Date | Datetime | Fractional number | Integer | String

Return type: Boolean

Note

Arguments value, low, high must be of the same type.

ExamplesExamples

3 BETWEEN 1 AND 100 = TRUE
100 BETWEEN 1 AND 100 = TRUE
3 NOT BETWEEN 1 AND 100 = FALSE
#2018-01-12# BETWEEN #2018-01-10# AND #2018-01-15# = TRUE
#2018-01-12 01:02:10# BETWEEN #2018-01-12 01:02:00# AND #2018-01-12 01:02:30# = TRUE

Data source supportData source support

ClickHouse 21.8, Files, Google Sheets, Yandex Metrica, Microsoft SQL Server 2017 (14.0), MySQL 5.7, Oracle Database 12c (12.1), PostgreSQL 9.3, Yandex Documents, YDB.

Was the article helpful?

Previous
Addition and concatenation (+)
Next
Comparison
© 2025 Direct Cursus Technology L.L.C.