FLOOR
All functions > MATH > FLOOR
Rounds a number down to the nearest integer (floor function).
Syntax
FLOOR(expr) sql
Arguments
| Parameter | Type | Required | Description |
|---|---|---|---|
number | DOUBLE | Yes | The number to round down |
Returns
BIGINT - Integer result of rounding down
Notes
- Always rounds towards negative infinity
FLOOR(2.1) = 2,FLOOR(2.9) = 2FLOOR(-2.1) = -3,FLOOR(-2.9) = -3- Returns NULL if the input is NULL
- For exact integers, returns the same value
- Opposite behavior of CEIL function