Question: If I add a table like this in MySQL:

```
CREATE TABLE `test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `value` float NOT NULL,
  PRIMARY KEY (`id`)
);

```

and add an entry:

```
INSERT INTO `test` (`value`) VALUES ('123.45');

```

and do a SUM on it like this:

```
SELECT SUM( value )
FROM `test` 

```

why does it return 123.449996948242 and not 123.45?

Answer: 
This is because of floating point inaccuracy. Use [DECIMAL](http://dev.mysql.com/doc/refman/5.5/en/fixed-point-types.html) data type instead.

```
CREATE TABLE `test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `value` decimal(8,2) NOT NULL,
  PRIMARY KEY (`id`)
);

```

See this example: [SQLFiddle](http://sqlfiddle.com/#!2/bdb40/1)
Have you tried

```
SELECT 
      ROUND( SUM(value), 2)
FROM `test` 

```