Home > database >  Statistical problems about the calculation domain
Statistical problems about the calculation domain

Time:09-20

Today found a very strange thing:
Following a set of data: computational domain to sum (AA for group by 1)
AA
4.231
4.123
8.143

Subtotal: 2.3329999999999999

Found after the error, I would delete the computational domain, and then add and delete as before to the sum of the field (AA for group by 1)
The subtotal is:
Subtotal: 16.3969999999999999...
Excuse me why can not get the correct data!!!!!!

CodePudding user response:

CodePudding user response:

AA for the sum (group 1)

Don't by

CodePudding user response:

Value type is floating point, switch to a decimal type

CodePudding user response:

refer to the second floor lsh370190322 response:
sum (AA for group 1)

Don't by
is not by I dialed the wrong number,
Value type is a decimal (1)

CodePudding user response:

The reason is because the floating-point data,,,, thank you

CodePudding user response:

So I deal with the round (sum (AA for group 1), 2), without changing the database type, is there a better way?
  • Related