That will work, except that you need to select the expression you group by:
SELECT
(name || ' ' || nickname) AS name_and_nickname,
SUM(cash) AS total_cash
FROM costumers
GROUP BY (name || ' ' || nickname)
Another option is to group by two fields by separating them with a comma:
SELECT
name, nickname, SUM(cash) AS total_cash
FROM costumers
GROUP BY name, nickname
Note that these two are not exactly equivalent. In particular these two rows will end up in the same group with the first version and in different groups in the second version:
name | nickname | cash
--------+-----------+----
foo | bar baz | 10
foo bar | baz | 20
The second option is probably what you mean.