how to group by and return sum row in Postgres how to group by and return sum row in Postgres postgresql postgresql

how to group by and return sum row in Postgres


SELECT id, SUM(amount) AS amountFROM yourtableGROUP BY id