pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Bitmead <chris.bitmead@bigfoot.com>
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Finding the "most recent" rows
Date: Thu, 29 Apr 1999 14:28:22 +0000
Message-ID: <37286C86.8E0472A6@bigfoot.com> (raw)
References: <199904231442.IAA17294@trillium.nmsu.edu>
	<l03130302b34ddfaad0be@[147.233.159.109]>

Herouth Maoz wrote:

> Tables are considered as unordered sets. There can not be anything in the
> standard that relies on the order in the table. And what do you mean by
> inserting a preceding ORDER BY step?

He was suggesting that an ORDER BY combined with a DISTINCT might be a
good way of solving the difficult problem of finding the, say,
max(field) in different groups in the table. (And it does work for
postgresql) Like a SELECT ...GROUP BY except getting back not just the
group fields but all fields.

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.


-- 
Chris Bitmead
http://www.bigfoot.com/~chris.bitmead
mailto:chris.bitmead@bigfoot.com



view thread (24+ messages)  latest in thread

Message-ID: <37286C86.8E0472A6@bigfoot.com>
Permalink:  ../37286C86.8E0472A6@bigfoot.com/
Also on:    postgresql.org/message-id/37286C86.8E0472A6@bigfoot.com

 · 

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: chris.bitmead@bigfoot.com
  Subject: Re: [SQL] Finding the "most recent" rows
  In-Reply-To: <37286C86.8E0472A6@bigfoot.com>
  References: <199904231442.IAA17294@trillium.nmsu.edu> <l03130302b34ddfaad0be@[147.233.159.109]> <37286C86.8E0472A6@bigfoot.com>

* 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