Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

FLOOR Function

The FLOOR function rounds a number down to the next whole number.

Syntax

Copy
FLOOR (number)

Argument

number

DOUBLE PRECISION number to be rounded down.

Return Type

FLOOR returns an integer.

Example

Calculate the floor of the commission paid for a given sales transaction:

Copy
select floor(commission) from sales where salesid=10000; floor ------- 28 (1 row)