Skip site navigation (1) Skip section navigation (2)

Re: Sorting an aggregated column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David Witham" <davidw(at)unidial(dot)com(dot)au>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Sorting an aggregated column
Date: 2004-03-23 05:17:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
"David Witham" <davidw(at)unidial(dot)com(dot)au> writes:
> This output is correct in this case but there is no guarantee that the
> answers will come out in "question" order. I can't see how to
> incorporate sorting by the "question" column using this approach.

As of PG 7.4 you can reliably use a sorted sub-select to determine the
order of inputs to a user-defined aggregate function.  See for instance

			regards, tom lane

In response to

pgsql-sql by date

Next:From: David WithamDate: 2004-03-23 07:17:51
Subject: Re: Sorting an aggregated column
Previous:From: David WithamDate: 2004-03-23 03:26:15
Subject: Sorting an aggregated column

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group