Re: distinct on

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 18 Oct 2012 08:36:20 +0100
Message-ID: <9D0C745237C54EF6AF9BDB10645B0011_at_Primary>


Thomas,

Just to avoid any confusion - is your response about the Postgres on() clause example that we saw, or are you talking about the analytic function implementation in Oracle. The latter is something I know, the former is what I was curious about - especially since (possibly coincidentally) the selected "b column" value in the example happened to be the middle (both in value and position) of the original list. If your reply was related to Postgres - can you give us a version of the Postgres example that shows the "order by" in place.

Thanks

Jonathan Lewis
http://jonathanlewis.wordpress.com/all_postings

Author: Oracle Core (Apress 2011)
http://www.apress.com/9781430239543

  • Original Message ----- From: "Thomas Kellerer" <thomas.kellerer_at_mgm-tp.com> To: <oracle-l_at_freelists.org> Sent: Thursday, October 18, 2012 8:05 AM Subject: Re: distinct on

| Jonathan Lewis, 18.10.2012 08:57:
| >
| > How does the Postgres specification define the requirements for the
columns
| > other than the on() column ?
| >
|
| It uses the ordering defined by the ORDER BY if there is one, otherwise
it's undefined:
|
| From the manual:
| "Note that the "first row" of each set is unpredictable unless ORDER BY
is used to ensure that the desired row appears first"
|

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Oct 18 2012 - 09:36:20 CEST

Original text of this message