As for your number formatting, you looked at the format function:
mysql> SELECT FORMAT(12332.123456, 4); -> '12,332.1235' mysql> SELECT FORMAT(12332.1,4); -> '12,332.1000' mysql> SELECT FORMAT(12332.2,0); -> '12,332'
to get 2.000000 out of 2:
SELECT FORMAT(2,6);
Also, according to mySQL documentation regarding division:
In the division performed with /, the scale of the result when using two operands of the exact value is the scale of the first operand plus the value of the system div_precision_increment variable (by default it is 4). For example, the result of the expression 5.05 / 0.014 has a scale of six decimal places (360.714286).
These rules apply to each operation, such that nested calculations assume the accuracy of each component. Therefore, (14620/9432456) / (24250/9432456) resolves first to (0.0014) / (0.0026), with the final result with 8 decimal places (0.60288653).
This will lead me to agree with @Cyberwiki regarding the result you will see from your unit.
source share