Modulo (%)

    Operators

    Syntax

    number_1 % number_2
    

    Description

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

    Argument types:

    • number_1Number
    • number_2Number

    Return type: Depends on argument types

    Examples

    2 % 3 = 2
    
    2.1 % 3 = 2.1
    
    3 % 2.1 = 0.9
    

    Data source support

    Materialized Dataset, ClickHouse 1.1, Microsoft SQL Server 2017 (14.0), MySQL 5.6, PostgreSQL 9.3