Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex DataLens
  • Getting started
  • Use cases
    • All use cases
    • Visualizing data from a CSV file
    • Visualizing data from a ClickHouse database
    • Visualizing data from Yandex.Metriсa
    • Visualizing data from Yandex.Metrica Logs API
    • Publishing a chart with a map from a CSV file to DataLens Public
    • Visualizing data from AppMetrica
    • Visualizing geodata from a CSV file
  • Step-by-step instructions
    • All instructions
    • Working with connections
      • Creating a ClickHouse connection
      • Creating a connection to a CSV file
      • Creating a MySQL connection
      • Creating a PostgreSQL connection
      • Creating an MS SQL Server connection
      • Creating an Oracle Database connection
      • Creating a Yandex.Metrica API connection
      • Creating a Yandex.Metrica Logs API connection
      • Creating an AppMetrica connection
      • Managing connection access
    • Working with datasets
      • Create dataset
      • Creating a data field
      • Creating a calculated data field
      • Updating fields in datasets
      • Dataset materialization
      • Managing dataset access
      • Managing access to data rows
    • Working with charts
      • Creating a line chart
      • Creating an area chart
      • Creating a pie chart
      • Creating a column chart
      • Creating a bar chart
      • Creating a map
      • Creating a table
      • Creating a pivot table
      • Publishing a chart
      • Managing chart access
    • Working with dashboards
      • Creating dashboards
      • Adding charts to dashboards
      • Adding selectors to dashboards
      • Publishing dashboards
      • Managing dashboard access
    • Working with permissions
      • Granting permissions
      • Deleting permissions
      • Request permissions
  • Concepts
    • Overview
    • Connections
    • Data types
    • Datasets
      • Overview
      • Data model
      • Dataset settings
    • Charts
    • Dashboards
    • Using Markdown in DataLens
    • DataLens Public
    • Calculated fields
    • Marketplace
    • Backups in DataLens
    • Quotas and limits
  • Access management
    • Managing access to DataLens
    • Managing access at the data row level
  • Pricing policy
  • Function reference
    • All Functions
    • Aggregate functions
      • Overview
      • ALL_CONCAT
      • ANY
      • ARG_MAX
      • ARG_MIN
      • AVG
      • AVG_IF
      • COUNT
      • COUNTD
      • COUNTD_APPROX
      • COUNTD_IF
      • COUNT_IF
      • MAX
      • MEDIAN
      • MIN
      • QUANTILE
      • QUANTILE_APPROX
      • STDEV
      • STDEVP
      • SUM
      • SUM_IF
      • TOP_CONCAT
      • VAR
      • VARP
    • Date/Time functions
      • Overview
      • DATEADD
      • DATEPART
      • DATETRUNC
      • DAY
      • DAYOFWEEK
      • HOUR
      • MINUTE
      • MONTH
      • NOW
      • SECOND
      • TODAY
      • WEEK
      • YEAR
    • Geographical functions
      • Overview
      • GEOCODE
      • GEOINFO
      • TOPONYM_TO_GEOPOINT
      • TOPONYM_TO_GEOPOLYGON
    • Logical functions
      • Overview
      • CASE
      • IF
      • IFNULL
      • ISNULL
      • ZN
    • Text markup functions
      • Overview
      • BOLD
      • ITALIC
      • MARKUP
      • URL
    • Mathematical functions
      • Overview
      • ABS
      • ACOS
      • ASIN
      • ATAN
      • ATAN2
      • CEILING
      • COS
      • COT
      • DEGREES
      • DIV
      • EXP
      • FLOOR
      • GREATEST
      • LEAST
      • LN
      • LOG
      • LOG10
      • PI
      • POWER
      • RADIANS
      • ROUND
      • SIGN
      • SIN
      • SQRT
      • SQUARE
      • TAN
    • Operators
      • Overview
      • AND
      • Addition and concatenation (+)
      • BETWEEN
      • Comparison
      • Division (/)
      • IN
      • IS FALSE
      • IS TRUE
      • LIKE
      • Modulo (%)
      • Multiplication (*)
      • NOT
      • Negation (-)
      • OR
      • Power (^)
      • Subtraction (-)
    • String functions
      • Overview
      • ASCII
      • CHAR
      • CONCAT
      • CONTAINS
      • ENDSWITH
      • FIND
      • ICONTAINS
      • IENDSWITH
      • ISTARTSWITH
      • LEFT
      • LEN
      • LOWER
      • LTRIM
      • REGEXP_EXTRACT
      • REGEXP_EXTRACT_NTH
      • REGEXP_MATCH
      • REGEXP_REPLACE
      • REPLACE
      • RIGHT
      • RTRIM
      • SPACE
      • SPLIT
      • STARTSWITH
      • SUBSTR
      • TRIM
      • UPPER
      • UTF8
    • Time series functions
      • Overview
      • AGO
      • AT_DATE
    • Type conversion functions
      • Overview
      • BOOL
      • DATE
      • DATETIME
      • DATETIME_PARSE
      • DATE_PARSE
      • DB_CAST
      • FLOAT
      • GEOPOINT
      • GEOPOLYGON
      • INT
      • STR
    • Window functions
      • Overview
      • AVG
      • AVG_IF
      • COUNT
      • COUNT_IF
      • LAG
      • MAVG
      • MAX
      • MCOUNT
      • MIN
      • MMAX
      • MMIN
      • MSUM
      • RANK
      • RANK_DENSE
      • RANK_PERCENTILE
      • RANK_UNIQUE
      • RAVG
      • RCOUNT
      • RMAX
      • RMIN
      • RSUM
      • SUM
      • SUM_IF
    • Function Availability
  • Questions and answers
  1. Function reference
  2. Operators
  3. Overview

