I have table column that have positive and negative float digits. When I do query to get SUM() of all digits, it's returns wrong result.
Table:
+----+---------+--------+
| id | user_id | points |
+----+---------+--------+
| 1 | 38 | 30.5 |
| 2 | 38 | -5.3 |
+----+---------+--------+
Query:
SELECT SUM(points) FROM table WHERE user_id=38
Result:
25.199999809265137
Why is this happening? Why I don't get 25.2
as the result?