Your GROUP BY
is incomplete and you do not need WITH ROLLUP
SELECT names.id, names.name, IFNULL(sum(amount),'0.00') as sum_amount
FROM names LEFT OUTER JOIN other_table ON names.id=other_table.namesid
GROUP BY names.id,names.name;
Here is a sample to prove it
mysql> DROP DATABASE IF EXISTS faieta;
Query OK, 1 row affected (0.05 sec)
mysql> CREATE DATABASE faieta;
Query OK, 1 row affected (0.00 sec)
mysql> USE faieta
Database changed
mysql> CREATE TABLE names (
-> id INT NOT NULL AUTO_INCREMENT,
-> name VARCHAR(20),
-> PRIMARY KEY (id)
-> );
Query OK, 0 rows affected (0.01 sec)
mysql> INSERT INTO names (name) VALUES ('Carl');
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO names (name) VALUES ('Mark');
Query OK, 1 row affected (0.00 sec)
mysql> CREATE TABLE other_table (
-> id INT NOT NULL AUTO_INCREMENT,
-> namesid INT NOT NULL,
-> amount DOUBLE,
-> PRIMARY KEY (id)
-> );
Query OK, 0 rows affected (0.01 sec)
mysql> INSERT INTO other_table (namesid,amount) VALUES (1,100);
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO other_table (namesid,amount) VALUES (1,50);
Query OK, 1 row affected (0.01 sec)
mysql>
Here is the query output
mysql> SELECT names.id, names.name, IFNULL(sum(amount),'0.00') as sum_amount
-> FROM names LEFT OUTER JOIN other_table ON names.id=other_table.namesid
-> GROUP BY names.id,names.name;
+----+------+------------+
| id | name | sum_amount |
+----+------+------------+
| 1 | Carl | 150 |
| 2 | Mark | 0.00 |
+----+------+------------+
2 rows in set (0.00 sec)
mysql>