Operators

  • Modulo (%)
  • Multiplication (*)
  • Addition and concatenation (+)
  • Subtraction (-)
  • Division (/)
  • Comparison
  • Power (^)
  • AND
  • BETWEEN
  • IN
  • IS FALSE
  • IS TRUE
  • LIKE
  • Negation (-)
  • NOT
  • OR

Modulo (%)

Syntax:number_1 % number_2

Returns the remainder from dividing the first number number_1 by the second number number_2.

Multiplication (*)

Syntax:value_1 * value_2

If both arguments are numbers, it returns the result by multiplying value_1 by value_2.

If one of the arguments is String and the other is Number (whole), it returns the string repeated the specified number of times.

Addition and concatenation (+)

Syntax:value_1 + value_2

Behaves differently depending on the argument types. Possible options are listed in the table:

Type of value_1 Type of value_2 Return value
Number Number The sum of the numbers value_1 and value_2.
Date Number The date that is value_2 days greater than value_1 (rounded down to an integer number of days).
Datetime Number The date with time, value_2 days greater than value_1. If value_2 contains a fractional part, it is converted hours (1/24), minutes (1/1440), and seconds (1/86400).
String String The merging (concatenation) of strings value_1 and value_2.

Changing the order of arguments does not affect the result.

Subtraction (-)

Syntax:value_1 - value_2

Behaves differently depending on the argument types. Possible options are listed in the table:

Type of value_1 Type of value_2 Return value
Number Number The difference between the numbers value_1 and value_2.
Date Number The date that is value_2 days smaller than value_1 (rounded down to an integer number of days).
Datetime Number The date with time, value_2 days smaller than value_1. If value_2 contains a fractional part, it is converted to hours (1/24), minutes (1/1440), and seconds (1/86400).
Date Date The difference between two dates in days.
Datetime Datetime The difference between two dates in days: the integer part — the number of whole days, the fractional part — the number of hours, minutes and seconds expressed as a fraction of the whole day (1 hour is '1/24').

Division (/)

Syntax:number_1 / number_2

Divides the number number_1 by the number number_2.

Comparison

Syntax:
value_1 = value_2
or
value_1 != value_2
or
value_1 < value_2
or
value_1 <= value_2
or
value_1 > value_2
or
value_1 => value_2

Compares the value value_1 with the value value_2.

Power (^)

Syntax:base ^ power

Raises base to the power of power.

AND

Syntax:value_1 AND value_2

Performs a Boolean join of two expressions with the AND condition.

BETWEEN

Syntax:value [ NOT ] BETWEEN low AND high

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

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

IN

Syntax:item [ NOT ] IN (<list>)

Checks whether the value matches at least one of the values listed in IN(...).

The option item NOT IN (<list>) returns the opposite value.

IS FALSE

Syntax:value IS [ NOT ] FALSE

Checks whether the value value is false (FALSE).

The value IS NOT FALSE option returns the opposite value.

IS TRUE

Syntax:value IS [ NOT ] TRUE

Checks whether the value of value is true (TRUE).

The value IS NOT TRUE option returns the opposite value.

LIKE

Syntax:string_1 [ NOT ] LIKE string_2

Matches the string string_1 to the template string_2 and returns TRUE on match.
You can specify the value in string_2 or use the % character to match a string of any length.

The string_1 NOT LIKE option returns the opposite value.

Negation (-)

Syntax:-value

Returns the number value with the opposite sign.

NOT

Syntax:NOT value

Inverts a Boolean value.

OR

Syntax:value_1 OR value_2

Performs a Boolean join of two expressions with the OR condition.

In this article:
  • Modulo (%)
  • Multiplication (*)
  • Addition and concatenation (+)
  • Subtraction (-)
  • Division (/)
  • Comparison
  • Power (^)
  • AND
  • BETWEEN
  • IN
  • IS FALSE
  • IS TRUE
  • LIKE
  • Negation (-)
  • NOT
  • OR
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC