pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: gdavy@tpg.com.au
To: pgsql-sql@postgresql.org
Subject: running aggregates
Date: 1 Sep 2003 13:46:34 -0700
Message-ID: <c865c69d.0309011246.5ef4cfb2@posting.google.com> (raw)

f1    sum_f1  avg_f1  pseudo_recno
10	10	10	1
20	30	15	2
30	60	20	3
40	100	25	4
50	150	30	5
60	210	35	6

I know I can do this by iterating with a plpgsql routine, but there must
be a means simply using SQL

Thanks in advance
Glenn
ps sorry if this isn't the appropriate use for this forum



view thread (2+ messages)  latest in thread

Message-ID: <c865c69d.0309011246.5ef4cfb2@posting.google.com>
Permalink:  ../c865c69d.0309011246.5ef4cfb2@posting.google.com/
Also on:    postgresql.org/message-id/c865c69d.0309011246.5ef4cfb2@posting.google.com

 · 

reply

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: gdavy@tpg.com.au
  Subject: Re: running aggregates
  In-Reply-To: <c865c69d.0309011246.5ef4cfb2@posting.google.com>

* 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