Re: [SQL] Finding the "most recent" rows

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: Chris Bitmead <chris(dot)bitmead(at)bigfoot(dot)com>, pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] Finding the "most recent" rows
Date: 1999-04-29 15:03:54
Message-ID: l03130308b34e245af418@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message José Soares 1999-04-29 15:45:10 Re: [SQL] LIMIT
Previous Message Mark Jewiss 1999-04-29 14:57:38 Re: [SQL] LIMIT