Link Search Menu Expand Document

This documentation is related to an older version of Firebolt. For the most current documentation, see Firebolt documentation.

MOD

Calculates the remainder after dividing two values, <num> / <den>.

Syntax

MOD(<value_n>,<value_d>)

Parameters

Parameter Description Supported input types
<value_n> The numerator of the division equation DOUBLE PRECISION
<value_d> The denominator of the division equation DOUBLE PRECISION

Return Type

DOUBLE PRECISION

Example

The following example returns the remainder of 45 and 7:

SELECT
    MOD(45, 7);

Returns: 3