Sql distinct along with the sql floor function is used to retrieve only unique value after rounded down to the next least integer value depending on the column specified.
Floor value in sql.
The sql floor function is similar to a ceiling function with one difference.
The sql floor function rounded up any positive or negative decimal value down to the next least integer value.
It also accepts one value.
The following example shows positive numeric negative numeric and values with the floor function.
Select floor numeric expression from source.
The basic syntax of the sql server floor function is.
Syntax of sql floor function.
Select floor 123 45 floor 123 45 floor 123 45.
Azure synapse analytics sql data warehouse and parallel data warehouse.
In sql server transact sql the floor function returns the largest integer value that is equal to or less than a number.
The result is the integer part of the calculated value in the same data type as numeric expression.
The floor function returns the largest integer value that is smaller than or equal to a number.