pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: Chris Bitmead <chris.bitmead@bigfoot.com>
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Finding the "most recent" rows
Date: Thu, 29 Apr 1999 18:03:54 +0300
Message-ID: <l03130308b34e245af418@[147.233.159.109]> (raw)
In-Reply-To: <37286C86.8E0472A6@bigfoot.com>
References: <199904231442.IAA17294@trillium.nmsu.edu>
	<l03130302b34ddfaad0be@[147.233.159.109]>

At 17:28 +0300 on 29/04/1999, Chris Bitmead wrote:


>
> You say that a table is "considered an unordered set". But surely a
> table is not an unordered set if you've specified an ORDER BY clause?
> This idea is so nice, it would be ashame to dismiss it too quickly.

Charming, but alas, non standard. Moreover, what if you want to get the
maximal value, but order in an ascending in the output?

No, if you want compatible SQL, you won't use DISTINCT ON, and you will
specify the exact method of picking the distinguished value.

Furthermore, ORDER BY has to be a late stage, if it should work on the
entire results of unions, for example, or the result of groups.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma





view thread (24+ messages)

Message-ID: <l03130308b34e245af418@[147.233.159.109]>
Permalink:  ../l03130308b34e245af418@%5B147.233.159.109%5D/
Also on:    postgresql.org/message-id/l03130308b34e245af418@[147.233.159.109]

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: herouth@oumail.openu.ac.il, chris.bitmead@bigfoot.com
  Subject: Re: [SQL] Finding the "most recent" rows
  In-Reply-To: <l03130308b34e245af418@[147.233.159.109]>
  References: <199904231442.IAA17294@trillium.nmsu.edu> <l03130302b34ddfaad0be@[147.233.159.109]> <l03130308b34e245af418@[147.233.159.109]>

* 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