Re: [SQL] Sorting an aggregated column

2004-03-23 Thread Tom Lane
"David Witham" <[EMAIL PROTECTED]> writes: > So I see that there is the extra sort above the sub-query that > wouldn't be there using 7.4. Are you saying that the sort by survey > after the sort by survey,question would potentially reorder the > records initially sorted by survey,question? Exactly

Re: [SQL] Sorting an aggregated column

2004-03-22 Thread David Witham
ese rows even though they don't need to be? Regards, David -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Tuesday, 23 March 2004 16:17 To: David Witham Cc: [EMAIL PROTECTED] Subject: Re: [SQL] Sorting an aggregated column "David Witham" <[EMAIL PROTECTED]

Re: [SQL] Sorting an aggregated column

2004-03-22 Thread Tom Lane
"David Witham" <[EMAIL PROTECTED]> 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-sel