floor(x): Returns the largest whole integer not greater than x (rounds down) : floor « Math Functions « PostgreSQL






floor(x): Returns the largest whole integer not greater than x (rounds down)


postgres=#
postgres=#
postgres=# -- floor(x): Returns the largest whole integer not greater than x (rounds down)
postgres=# SELECT floor(1.0) AS one,
postgres-#        floor(1.1) AS "one point one",
postgres-#        floor(1.8) AS "one point eight";
 one | one point one | one point eight
-----+---------------+-----------------
   1 |             1 |               1
(1 row)

postgres=#
           
       








Related examples in the same category

1.floor(dp or numeric) largest integer not greater than argument