Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.45 KB

File metadata and controls

51 lines (37 loc) · 1.45 KB
description
Returns the remainder of the input expression divided by the second input expression.

MOD

Syntax

MOD(numeric_expression int64, numeric_expression int64) → int64

  • numeric_expression: The first numeric expression.
  • numeric_expression: The second numeric expression.

Examples

{% code title="MOD example" %}

SELECT MOD(50, 7)
-- 1

{% endcode %}

MOD(numeric_expression int64, numeric_expression int32) → int32

  • numeric_expression: The first numeric expression.
  • numeric_expression: The second numeric expression.

Examples

{% code title="MOD example" %}

SELECT MOD(35, 5)
-- 0

{% endcode %}

MOD(numeric_expression decimal(0,0), numeric_expression decimal(0,0)) → decimal(0,0)

  • numeric_expression: The first numeric expression.
  • numeric_expression: The second numeric expression.

Examples

{% code title="MOD example" %}

SELECT MOD(47.6, 5.2)
-- 0.8

{% endcode %}