Link Search Menu Expand Document

This documentation is related to an older version of Firebolt. For the most current documentation, see Firebolt documentation.

FLOOR

Returns the largest round number that is less than or equal to <value>. The value is rounded to a decimal range defined by the second <value>.

Syntax

FLOOR(<value>[, <decimal>])

Parameters

Parameter Description Supported input types
<value> Valid values include column names, functions that return a column with numeric values, and constant numeric values. DOUBLE PRECISION
<decimal> Optional. A constant that defines the decimal range of the returned value. By default, FLOOR returns whole numbers. INTEGER

Return Type

DOUBLE PRECISION

Example

The following example returns the largest round number that is less than or equal to the value 2.19:

SELECT
    FLOOR(2.19, 1);

Returns: 2.1