Skip to main content

MOD

Categories: Math

MOD

Returns the remainder of the input expression divided by the second input expression.

Syntax

MOD(numeric_expression int64, numeric_expression int64) → int64

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

Examples

MOD example
SELECT MOD(50, 7)
-- 1

MOD(numeric_expression int64, numeric_expression int32) → int32

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

Examples

MOD example
SELECT MOD(35, 5)
-- 0

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

MOD example
SELECT MOD(47.6, 5.2)
-- 0.8