Given is a Postgres table like this
nummer vorname name cash
------|-----------|-----------|-----
1 paul smith 500
2 andy london 700
2 mike dover 700
3 clara winchester 200
To query this table my sql looks like this right know:
SELECT
nummer,
vorname,
name,
cash as total
FROM
data.myTable
GROUP BY
nummer,
name,
vorname,
cash
ORDER BY
nummer;
Is it possible to concat the two rows where nummer is the same (in this case 2).
Means my output should look like this (cash will also have the same values if the numbers are equal):
nummer vorname name cash
------|-----------|-----------|-----
1 paul smith 500
2 andy london 700
mike dover
3 clara winchester 200