Re: Accumulated sums in SQL query - Mailing list pgsql-sql

From Christoph Haller
Subject Re: Accumulated sums in SQL query
Date
Msg-id 3DBCF34F.9F6ACBA8@rodos.fzk.de
Whole thread Raw
In response to Accumulated sums in SQL query  ("Kabai József" <kabai@audiobox.hu>)
List pgsql-sql
> Which is the simplest way to create an SQL query to get accumulated
sums of
>  records like this (from the table containing the numbers):
>
> number    sums
> ---------------
> 1               1
> 2               3
> 3               6
> 4              10
>
SELECT number, SUM(your_sum_column) FROM your_table
GROUP BY number ;

Regards, Christoph



pgsql-sql by date:

Previous
From: "Kabai József"
Date:
Subject: Accumulated sums in SQL query
Next
From: "Kabai József"
Date:
Subject: Re: Accumulated sums in SQL query