Categories: Numeric

FLOOR

Returns the value from the specifed expression rounded to the nearest equal or smaller integer.

Syntax

FLOOR(numeric_expression NUMERIC) → INTEGER

  • numeric_expression: The number (DOUBLE, FLOAT, INTEGER) for which you want to compute the floor.

Examples

SELECT FLOOR(0)
-- 0
SELECT FLOOR(45.76)
-- 45
SELECT FLOOR(-1.3)
-- -2