From: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
To: pgsql-sql@postgresql.org
Subject: Running tally
Date: Sat, 04 Oct 2003 17:56:38 +0800
Message-ID: <3F7E9956.30804@familyhealth.com.au> (raw)
Hi guys,
If I have a table that is just a single column full of numbers, how can
I select all the rows from the table with a second column that is the
running tally so far down the result set?
eg:
Num Tally so far
0.3 0.3
1.2 1.5
2.0 3.5
...
Does this require PL/PgSQL coding? If so, how do you actually construct
an arbitrary row for returning? The docs are somewhat unclear on this.
Chris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: chriskl@familyhealth.com.au
Subject: Re: Running tally
In-Reply-To: <3F7E9956.30804@familyhealth.com.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox