PostgreSQL
 sql >> Database >  >> RDS >> PostgreSQL

come raggruppare e restituire la riga della somma in Postgres

SELECT id, SUM(amount) AS amount
FROM yourtable
GROUP BY id