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
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
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. Comparison

Comparison

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

SyntaxSyntax

Equality

value_1 = value_2

Inequality

value_1 != value_2

Less than

value_1 < value_2

Less than or equal

value_1 <= value_2

Greater than

value_1 > value_2

Greater than or equal

value_1 >= value_2

DescriptionDescription

Compares the value value_1 with the value value_2.

Argument types:

  • value_1 — Array of fractional numbers | Array of integers | Array of strings | Boolean | Date | Datetime | Fractional number | Geopoint | Geopolygon | Integer | String | UUID
  • value_2 — Array of fractional numbers | Array of integers | Array of strings | Boolean | Date | Datetime | Fractional number | Geopoint | Geopolygon | Integer | String | UUID

Return type: Boolean

Note

Due to implementation details of the Fractional number type in ClickHouse sources it is recommended to use the COMPARE function instead of comparison operators for this type.

ExamplesExamples

1 = 1 = TRUE
7 > 2 > 1 = 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
BETWEEN
Next
Division (/)
Yandex project
© 2025 Yandex.Cloud LLC