FLOOR() rounds a number down to the nearest value at the specified precision. When no precision is specified, it rounds down to the nearest integer. This function is useful for financial calculations, data analysis, and any scenario where you need to round numbers down to a specific decimal place or significant digit.
FLOOR(number [, precision])
FLOOR() returns a numeric value
FLOOR(10.333) = 10 (rounds down to nearest integer)
FLOOR(-10.333) = -11 (rounds down to nearest integer)
FLOOR(10.333, 2) = 10.33 (rounds down to 2 decimal places)
FLOOR(-10.333, 2) = -10.34 (rounds down to 2 decimal places)
FLOOR(1024, -2) = 1000 (rounds down to nearest hundred)
FLOOR(3.14159, 3) = 3.141 (rounds down to 3 decimal places)
FLOOR(1234.5678, -1) = 1230 (rounds down to nearest ten)